diff --git a/01/.classpath b/01/.classpath new file mode 100644 index 0000000..d1354d5 --- /dev/null +++ b/01/.classpath @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/01/.mymetadata b/01/.mymetadata new file mode 100644 index 0000000..9ea2218 --- /dev/null +++ b/01/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/01/.project b/01/.project new file mode 100644 index 0000000..0c5fbc9 --- /dev/null +++ b/01/.project @@ -0,0 +1,50 @@ + + + 01 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/01/.settings/.jsdtscope b/01/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/01/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/01/.settings/org.eclipse.jdt.core.prefs b/01/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..98cb0e7 --- /dev/null +++ b/01/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Tue Feb 15 08:43:05 CST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/01/.settings/org.eclipse.wst.jsdt.ui.superType.container b/01/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/01/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/01/.settings/org.eclipse.wst.jsdt.ui.superType.name b/01/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/01/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/01/WebRoot/Database/db_CityInfo_Data.MDF b/01/WebRoot/Database/db_CityInfo_Data.MDF new file mode 100644 index 0000000..d9284ba Binary files /dev/null and b/01/WebRoot/Database/db_CityInfo_Data.MDF differ diff --git a/01/WebRoot/Database/db_CityInfo_log.LDF b/01/WebRoot/Database/db_CityInfo_log.LDF new file mode 100644 index 0000000..f01b8bd Binary files /dev/null and b/01/WebRoot/Database/db_CityInfo_log.LDF differ diff --git a/01/WebRoot/META-INF/MANIFEST.MF b/01/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/01/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/01/WebRoot/WEB-INF/classes/cityinfo.xml b/01/WebRoot/WEB-INF/classes/cityinfo.xml new file mode 100644 index 0000000..327b61b --- /dev/null +++ b/01/WebRoot/WEB-INF/classes/cityinfo.xml @@ -0,0 +1,38 @@ + + + + + + + /view/IndexTemp.jsp + + + + /view/IndexTemp.jsp + /view/IndexTemp.jsp + + + + /pages/admin/Login.jsp + /pages/admin/view/AdminTemp.jsp + goindex + + + + /pages/admin/view/AdminTemp.jsp + /pages/admin/view/AdminTemp.jsp + + admin_* + ListShow + + + admin_ListShow.action + + /pages/admin/view/AdminTemp.jsp + /pages/admin/view/AdminTemp.jsp + + + + \ No newline at end of file diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/action/AdminAction.class b/01/WebRoot/WEB-INF/classes/com/yxq/action/AdminAction.class new file mode 100644 index 0000000..d632a94 Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/action/AdminAction.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/action/IndexAction.class b/01/WebRoot/WEB-INF/classes/com/yxq/action/IndexAction.class new file mode 100644 index 0000000..720b8d0 Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/action/IndexAction.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/action/InfoAction.class b/01/WebRoot/WEB-INF/classes/com/yxq/action/InfoAction.class new file mode 100644 index 0000000..ccb513d Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/action/InfoAction.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/action/LogInOutAction.class b/01/WebRoot/WEB-INF/classes/com/yxq/action/LogInOutAction.class new file mode 100644 index 0000000..493f26b Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/action/LogInOutAction.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/action/package.properties b/01/WebRoot/WEB-INF/classes/com/yxq/action/package.properties new file mode 100644 index 0000000..012eecb --- /dev/null +++ b/01/WebRoot/WEB-INF/classes/com/yxq/action/package.properties @@ -0,0 +1,38 @@ +city.info.no.infoType=\u8bf7\u9009\u62e9 \u4fe1\u606f\u7c7b\u522b\uff01 +city.info.no.infoTitle=\u8bf7\u8f93\u5165 \u4fe1\u606f\u6807\u9898\uff01 +city.info.no.infoContent=\u8bf7\u8f93\u5165 \u4fe1\u606f\u5185\u5bb9\uff01 +city.info.no.infoPhone=\u8bf7\u8f93\u5165 \u8054\u7cfb\u7535\u8bdd\uff01 +city.info.no.infoLinkman=\u8bf7\u8f93\u5165 \u8054\u7cfb\u4eba\uff01 +city.info.no.infoEmail=\u8bf7\u8f93\u5165 E-mail\u5730\u5740\uff01 +city.info.format.infoPhone=\u8f93\u5165\u7684 \u8054\u7cfb\u65b9\u5f0f \u683c\u5f0f\u4e0d\u6b63\u786e\uff01 +city.info.format.infoEmail=\u8f93\u5165\u7684 E-mail\u5730\u5740\u683c\u5f0f \u4e0d\u6b63\u786e\uff01 +city.info.add.E=\u53d1\u5e03\u4fe1\u606f\u5931\u8d25\uff01 +city.info.add.S=
  • \u4fe1\u606f\u53d1\u5e03\u6210\u529f\uff01\u9700\u8981\u7ba1\u7406\u5458\u8fdb\u884c\u5ba1\u6838\uff01
  • \u8bf7\u8bb0\u4f4f\u63d0\u4f9b\u7ed9\u60a8\u7684ID\uff0c\u4ee5\u4fbf\u65e5\u540e\u8fdb\u884c\u4ed8\u8d39\u64cd\u4f5c\uff01

  • \u4fe1\u606fID\uff1a + +city.login.no.name=\u8bf7\u8f93\u5165 \u7528\u6237\u540d\uff01 +city.login.no.password=\u8bf7\u8f93\u5165 \u5bc6  \u7801\uff01 +city.login.wrong.input=\u8f93\u5165\u7684 \u7528\u6237\u540d \u6216 \u5bc6\u7801 \u4e0d\u6b63\u786e\uff01 + +city.info.listshow.no.infoType=\u8bf7\u9009\u62e9\u8981\u67e5\u770b\u7684\u7c7b\u522b\uff01 +city.info.listshow.format.infoType=\u4fe1\u606f\u7c7b\u522b\u4e0d\u662f\u6570\u5b57\u683c\u5f0f\uff01 +city.info.singleshow.no.id=\u8bf7\u9009\u62e9\u8981\u67e5\u770b\u8be6\u7ec6\u5185\u5bb9\u7684\u4fe1\u606f\uff01 +city.info.listshow.format.infoID=\u4fe1\u606fID\u503c\u4e0d\u662f\u6570\u5b57\u683c\u5f0f\uff01 + +city.admin.list.no.infoType=\u8bf7\u9009\u62e9\u4e00\u79cd \u4fe1\u606f\u7c7b\u522b\uff01 +city.admin.list.no.payforType=\u8bf7\u9009\u62e9\u4e00\u79cd \u4ed8\u8d39\u72b6\u6001 \u9009\u9879\uff01 +city.admin.list.no.stateType=\u8bf7\u9009\u62e9\u4e00\u79cd \u5ba1\u6838\u72b6\u6001 \u9009\u9879\uff01 + +city.admin.setMoney.no.moneyID=\u8bf7\u8f93\u5165 \u4fe1\u606fID\u503c\uff01 +city.admin.setMoney.format.moneyID=\u8f93\u5165\u7684 \u4fe1\u606fID\u503c \u5fc5\u987b\u4e3a\u6570\u5b57\u683c\u5f0f\uff01 +city.admin.setMoney.moneyID.0=\u8f93\u5165\u7684 \u4fe1\u606fID\u503c \u5fc5\u987b\u5927\u4e8e0\uff01 + +city.admin.check.no.success=\u5ba1\u6838\u4fe1\u606f\u5931\u8d25\uff01 +city.admin.delete.no.success=\u5220\u9664\u4fe1\u606f\u5931\u8d25\uff01 +city.admin.setmoney.success=\u4ed8\u8d39\u8bbe\u7f6e\u6210\u529f\uff01 +city.admin.setmoney.no.success=\u4ed8\u8d39\u8bbe\u7f6e\u5931\u8d25\uff01 + +city.singleshow.no.exist=\u8981\u67e5\u770b\u7684\u4fe1\u606f\u4e0d\u5b58\u5728\uff01 + +city.info.search.no.condition=\u8bf7\u8f93\u5165 \u67e5\u8be2\u6761\u4ef6\uff01 +city.info.search.no.value=\u8bf7\u8f93\u5165 \u67e5\u8be2\u5173\u952e\u5b57\uff01 +city.info.search.no.type=\u8bf7\u8f93\u5165 \u641c\u7d22\u7c7b\u522b\uff01 \ No newline at end of file diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/actionSuper/AdminSuperAction.class b/01/WebRoot/WEB-INF/classes/com/yxq/actionSuper/AdminSuperAction.class new file mode 100644 index 0000000..e86be8f Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/actionSuper/AdminSuperAction.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/actionSuper/InfoSuperAction.class b/01/WebRoot/WEB-INF/classes/com/yxq/actionSuper/InfoSuperAction.class new file mode 100644 index 0000000..7bebf77 Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/actionSuper/InfoSuperAction.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/actionSuper/MySuperAction.class b/01/WebRoot/WEB-INF/classes/com/yxq/actionSuper/MySuperAction.class new file mode 100644 index 0000000..3d02adb Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/actionSuper/MySuperAction.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/dao/DB.class b/01/WebRoot/WEB-INF/classes/com/yxq/dao/DB.class new file mode 100644 index 0000000..5daaaec Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/dao/DB.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/dao/OpDB.class b/01/WebRoot/WEB-INF/classes/com/yxq/dao/OpDB.class new file mode 100644 index 0000000..0512b1a Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/dao/OpDB.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/model/AdminShowType.class b/01/WebRoot/WEB-INF/classes/com/yxq/model/AdminShowType.class new file mode 100644 index 0000000..fb8dea0 Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/model/AdminShowType.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/model/CreatePage.class b/01/WebRoot/WEB-INF/classes/com/yxq/model/CreatePage.class new file mode 100644 index 0000000..aadcc17 Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/model/CreatePage.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/model/InfoSingle.class b/01/WebRoot/WEB-INF/classes/com/yxq/model/InfoSingle.class new file mode 100644 index 0000000..6685b4e Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/model/InfoSingle.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/model/SearchInfo.class b/01/WebRoot/WEB-INF/classes/com/yxq/model/SearchInfo.class new file mode 100644 index 0000000..33e53c4 Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/model/SearchInfo.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/model/UserSingle.class b/01/WebRoot/WEB-INF/classes/com/yxq/model/UserSingle.class new file mode 100644 index 0000000..55f9124 Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/model/UserSingle.class differ diff --git a/01/WebRoot/WEB-INF/classes/com/yxq/tools/DoString.class b/01/WebRoot/WEB-INF/classes/com/yxq/tools/DoString.class new file mode 100644 index 0000000..f5dac9f Binary files /dev/null and b/01/WebRoot/WEB-INF/classes/com/yxq/tools/DoString.class differ diff --git a/01/WebRoot/WEB-INF/classes/struts.properties b/01/WebRoot/WEB-INF/classes/struts.properties new file mode 100644 index 0000000..34c2ab4 --- /dev/null +++ b/01/WebRoot/WEB-INF/classes/struts.properties @@ -0,0 +1 @@ +struts.i18n.encoding=gb2312 \ No newline at end of file diff --git a/01/WebRoot/WEB-INF/classes/struts.xml b/01/WebRoot/WEB-INF/classes/struts.xml new file mode 100644 index 0000000..a997c0b --- /dev/null +++ b/01/WebRoot/WEB-INF/classes/struts.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/01/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar b/01/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar new file mode 100644 index 0000000..b73a80f Binary files /dev/null and b/01/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar differ diff --git a/01/WebRoot/WEB-INF/lib/freemarker-2.3.8.jar b/01/WebRoot/WEB-INF/lib/freemarker-2.3.8.jar new file mode 100644 index 0000000..737bfb5 Binary files /dev/null and b/01/WebRoot/WEB-INF/lib/freemarker-2.3.8.jar differ diff --git a/01/WebRoot/WEB-INF/lib/msbase.jar b/01/WebRoot/WEB-INF/lib/msbase.jar new file mode 100644 index 0000000..528cd00 Binary files /dev/null and b/01/WebRoot/WEB-INF/lib/msbase.jar differ diff --git a/01/WebRoot/WEB-INF/lib/mssqlserver.jar b/01/WebRoot/WEB-INF/lib/mssqlserver.jar new file mode 100644 index 0000000..532f8ad Binary files /dev/null and b/01/WebRoot/WEB-INF/lib/mssqlserver.jar differ diff --git a/01/WebRoot/WEB-INF/lib/msutil.jar b/01/WebRoot/WEB-INF/lib/msutil.jar new file mode 100644 index 0000000..405f678 Binary files /dev/null and b/01/WebRoot/WEB-INF/lib/msutil.jar differ diff --git a/01/WebRoot/WEB-INF/lib/ognl-2.6.11.jar b/01/WebRoot/WEB-INF/lib/ognl-2.6.11.jar new file mode 100644 index 0000000..19cd379 Binary files /dev/null and b/01/WebRoot/WEB-INF/lib/ognl-2.6.11.jar differ diff --git a/01/WebRoot/WEB-INF/lib/struts2-core-2.0.11.jar b/01/WebRoot/WEB-INF/lib/struts2-core-2.0.11.jar new file mode 100644 index 0000000..589ce45 Binary files /dev/null and b/01/WebRoot/WEB-INF/lib/struts2-core-2.0.11.jar differ diff --git a/01/WebRoot/WEB-INF/lib/xwork-2.0.4.jar b/01/WebRoot/WEB-INF/lib/xwork-2.0.4.jar new file mode 100644 index 0000000..a7d763d Binary files /dev/null and b/01/WebRoot/WEB-INF/lib/xwork-2.0.4.jar differ diff --git a/01/WebRoot/WEB-INF/tld/struts-tags.tld b/01/WebRoot/WEB-INF/tld/struts-tags.tld new file mode 100644 index 0000000..9f1a3f0 --- /dev/null +++ b/01/WebRoot/WEB-INF/tld/struts-tags.tld @@ -0,0 +1,9278 @@ + + + + 2.2.3 + 1.2 + s + /struts-tags + "Struts Tags" + + + action + org.apache.struts2.views.jsp.ActionTag + JSP + + + executeResult + false + true + + + + flush + false + true + + + + id + false + true + + + + ignoreContextParams + false + true + + + + name + true + true + + + + namespace + false + true + + + + + actionerror + org.apache.struts2.views.jsp.ui.ActionErrorTag + empty + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + actionmessage + org.apache.struts2.views.jsp.ui.ActionMessageTag + empty + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + a + org.apache.struts2.views.jsp.ui.AnchorTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + errorText + false + true + + + + executeScripts + false + true + + + + formFilter + false + true + + + + formId + false + true + + + + handler + false + true + + + + href + false + true + + + + id + false + true + + + + indicator + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + listenTopics + false + true + + + + loadingText + false + true + + + + name + false + true + + + + notifyTopics + false + true + + + + onLoadJS + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + openTemplate + false + true + + + + preInvokeJS + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + showErrorTransportText + false + true + + + + showLoadingText + false + true + + + + tabindex + false + true + + + + targets + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + append + org.apache.struts2.views.jsp.iterator.AppendIteratorTag + JSP + + + id + false + true + + + + + autocompleter + org.apache.struts2.views.jsp.ui.AutocompleterTag + JSP + + + accesskey + false + true + + + + autoComplete + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + dataFieldName + false + true + + + + delay + false + true + + + + disabled + false + true + + + + dropdownHeight + false + true + + + + dropdownWidth + false + true + + + + emptyOption + false + true + + + + forceValidOption + false + true + + + + formFilter + false + true + + + + formId + false + true + + + + headerKey + false + true + + + + headerValue + false + true + + + + href + false + true + + + + iconPath + false + true + + + + id + false + true + + + + indicator + false + true + + + + key + false + true + + + + keyName + false + true + + + + label + false + true + + + + labelposition + false + true + + + + list + false + true + + + + listKey + false + true + + + + listValue + false + true + + + + listenTopics + false + true + + + + loadMinimumCount + false + true + + + + loadOnTextChange + false + true + + + + maxLength + false + true + + + + maxlength + false + true + + + + name + false + true + + + + notifyTopics + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + readonly + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + resultsLimit + false + true + + + + searchType + false + true + + + + showDownArrow + false + true + + + + size + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateCssPath + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + bean + org.apache.struts2.views.jsp.BeanTag + JSP + + + id + false + true + + + + name + true + true + + + + + checkbox + org.apache.struts2.views.jsp.ui.CheckboxTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + fieldValue + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + checkboxlist + org.apache.struts2.views.jsp.ui.CheckboxListTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + list + true + true + + + + listKey + false + true + + + + listValue + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + combobox + org.apache.struts2.views.jsp.ui.ComboBoxTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + emptyOption + false + true + + + + headerKey + false + true + + + + headerValue + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + list + true + true + + + + listKey + false + true + + + + listValue + false + true + + + + maxLength + false + true + + + + maxlength + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + readonly + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + size + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + date + org.apache.struts2.views.jsp.DateTag + empty + + + format + false + false + + + + id + false + true + + + + name + true + true + + + + nice + false + true + + + + + datetimepicker + org.apache.struts2.views.jsp.ui.DateTimePickerTag + JSP + + + accesskey + false + true + + + + adjustWeeks + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + dayWidth + false + true + + + + disabled + false + true + + + + displayFormat + false + true + + + + displayWeeks + false + true + + + + endDate + false + true + + + + formatLength + false + true + + + + iconPath + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + language + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + startDate + false + true + + + + staticDisplay + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateCssPath + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + toggleDuration + false + true + + + + toggleType + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + type + false + true + + + + value + false + true + + + + weekStartsOn + false + true + + + + + debug + org.apache.struts2.views.jsp.ui.DebugTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + div + org.apache.struts2.views.jsp.ui.DivTag + JSP + + + accesskey + false + true + + + + afterLoading + false + true + + + + autoStart + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + delay + false + true + + + + disabled + false + true + + + + errorText + false + true + + + + executeScripts + false + true + + + + formFilter + false + true + + + + formId + false + true + + + + handler + false + true + + + + href + false + true + + + + id + false + true + + + + indicator + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + listenTopics + false + true + + + + loadingText + false + true + + + + name + false + true + + + + notifyTopics + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + openTemplate + false + true + + + + refreshOnShow + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + separateScripts + false + true + + + + showErrorTransportText + false + true + + + + showLoadingText + false + true + + + + startTimerListenTopics + false + true + + + + stopTimerListenTopics + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + updateFreq + false + true + + + + value + false + true + + + + + doubleselect + org.apache.struts2.views.jsp.ui.DoubleSelectTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + doubleAccesskey + false + true + + + + doubleCssClass + false + true + + + + doubleCssStyle + false + true + + + + doubleDisabled + false + true + + + + doubleEmptyOption + false + true + + + + doubleHeaderKey + false + true + + + + doubleHeaderValue + false + true + + + + doubleId + false + true + + + + doubleList + true + true + + + + doubleListKey + false + true + + + + doubleListValue + false + true + + + + doubleMultiple + false + true + + + + doubleName + true + true + + + + doubleOnblur + false + true + + + + doubleOnchange + false + true + + + + doubleOnclick + false + true + + + + doubleOndblclick + false + true + + + + doubleOnfocus + false + true + + + + doubleOnkeydown + false + true + + + + doubleOnkeypress + false + true + + + + doubleOnkeyup + false + true + + + + doubleOnmousedown + false + true + + + + doubleOnmousemove + false + true + + + + doubleOnmouseout + false + true + + + + doubleOnmouseover + false + true + + + + doubleOnmouseup + false + true + + + + doubleOnselect + false + true + + + + doubleSize + false + true + + + + doubleValue + false + true + + + + emptyOption + false + true + + + + formName + false + true + + + + headerKey + false + true + + + + headerValue + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + list + true + true + + + + listKey + false + true + + + + listValue + false + true + + + + multiple + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + size + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + else + org.apache.struts2.views.jsp.ElseTag + JSP + + + id + false + true + + + + + elseif + org.apache.struts2.views.jsp.ElseIfTag + JSP + + + id + false + true + + + + test + true + true + + + + + fielderror + org.apache.struts2.views.jsp.ui.FieldErrorTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + file + org.apache.struts2.views.jsp.ui.FileTag + JSP + + + accept + false + true + + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + size + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + form + org.apache.struts2.views.jsp.ui.FormTag + JSP + + + acceptcharset + false + true + + + + accesskey + false + true + + + + action + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + enctype + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + method + false + true + + + + name + false + true + + + + namespace + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + onsubmit + false + true + + + + openTemplate + false + true + + + + portletMode + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + target + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + validate + false + true + + + + value + false + true + + + + windowState + false + true + + + + + component + org.apache.struts2.views.jsp.ui.ComponentTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + head + org.apache.struts2.views.jsp.ui.HeadTag + empty + + + accesskey + false + true + + + + calendarcss + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + debug + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + hidden + org.apache.struts2.views.jsp.ui.HiddenTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + i18n + org.apache.struts2.views.jsp.I18nTag + JSP + + + id + false + true + + + + name + true + true + + + + + if + org.apache.struts2.views.jsp.IfTag + JSP + + + id + false + true + + + + test + true + true + + + + + include + org.apache.struts2.views.jsp.IncludeTag + JSP + + + id + false + true + + + + value + true + true + + + + + inputtransferselect + org.apache.struts2.views.jsp.ui.InputTransferSelectTag + JSP + + + accesskey + false + true + + + + addLabel + false + true + + + + allowRemoveAll + false + true + + + + allowUpDown + false + true + + + + buttonCssClass + false + true + + + + buttonCssStyle + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + downLabel + false + true + + + + headerKey + false + true + + + + headerValue + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + leftTitle + false + true + + + + list + true + true + + + + listKey + false + true + + + + listValue + false + true + + + + multiple + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + removeAllLabel + false + true + + + + removeLabel + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + rightTitle + false + true + + + + size + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + upLabel + false + true + + + + value + false + true + + + + + iterator + org.apache.struts2.views.jsp.IteratorTag + JSP + + + id + false + true + + + + status + false + true + + + + value + false + true + + + + + label + org.apache.struts2.views.jsp.ui.LabelTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + for + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + merge + org.apache.struts2.views.jsp.iterator.MergeIteratorTag + JSP + + + id + false + true + + + + + optgroup + org.apache.struts2.views.jsp.ui.OptGroupTag + JSP + + + disabled + false + true + + + + id + false + true + + + + label + false + true + + + + list + false + true + + + + listKey + false + true + + + + listValue + false + true + + + + + optiontransferselect + org.apache.struts2.views.jsp.ui.OptionTransferSelectTag + JSP + + + accesskey + false + true + + + + addAllToLeftLabel + false + true + + + + addAllToLeftOnclick + false + true + + + + addAllToRightLabel + false + true + + + + addAllToRightOnclick + false + true + + + + addToLeftLabel + false + true + + + + addToLeftOnclick + false + true + + + + addToRightLabel + false + true + + + + addToRightOnclick + false + true + + + + allowAddAllToLeft + false + true + + + + allowAddAllToRight + false + true + + + + allowAddToLeft + false + true + + + + allowAddToRight + false + true + + + + allowSelectAll + false + true + + + + allowUpDownOnLeft + false + true + + + + allowUpDownOnRight + false + true + + + + buttonCssClass + false + true + + + + buttonCssStyle + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + doubleAccesskey + false + true + + + + doubleCssClass + false + true + + + + doubleCssStyle + false + true + + + + doubleDisabled + false + true + + + + doubleEmptyOption + false + true + + + + doubleHeaderKey + false + true + + + + doubleHeaderValue + false + true + + + + doubleId + false + true + + + + doubleList + true + true + + + + doubleListKey + false + true + + + + doubleListValue + false + true + + + + doubleMultiple + false + true + + + + doubleName + true + true + + + + doubleOnblur + false + true + + + + doubleOnchange + false + true + + + + doubleOnclick + false + true + + + + doubleOndblclick + false + true + + + + doubleOnfocus + false + true + + + + doubleOnkeydown + false + true + + + + doubleOnkeypress + false + true + + + + doubleOnkeyup + false + true + + + + doubleOnmousedown + false + true + + + + doubleOnmousemove + false + true + + + + doubleOnmouseout + false + true + + + + doubleOnmouseover + false + true + + + + doubleOnmouseup + false + true + + + + doubleOnselect + false + true + + + + doubleSize + false + true + + + + doubleValue + false + true + + + + emptyOption + false + true + + + + formName + false + true + + + + headerKey + false + true + + + + headerValue + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + leftDownLabel + false + true + + + + leftTitle + false + true + + + + leftUpLabel + false + true + + + + list + true + true + + + + listKey + false + true + + + + listValue + false + true + + + + multiple + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + rightDownLabel + false + true + + + + rightTitle + false + true + + + + rightUpLabel + false + true + + + + selectAllLabel + false + true + + + + selectAllOnclick + false + true + + + + size + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + upDownOnLeftOnclick + false + true + + + + upDownOnRightOnclick + false + true + + + + value + false + true + + + + + param + org.apache.struts2.views.jsp.ParamTag + JSP + + + id + false + true + + + + name + false + true + + + + value + false + true + + + + + password + org.apache.struts2.views.jsp.ui.PasswordTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + maxLength + false + true + + + + maxlength + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + readonly + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + showPassword + false + true + + + + size + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + property + org.apache.struts2.views.jsp.PropertyTag + empty + + + default + false + true + value attribute is null]]> + + + escape + false + true + + + + id + false + true + + + + value + false + true + + + + + push + org.apache.struts2.views.jsp.PushTag + JSP + + + id + false + true + + + + value + true + true + + + + + radio + org.apache.struts2.views.jsp.ui.RadioTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + list + true + true + + + + listKey + false + true + + + + listValue + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + reset + org.apache.struts2.views.jsp.ui.ResetTag + JSP + + + accesskey + false + true + + + + action + false + true + + + + align + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + input type reset, since button text will always be the value parameter.]]> + + + labelposition + false + true + + + + method + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + type + false + true + input, button and image.]]> + + + value + false + true + + + + + select + org.apache.struts2.views.jsp.ui.SelectTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + emptyOption + false + true + + + + headerKey + false + true + + + + headerValue + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + list + true + true + + + + listKey + false + true + + + + listValue + false + true + + + + multiple + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + size + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + set + org.apache.struts2.views.jsp.SetTag + JSP + + + id + false + true + + + + name + true + true + value]]> + + + scope + false + true + application, session, request, page, or action.]]> + + + value + false + true + name]]> + + + + submit + org.apache.struts2.views.jsp.ui.SubmitTag + JSP + + + accesskey + false + true + + + + action + false + true + + + + align + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + errorText + false + true + + + + executeScripts + false + true + + + + formFilter + false + true + + + + formId + false + true + + + + handler + false + true + + + + href + false + true + + + + id + false + true + + + + indicator + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + listenTopics + false + true + + + + loadingText + false + true + + + + method + false + true + + + + name + false + true + + + + notifyTopics + false + true + + + + onLoadJS + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + preInvokeJS + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + showErrorTransportText + false + true + + + + showLoadingText + false + true + + + + src + false + true + image type submit button. Will have no effect for types input and button.]]> + + + tabindex + false + true + + + + targets + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + This tag will usually use the ajax theme.]]> + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + type + false + true + input, button and image.]]> + + + value + false + true + + + + + tabbedPanel + org.apache.struts2.views.jsp.ui.TabbedPanelTag + JSP + + + accesskey + false + true + + + + closeButton + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + doLayout + false + true + + + + id + true + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + openTemplate + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + selectedTab + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateCssPath + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + text + org.apache.struts2.views.jsp.TextTag + JSP + + + id + false + true + + + + name + true + true + + + + + textarea + org.apache.struts2.views.jsp.ui.TextareaTag + JSP + + + accesskey + false + true + + + + cols + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + readonly + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + rows + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + wrap + false + true + + + + + textfield + org.apache.struts2.views.jsp.ui.TextFieldTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + maxLength + false + true + + + + maxlength + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + readonly + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + size + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + token + org.apache.struts2.views.jsp.ui.TokenTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + tree + org.apache.struts2.views.jsp.ui.TreeTag + JSP + + + accesskey + false + true + + + + blankIconSrc + false + true + + + + childCollectionProperty + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + expandIconSrcMinus + false + true + + + + expandIconSrcPlus + false + true + + + + gridIconSrcC + false + true + + + + gridIconSrcL + false + true + + + + gridIconSrcP + false + true + + + + gridIconSrcV + false + true + + + + gridIconSrcX + false + true + + + + gridIconSrcY + false + true + + + + iconHeight + false + true + + + + iconWidth + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + nodeIdProperty + false + true + + + + nodeTitleProperty + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + openTemplate + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + rootNode + false + true + + + + showGrid + false + true + + + + showRootGrid + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateCssPath + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + toggle + false + true + + + + toggleDuration + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + treeCollapsedTopic + false + true + + + + treeExpandedTopic + false + true + + + + treeSelectedTopic + false + true + + + + value + false + true + + + + + treenode + org.apache.struts2.views.jsp.ui.TreeNodeTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + true + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + openTemplate + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + url + org.apache.struts2.views.jsp.URLTag + JSP + + + action + false + true + + + + anchor + false + true + + + + encode + false + true + + + + id + false + true + + + + includeContext + false + true + + + + includeParams + false + true + + + + method + false + true + + + + namespace + false + true + + + + portletMode + false + true + + + + portletUrlType + false + true + + + + scheme + false + true + + + + value + false + true + + + + windowState + false + true + + + + + updownselect + org.apache.struts2.views.jsp.ui.UpDownSelectTag + JSP + + + accesskey + false + true + + + + allowMoveDown + false + true + + + + allowMoveUp + false + true + + + + allowSelectAll + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + emptyOption + false + true + + + + headerKey + false + true + + + + headerValue + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + list + true + true + + + + listKey + false + true + + + + listValue + false + true + + + + moveDownLabel + false + true + + + + moveUpLabel + false + true + + + + multiple + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + selectAllLabel + false + true + + + + size + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + table + org.apache.struts2.views.jsp.ui.table.WebTableTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + sortColumn + false + true + + + + sortOrder + false + true + + + + sortable + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + + generator + org.apache.struts2.views.jsp.iterator.IteratorGeneratorTag + JSP + + + converter + false + true + val into an object]]> + + + count + false + true + + + + id + false + true + + + + separator + true + true + val into entries of the iterator]]> + + + val + true + true + + + + + sort + org.apache.struts2.views.jsp.iterator.SortIteratorTag + JSP + + + comparator + true + true + + + + id + false + true + + + + source + false + true + + + + + subset + org.apache.struts2.views.jsp.iterator.SubsetIteratorTag + JSP + + + count + false + true + + + + decider + false + true + + + + id + false + true + + + + source + false + true + + + + start + false + true + + + + diff --git a/01/WebRoot/WEB-INF/web.xml b/01/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..4cd1497 --- /dev/null +++ b/01/WebRoot/WEB-INF/web.xml @@ -0,0 +1,22 @@ + + + + + struts2 + org.apache.struts2.dispatcher.FilterDispatcher + + + struts2 + /* + + + + struts2 + /WEB-INF/tld/struts-tags.tld + + + diff --git a/01/WebRoot/css/style.css b/01/WebRoot/css/style.css new file mode 100644 index 0000000..29de292 --- /dev/null +++ b/01/WebRoot/css/style.css @@ -0,0 +1,35 @@ + + \ No newline at end of file diff --git a/01/WebRoot/images/admin_exit.gif b/01/WebRoot/images/admin_exit.gif new file mode 100644 index 0000000..7d7bbad Binary files /dev/null and b/01/WebRoot/images/admin_exit.gif differ diff --git a/01/WebRoot/images/admin_index.gif b/01/WebRoot/images/admin_index.gif new file mode 100644 index 0000000..3b144f3 Binary files /dev/null and b/01/WebRoot/images/admin_index.gif differ diff --git a/01/WebRoot/images/admin_menu.jpg b/01/WebRoot/images/admin_menu.jpg new file mode 100644 index 0000000..c0da332 Binary files /dev/null and b/01/WebRoot/images/admin_menu.jpg differ diff --git a/01/WebRoot/images/admin_top.jpg b/01/WebRoot/images/admin_top.jpg new file mode 100644 index 0000000..6dae04a Binary files /dev/null and b/01/WebRoot/images/admin_top.jpg differ diff --git a/01/WebRoot/images/b_logon.gif b/01/WebRoot/images/b_logon.gif new file mode 100644 index 0000000..49ca21b Binary files /dev/null and b/01/WebRoot/images/b_logon.gif differ diff --git a/01/WebRoot/images/b_reset.gif b/01/WebRoot/images/b_reset.gif new file mode 100644 index 0000000..78e15ef Binary files /dev/null and b/01/WebRoot/images/b_reset.gif differ diff --git a/01/WebRoot/images/back.gif b/01/WebRoot/images/back.gif new file mode 100644 index 0000000..a938531 Binary files /dev/null and b/01/WebRoot/images/back.gif differ diff --git a/01/WebRoot/images/default_e.jpg b/01/WebRoot/images/default_e.jpg new file mode 100644 index 0000000..54ecf5c Binary files /dev/null and b/01/WebRoot/images/default_e.jpg differ diff --git a/01/WebRoot/images/default_m.jpg b/01/WebRoot/images/default_m.jpg new file mode 100644 index 0000000..4fc3475 Binary files /dev/null and b/01/WebRoot/images/default_m.jpg differ diff --git a/01/WebRoot/images/default_t.jpg b/01/WebRoot/images/default_t.jpg new file mode 100644 index 0000000..b435330 Binary files /dev/null and b/01/WebRoot/images/default_t.jpg differ diff --git a/01/WebRoot/images/end.jpg b/01/WebRoot/images/end.jpg new file mode 100644 index 0000000..08ab86f Binary files /dev/null and b/01/WebRoot/images/end.jpg differ diff --git a/01/WebRoot/images/leftD.jpg b/01/WebRoot/images/leftD.jpg new file mode 100644 index 0000000..751a2ef Binary files /dev/null and b/01/WebRoot/images/leftD.jpg differ diff --git a/01/WebRoot/images/leftS.jpg b/01/WebRoot/images/leftS.jpg new file mode 100644 index 0000000..2d25c9f Binary files /dev/null and b/01/WebRoot/images/leftS.jpg differ diff --git a/01/WebRoot/images/logo.gif b/01/WebRoot/images/logo.gif new file mode 100644 index 0000000..1d30a40 Binary files /dev/null and b/01/WebRoot/images/logo.gif differ diff --git a/01/WebRoot/images/logon_end.gif b/01/WebRoot/images/logon_end.gif new file mode 100644 index 0000000..463ba82 Binary files /dev/null and b/01/WebRoot/images/logon_end.gif differ diff --git a/01/WebRoot/images/logon_middle.gif b/01/WebRoot/images/logon_middle.gif new file mode 100644 index 0000000..46eaa60 Binary files /dev/null and b/01/WebRoot/images/logon_middle.gif differ diff --git a/01/WebRoot/images/logon_top.gif b/01/WebRoot/images/logon_top.gif new file mode 100644 index 0000000..3ad7b94 Binary files /dev/null and b/01/WebRoot/images/logon_top.gif differ diff --git a/01/WebRoot/images/m_index.gif b/01/WebRoot/images/m_index.gif new file mode 100644 index 0000000..9afb906 Binary files /dev/null and b/01/WebRoot/images/m_index.gif differ diff --git a/01/WebRoot/images/menu.gif b/01/WebRoot/images/menu.gif new file mode 100644 index 0000000..2f7911f Binary files /dev/null and b/01/WebRoot/images/menu.gif differ diff --git a/01/WebRoot/images/pcard1.jpg b/01/WebRoot/images/pcard1.jpg new file mode 100644 index 0000000..ce4b938 Binary files /dev/null and b/01/WebRoot/images/pcard1.jpg differ diff --git a/01/WebRoot/images/pcard2.jpg b/01/WebRoot/images/pcard2.jpg new file mode 100644 index 0000000..b42518b Binary files /dev/null and b/01/WebRoot/images/pcard2.jpg differ diff --git a/01/WebRoot/index.jsp b/01/WebRoot/index.jsp new file mode 100644 index 0000000..20a377b --- /dev/null +++ b/01/WebRoot/index.jsp @@ -0,0 +1,4 @@ +<%@ page contentType="text/html; charset=gb2312"%> +<% response.sendRedirect("goindex.action"); %> + + diff --git a/01/WebRoot/js/DeleteCheck.js b/01/WebRoot/js/DeleteCheck.js new file mode 100644 index 0000000..242464c --- /dev/null +++ b/01/WebRoot/js/DeleteCheck.js @@ -0,0 +1,3 @@ +function really(){ + return confirm("ȷҪɾϢ"); +} diff --git a/01/WebRoot/js/InputCheck.js b/01/WebRoot/js/InputCheck.js new file mode 100644 index 0000000..f2632bd --- /dev/null +++ b/01/WebRoot/js/InputCheck.js @@ -0,0 +1,12 @@ +function check(fieldName,UseName,RemName,len){ + if(fieldName.value.length>len){ + fieldName.value=(fieldName.value).substring(0,len); + alert("ֻ "+len+" ַ"); + return false; + } + else{ + UseName.value=eval(fieldName.value.length); + RemName.value=len-UseName.value; + return true; + } +} diff --git a/01/WebRoot/pages/add/addInfo.jsp b/01/WebRoot/pages/add/addInfo.jsp new file mode 100644 index 0000000..32998a2 --- /dev/null +++ b/01/WebRoot/pages/add/addInfo.jsp @@ -0,0 +1,82 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="s2" uri="struts2" %> + + + + Ϣ + + + +
    + + + + + + +
    + + + + + + + + + + +
    Ϣ
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ϣ + + [Ϣ಻ó 40 ַ]  
    Ϣ⣺
    Ϣݣ + + ã    + ʣࣺ + + [Ϣ಻ó 500 ַ]  
    ϵ绰 [绰Զŷָ]
    ϵ ˣ
    E - mail
    +
    + + +
    +
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/admin/Login.jsp b/01/WebRoot/pages/admin/Login.jsp new file mode 100644 index 0000000..3cd769b --- /dev/null +++ b/01/WebRoot/pages/admin/Login.jsp @@ -0,0 +1,47 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="s2" uri="/struts-tags" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + Ա¼ + + + + +
    + + + + + + + +
    + + + + + + + + + + + + + + +
    û  
      룺  
    + + + [ҳ] +
    +
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/admin/info/checkshow.jsp b/01/WebRoot/pages/admin/info/checkshow.jsp new file mode 100644 index 0000000..c72ed14 --- /dev/null +++ b/01/WebRoot/pages/admin/info/checkshow.jsp @@ -0,0 +1,66 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="s2" uri="/struts-tags" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + ̨-Ϣ + + + + +
    +
    + + "> + "> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ϣ [IDֵ]
    Ϣϸ
    Ϣ״̬   Ѹ δ
    ʱ䣺״̬   δ
    Ϣ⣺
    Ϣݣ + + + +
    + + + + + + + +
    ϵ绰ϵˣE-mial
    +
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/admin/info/listshow.jsp b/01/WebRoot/pages/admin/info/listshow.jsp new file mode 100644 index 0000000..5ad8992 --- /dev/null +++ b/01/WebRoot/pages/admin/info/listshow.jsp @@ -0,0 +1,58 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="s2" uri="/struts-tags" %> + + + + ̨-鿴Ϣб + + + +
    + + + + + + + + + + + + + + + + + +
    ԲδҵϢ
    [] 
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    ϢIDϢʱ
    ɾ
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/admin/info/moneyshow.jsp b/01/WebRoot/pages/admin/info/moneyshow.jsp new file mode 100644 index 0000000..fe713f8 --- /dev/null +++ b/01/WebRoot/pages/admin/info/moneyshow.jsp @@ -0,0 +1,65 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="s2" uri="/struts-tags" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + ̨- + + + + +
    +
    + + "> + "> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    [IDֵ]
    Ϣϸ
    Ϣ״̬   Ѹ δ
    ʱ䣺״̬   δ
    Ϣ⣺
    Ϣݣ + + + +
    + + + + + + + +
    ϵ绰ϵˣE-mial
    +
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/admin/view/AdminTemp.jsp b/01/WebRoot/pages/admin/view/AdminTemp.jsp new file mode 100644 index 0000000..04f4ac2 --- /dev/null +++ b/01/WebRoot/pages/admin/view/AdminTemp.jsp @@ -0,0 +1,28 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib uri="/struts-tags" prefix="s2"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + Ϣ-̨ + + + + +
    + + + + + + + + + +
    <%@ include file="top.jsp"%>
    <%@ include file="end.jsp" %>
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/admin/view/default.jsp b/01/WebRoot/pages/admin/view/default.jsp new file mode 100644 index 0000000..4af0ee3 --- /dev/null +++ b/01/WebRoot/pages/admin/view/default.jsp @@ -0,0 +1,13 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib uri="/struts-tags" prefix="s2"%> + + +̨ҳ + +
    + + +
    ӭ¼ йϢ̨
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/admin/view/end.jsp b/01/WebRoot/pages/admin/view/end.jsp new file mode 100644 index 0000000..906d692 --- /dev/null +++ b/01/WebRoot/pages/admin/view/end.jsp @@ -0,0 +1,13 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> + + + ҳβ + + +
    + + +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/admin/view/main.jsp b/01/WebRoot/pages/admin/view/main.jsp new file mode 100644 index 0000000..9a47537 --- /dev/null +++ b/01/WebRoot/pages/admin/view/main.jsp @@ -0,0 +1,27 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib uri="/struts-tags" prefix="s2"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; + + String mainPage=(String)request.getAttribute("mainPage"); + if(mainPage==null||mainPage.equals("")) + mainPage="default.jsp"; +%> + + + + ̨ҳ + + + + +
    + + + + +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/admin/view/right.jsp b/01/WebRoot/pages/admin/view/right.jsp new file mode 100644 index 0000000..79e2736 --- /dev/null +++ b/01/WebRoot/pages/admin/view/right.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ page import="java.util.Map,java.util.TreeMap" %> +<%@ taglib prefix="s2" uri="/struts-tags" %> +<% + Map checkState=new TreeMap(); + checkState.put("1",""); + checkState.put("0","δ"); + checkState.put("all","ȫ"); + Map payforState=new TreeMap(); + payforState.put("1","Ѹ"); + payforState.put("0","δ"); + payforState.put("all","ȫ"); + request.setAttribute("checkState",checkState); + request.setAttribute("payforState",payforState); +%> + +̨- + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    ʾʽ
    + + + + + + + + +
    +
    + ︶״̬ +
    + +
    +
    + ״̬ +
    + +
    +
    + Ϣ + + +
    +
    + + + + + +
    ҪΪѸ״̬ϢID
    + + +
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/admin/view/top.jsp b/01/WebRoot/pages/admin/view/top.jsp new file mode 100644 index 0000000..a8362cb --- /dev/null +++ b/01/WebRoot/pages/admin/view/top.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib prefix="s2" uri="/struts-tags" %> + + +̨-ҳü + +
    + + + + +
    + +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/calendar.jsp b/01/WebRoot/pages/calendar.jsp new file mode 100644 index 0000000..d67565a --- /dev/null +++ b/01/WebRoot/pages/calendar.jsp @@ -0,0 +1,78 @@ +<%@ page language="java" contentType="text/html; charset=gb2312" %> +<%@ page language="java" import="java.util.*" %> +<% + String[] weekdays={"","","һ","","","","",""}; + String[] days=new String[42]; + for(int i=0;i<42;i++) + days[i]=""; + + GregorianCalendar currentDay = new GregorianCalendar(); + int year= currentDay.get(Calendar.YEAR); + int month=currentDay.get(Calendar.MONTH); + int today=currentDay.get(Calendar.DAY_OF_MONTH); + int weekday=currentDay.get(Calendar.DAY_OF_WEEK); + + String now=year+""+(month+1)+""+today+""+" "+weekdays[weekday]; + + Calendar thisMonth=Calendar.getInstance(); + thisMonth.set(Calendar.MONTH, month ); + thisMonth.set(Calendar.YEAR, year ); + thisMonth.setFirstDayOfWeek(Calendar.SUNDAY); + thisMonth.set(Calendar.DAY_OF_MONTH,1); + + int firstIndex=thisMonth.get(Calendar.DAY_OF_WEEK)-1; + int maxIndex=thisMonth.getActualMaximum(Calendar.DAY_OF_MONTH); + for(int i=0;i + + + + + + + + + + + + + + + + + + + + + <% for(int j=0;j<6;j++) { %> + + <% + for(int i=j*7;i<(j+1)*7;i++) { + if((i-firstIndex+1)==today){%> + + <% }else{ %> + + <% } + }%> + + <% } %> + +
    <%=now%>
    һ
    <%=days[i]%><%=days[i]%>
    + + diff --git a/01/WebRoot/pages/error.jsp b/01/WebRoot/pages/error.jsp new file mode 100644 index 0000000..466f2db --- /dev/null +++ b/01/WebRoot/pages/error.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib uri="/struts-tags" prefix="s2"%> + + +ʾ + +
    + + + + +
    +
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/page.jsp b/01/WebRoot/pages/page.jsp new file mode 100644 index 0000000..5140dc7 --- /dev/null +++ b/01/WebRoot/pages/page.jsp @@ -0,0 +1,14 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib uri="/struts-tags" prefix="s2"%> + + +ҳ + + + + + + +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/show/listshow.jsp b/01/WebRoot/pages/show/listshow.jsp new file mode 100644 index 0000000..a5024f1 --- /dev/null +++ b/01/WebRoot/pages/show/listshow.jsp @@ -0,0 +1,78 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="s2" uri="/struts-tags" %> + + +鿴Ϣб + +
    + + + + + + + + + + + + + + + +
    ɷѺϢͿʾ
    Ƽɷר
    + + +
    + + + + + + + + + + + + +
    ʱ䣺 
    ϵ绰 ϵ ˣE-mail
    +
    + + + + + + + + + + + + + + + + +
    ʾѷϢ
    ר
    + + +
    + + + + + + + + + + + + +
    ʱ䣺 
    ϵ绰ϵˣE-mail
    +
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/show/searchshow.jsp b/01/WebRoot/pages/show/searchshow.jsp new file mode 100644 index 0000000..455901a --- /dev/null +++ b/01/WebRoot/pages/show/searchshow.jsp @@ -0,0 +1,53 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="s2" uri="/struts-tags" %> + + + + ѯ-鿴Ϣб + + + +
    + + + + + + + + +
    ѯ
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ϢIDֵϢʱϵ
    ԲδҵϢ
    +
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/pages/show/singleshow.jsp b/01/WebRoot/pages/show/singleshow.jsp new file mode 100644 index 0000000..963a1cf --- /dev/null +++ b/01/WebRoot/pages/show/singleshow.jsp @@ -0,0 +1,59 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="s2" uri="/struts-tags" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + Ϣ-鿴ϸ + + + + +
    + + + + + + +
    鿴ϸϢ
    + + + + + + + + + + + + + + + + + + + + + + + +
    鿴Ϣϸݳ
    Ϣ
    ʱ䣺
    Ϣ⣺
    Ϣݣ
    + + + + + + + +
    ϵ绰ϵˣE-mial
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/view/IndexTemp.jsp b/01/WebRoot/view/IndexTemp.jsp new file mode 100644 index 0000000..f9398e6 --- /dev/null +++ b/01/WebRoot/view/IndexTemp.jsp @@ -0,0 +1,30 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib uri="/struts-tags" prefix="s2"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; + + String mainPage=(String)request.getAttribute("mainPage"); + if(mainPage==null||mainPage.equals("")) + mainPage="default.jsp"; +%> + + + + Ϣ + + + + +
    + + + + + + + +
    <%@ include file="end.jsp" %>
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/view/default.jsp b/01/WebRoot/view/default.jsp new file mode 100644 index 0000000..2aef61d --- /dev/null +++ b/01/WebRoot/view/default.jsp @@ -0,0 +1,65 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib uri="/struts-tags" prefix="s2"%> + + +ҳ + +
    + + + + + + + +
    ƼϢɷר
    + + + + + + + + + + + +
    ɷѺϢͿʾ
    +
    + + + +
    + + + + + + + + + + + + + + +
    Ϣר
    ʾѷϢ
    + + + + + + + + + + + + +
    ...  
    +
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/view/end.jsp b/01/WebRoot/view/end.jsp new file mode 100644 index 0000000..906d692 --- /dev/null +++ b/01/WebRoot/view/end.jsp @@ -0,0 +1,13 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> + + + ҳβ + + +
    + + +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/view/left.jsp b/01/WebRoot/view/left.jsp new file mode 100644 index 0000000..3299728 --- /dev/null +++ b/01/WebRoot/view/left.jsp @@ -0,0 +1,65 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ page import="java.util.TreeMap" %> +<%@ taglib prefix="s2" uri="/struts-tags" %> +<% + TreeMap searchType=new TreeMap(); + searchType.put("like","ģ"); + searchType.put("all","ȫƥ"); + request.setAttribute("searchType",searchType); +%> + + + + + + +
    + + + + + + + + + + + + + +
    Ϣ
    + + + + + + + + + + + + + + + + + + +
    ؼ֣
       + +
    ͣ + +
    +
    +
    + + \ No newline at end of file diff --git a/01/WebRoot/view/top.jsp b/01/WebRoot/view/top.jsp new file mode 100644 index 0000000..76f65cb --- /dev/null +++ b/01/WebRoot/view/top.jsp @@ -0,0 +1,50 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib prefix="s2" uri="/struts-tags" %> + + + + + ҳü + + +
    + + + + + + + + + + + +
    + [Ϣ] + [̨] + + Ϊҳ - + ղرҳ - + ϵ +   +
    + + ûϢʾ + + + + + + + + + +
        ҳ
    +
    +
    + + +
    +
    + + \ No newline at end of file diff --git a/01/src/cityinfo.xml b/01/src/cityinfo.xml new file mode 100644 index 0000000..327b61b --- /dev/null +++ b/01/src/cityinfo.xml @@ -0,0 +1,38 @@ + + + + + + + /view/IndexTemp.jsp + + + + /view/IndexTemp.jsp + /view/IndexTemp.jsp + + + + /pages/admin/Login.jsp + /pages/admin/view/AdminTemp.jsp + goindex + + + + /pages/admin/view/AdminTemp.jsp + /pages/admin/view/AdminTemp.jsp + + admin_* + ListShow + + + admin_ListShow.action + + /pages/admin/view/AdminTemp.jsp + /pages/admin/view/AdminTemp.jsp + + + + \ No newline at end of file diff --git a/01/src/com/yxq/action/AdminAction.java b/01/src/com/yxq/action/AdminAction.java new file mode 100644 index 0000000..acb5308 --- /dev/null +++ b/01/src/com/yxq/action/AdminAction.java @@ -0,0 +1,274 @@ +package com.yxq.action; + +import java.util.List; + +import com.yxq.actionSuper.AdminSuperAction; +import com.yxq.dao.OpDB; +import com.yxq.model.CreatePage; + +public class AdminAction extends AdminSuperAction { + + /** ܣԱ-бʾϢ */ + public String ListShow(){ + request.setAttribute("mainPage","../info/listshow.jsp"); + session.remove("adminOP"); + + int infoType=showType.getInfoType(); + String stateType=showType.getStateType(); + String payforType=showType.getPayforType(); + + session.put("infoType",Integer.valueOf(infoType)); //ѡġϢ𡱵ѡ + session.put("payforType",payforType); //ѡġ״̬ѡ + session.put("stateType",stateType); //ѡġ״̬ѡ + + String sqlall=""; + String sqlsub=""; + Object[] params=null; + String mark=""; + int perR=8; + + if(!stateType.equals("all")&&!payforType.equals("all")){ //ûͬʱѡ񡰸״̬롰״̬еġȫѡ + mark="1"; + sqlall="SELECT * FROM tb_info WHERE (info_type=?) AND (info_state=?) AND (info_payfor=?) ORDER BY info_date DESC"; + sqlsub="SELECT TOP "+perR+" * FROM tb_info WHERE (info_type=?) AND (info_state=?) AND (info_payfor=?) ORDER BY info_date DESC"; + params=new Object[3]; + params[0]=Integer.valueOf(infoType); + params[1]=stateType; + params[2]=payforType; + }else if(stateType.equals("all")&&payforType.equals("all")){ //ͬʱѡˡ״̬롰״̬еġȫѡ + mark="2"; + sqlall="SELECT * FROM tb_info WHERE (info_type=?) ORDER BY info_date DESC"; + sqlsub="SELECT TOP "+perR+" * FROM tb_info WHERE (info_type=?) ORDER BY info_date DESC"; + params=new Object[1]; + params[0]=Integer.valueOf(infoType); + }else if(payforType.equals("all")){ //ѡˡ״̬еġȫѡ״̬ѡ + mark="3"; + sqlall="SELECT * FROM tb_info WHERE (info_type=?) AND (info_state=?) ORDER BY info_date DESC"; + sqlsub="SELECT TOP "+perR+" * FROM tb_info WHERE (info_type=?) AND (info_state=?) ORDER BY info_date DESC"; + params=new Object[2]; + params[0]=Integer.valueOf(infoType); + params[1]=stateType; + } + else if(stateType.equals("all")){ //ѡˡ״̬еġȫѡ״̬ѡ + mark="4"; + sqlall="SELECT * FROM tb_info WHERE (info_type=?) AND (info_payfor=?) ORDER BY info_date DESC"; + sqlsub="SELECT TOP "+perR+" * FROM tb_info WHERE (info_type=?) AND (info_payfor=?) ORDER BY info_date DESC"; + params=new Object[2]; + params[0]=Integer.valueOf(infoType); + params[1]=payforType; + } + + String strCurrentP=request.getParameter("showpage"); + String gowhich="admin_ListShow.action"; + + OpDB myOp=new OpDB(); + CreatePage createPage=myOp.OpCreatePage(sqlall, params,perR,strCurrentP,gowhich); //OpDBеOpCreatePage()ܼ¼ҳõǰҳ룬ЩϢװcreatePage + + int currentP=createPage.getCurrentP(); + if(currentP>1){ + int top=(currentP-1)*perR; + if(mark.equals("1")){ + sqlsub="SELECT TOP "+perR+" * FROM tb_info i WHERE (info_type = ?) AND (info_payfor = ?) AND (info_state = ?) AND (info_date < (SELECT MIN(info_date) FROM (SELECT TOP "+top+" (info_date) FROM tb_info WHERE (info_type = i.info_type) AND (info_payfor = i.info_payfor) AND (info_state = i.info_state) ORDER BY info_date DESC) AS mindate)) ORDER BY info_date DESC"; + } + else if(mark.equals("2")){ + sqlsub="SELECT TOP "+perR+" * FROM tb_info i WHERE (info_type = ?) AND (info_date < (SELECT MIN(info_date) FROM (SELECT TOP "+top+" (info_date) FROM tb_info WHERE (info_type = i.info_type) ORDER BY info_date DESC) AS mindate)) ORDER BY info_date DESC"; + } + else if(mark.equals("3")){ + sqlsub="SELECT TOP "+perR+" * FROM tb_info i WHERE (info_type = ?) AND (info_state = ?) AND (info_date < (SELECT MIN(info_date) FROM (SELECT TOP "+top+" (info_date) FROM tb_info WHERE (info_type = i.info_type) AND (info_state = i.info_state) ORDER BY info_date DESC) AS mindate)) ORDER BY info_date DESC"; + } + else if(mark.equals("4")){ + sqlsub="SELECT TOP "+perR+" * FROM tb_info i WHERE (info_type = ?) AND (info_payfor = ?) AND (info_date < (SELECT MIN(info_date) FROM (SELECT TOP "+top+" (info_date) FROM tb_info WHERE (info_type = i.info_type) AND (info_payfor = i.info_payfor) ORDER BY info_date DESC) AS mindate)) ORDER BY info_date DESC"; + } + } + + List adminlistshow=myOp.OpListShow(sqlsub, params); + request.setAttribute("adminlistshow",adminlistshow); + request.setAttribute("createpage",createPage); + return SUCCESS; + } + + + /** ܣԱ-ʾҪ˵Ϣ */ + public String CheckShow(){ + request.setAttribute("mainPage","../info/checkshow.jsp"); + comebackState(); + String sql="SELECT * FROM tb_info WHERE (id = ?)"; + String checkID=request.getParameter("checkID"); + if(checkID==null||checkID.equals("")) + checkID="-1"; + Object[] params={checkID}; + OpDB myOp=new OpDB(); + infoSingle=myOp.OpSingleShow(sql, params); + if(infoSingle==null){ //Ϣ + request.setAttribute("mainPage","/pages/error.jsp"); + addFieldError("AdminShowNoExist",getText("city.singleshow.no.exist")); + } + return SUCCESS; + } + + /** ܣԱ-Ϣ(ݿ) */ + public String Check(){ + session.put("adminOP","Check"); //¼ǰΪϢ + + String checkID=request.getParameter("checkID"); + String sql="UPDATE tb_info SET info_state = 1 WHERE (id = ?)"; + Object[] params={checkID}; + + OpDB myOp=new OpDB(); + int i=myOp.OpUpdate(sql, params); + if(i>0){ //Ϣɹ + return "checkSuccess"; + } + else{ //Ϣʧ + comebackState(); + addFieldError("AdminCheckUnSuccess",getText("city.admin.check.no.success")); + request.setAttribute("mainPage","/pages/error.jsp"); + return "UnSuccess"; + } + } + + /** ܣԱ-ɾϢ(ݿ) */ + public String Delete(){ + session.put("adminOP","Delete"); //¼ǰΪɾϢ + + String deleteID=request.getParameter("deleteID"); + String sql="DELETE tb_info WHERE (id = ?)"; + Object[] params={deleteID}; + + OpDB myOp=new OpDB(); + int i=myOp.OpUpdate(sql, params); + if(i>0){ //ɾϢɹ + return "deleteSuccess"; + } + else{ //ɾϢʧ + comebackState(); + addFieldError("AdminDeleteUnSuccess",getText("city.admin.delete.no.success")); + request.setAttribute("mainPage","/pages/error.jsp"); + return "UnSuccess"; + } + } + + /** ܣԱ-ʾҪиõϢ */ + public String SetMoneyShow(){ + request.setAttribute("mainPage","../info/moneyshow.jsp"); + + String moneyID=request.getParameter("moneyID"); + if(moneyID==null||moneyID.equals("")) + moneyID="-1"; + + String sql="SELECT * FROM tb_info WHERE (id = ?)"; + Object[] params={moneyID}; + + OpDB myOp=new OpDB(); + infoSingle=myOp.OpSingleShow(sql, params); + if(infoSingle==null){ //Ϣ + request.setAttribute("mainPage","/pages/error.jsp"); + addFieldError("AdminShowNoExist",getText("city.singleshow.no.exist")); + } + return SUCCESS; + } + + /** ܣԱ-ѸϢ(ݿ) */ + public String SetMoney(){ + String moneyID=request.getParameter("moneyID"); + if(moneyID==null||moneyID.equals("")) + moneyID="-1"; + String sql="UPDATE tb_info SET info_payfor=1 WHERE (id = ?)"; + Object[] params={Integer.valueOf(moneyID)}; + + OpDB myOp=new OpDB(); + int i=myOp.OpUpdate(sql, params); + if(i>0){ //Ϣóɹ + addFieldError("AdminSetMoneySuccess",getText("city.admin.setmoney.success")); + request.setAttribute("mainPage","/pages/error.jsp"); + return "setMoneySuccess"; + } + else{ //Ϣʧ + addFieldError("AdminSetMoneyUnSuccess",getText("city.admin.setmoney.no.success")); + request.setAttribute("mainPage","/pages/error.jsp"); + return "UnSuccess"; + } + } + + /** ܣ֤-̨бʾϢʱ֤ǷѡһʾʽϢ */ + public void validateListShow(){ + request.setAttribute("mainPage","/pages/error.jsp"); + + String adminOP=(String)session.get("adminOP"); + if(adminOP==null) + adminOP=""; + if(adminOP.equals("Check")||adminOP.equals("Delete")) //ǽˡͨˡɾϢListShow()ʾϢбҪָ֮ǰѡġʾʽ͡Ϣ״̬ӶListShow()вѯļ¼ + comebackState(); + else{ + int getInfoType=showType.getInfoType(); + String getPayforType=showType.getPayforType(); + String getStateType=showType.getStateType(); + + if(getInfoType<=0){ + if(session.get("infoType")!=null){ + getInfoType=(Integer)session.get("infoType"); + showType.setInfoType(getInfoType); + } + } + if(getPayforType==null||getPayforType.equals("")){ + getPayforType=(String)session.get("payforType"); + showType.setPayforType(getPayforType); + } + if(getStateType==null||getStateType.equals("")){ + getStateType=(String)session.get("stateType"); + showType.setStateType(getStateType); + } + + if(getInfoType<=0){ //ûѡϢ + addFieldError("AdminListNoType",getText("city.admin.list.no.infoType")); + } + else{ + if(getPayforType==null||getPayforType.equals("")){ //ûѡ񡰸״̬ѡ + addFieldError("AdminListNoPayForType",getText("city.admin.list.no.payforType")); + } + if(getStateType==null||getStateType.equals("")){ //ûѡ״̬ѡ + addFieldError("AdminListNoStateType",getText("city.admin.list.no.stateType")); + } + } + } + } + + /** ܣ֤-̨Ϣĸòʱ֤ǷϢIDֵIDֵǷΪָʽ */ + public void validateSetMoneyShow() { + request.setAttribute("mainPage","/pages/error.jsp"); + + String moneyID=request.getParameter("moneyID"); + if(moneyID==null||moneyID.equals("")){ //ûϢIDֵ + addFieldError("moneyIDError",getText("city.admin.setMoney.no.moneyID")); + } + else{ //֤ϢIDֵǷΪָʽ + try{ + int id=Integer.parseInt(moneyID); + if(id<0) //IDΪ + addFieldError("moneyIDError",getText("city.admin.setMoney.moneyID.0")); + }catch(NumberFormatException e){ + addFieldError("moneyIDError",getText("city.admin.setMoney.format.moneyID")); + e.printStackTrace(); + } + } + } + + /** ܣָڡʾʽеѡ״̬ */ + private void comebackState(){ + /* ȡsessionбѡ״̬ + * ѡ״̬sessionУ + * ڹԱʾťбʾʱ + * ListShow()ʵֵ + */ + Integer getInfoType=(Integer)session.get("infoType"); + String getPayForType=(String)session.get("payforType"); + String getStateType=(String)session.get("stateType"); + + /* ָѡ״̬ */ + if(getPayForType!=null&&getStateType!=null&&getInfoType!=null){ + showType.setInfoType(getInfoType.intValue()); + showType.setPayforType(getPayForType); + showType.setStateType(getStateType); + } + } +} diff --git a/01/src/com/yxq/action/IndexAction.java b/01/src/com/yxq/action/IndexAction.java new file mode 100644 index 0000000..3775b4e --- /dev/null +++ b/01/src/com/yxq/action/IndexAction.java @@ -0,0 +1,60 @@ +package com.yxq.action; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.TreeMap; + +import com.yxq.actionSuper.MySuperAction; +import com.yxq.dao.OpDB; + +public class IndexAction extends MySuperAction { + public static TreeMap typeMap; + public static TreeMap searchMap; + + public String execute() throws Exception { + /* ѯշϢʱ併 */ + OpDB myOp=new OpDB(); + String sql1="select * from tb_info where (info_state='1') and (info_payfor = '1') order by info_date desc"; + List payforlist=myOp.OpListShow(sql1,null); + request.setAttribute("payforlist",payforlist); + + /* ѯϢʱ併 */ + List allsublist=new ArrayList(); + if(typeMap!=null&&typeMap.size()!=0){ + Iterator itype=typeMap.keySet().iterator(); + String sql2="SELECT TOP 5 * FROM tb_info WHERE (info_type = ?) AND (info_state='1') AND (info_payfor = '0') ORDER BY info_date DESC"; + while(itype.hasNext()){ + Integer sign=(Integer)itype.next(); + Object[] params={sign}; + List onesublist=myOp.OpListShow(sql2, params); + allsublist.add(onesublist); + } + + } + request.setAttribute("allsublist",allsublist); + session.put("typeMap",typeMap); + session.put("searchMap",searchMap); + + return SUCCESS; + } + + static{ + OpDB myOp=new OpDB(); + + /* ȡϢ */ + String sql="select * from tb_type order by type_sign"; + typeMap=myOp.OpGetListBox(sql,null); + if(typeMap==null) + typeMap=new TreeMap(); + + /* ʼܵб */ + searchMap=new TreeMap(); + searchMap.put("IDֵ","id"); + searchMap.put("Ϣ","info_title"); + searchMap.put("Ϣ","info_content"); + searchMap.put("ϵ","info_linkman"); + searchMap.put("ϵ绰","info_phone"); + searchMap.put("E-mailַ","info_email"); + } +} diff --git a/01/src/com/yxq/action/InfoAction.java b/01/src/com/yxq/action/InfoAction.java new file mode 100644 index 0000000..57e1cdd --- /dev/null +++ b/01/src/com/yxq/action/InfoAction.java @@ -0,0 +1,289 @@ +package com.yxq.action; + +import java.io.UnsupportedEncodingException; +import java.util.List; + +import com.yxq.actionSuper.InfoSuperAction; +import com.yxq.dao.OpDB; +import com.yxq.model.CreatePage; +import com.yxq.tools.DoString; + +public class InfoAction extends InfoSuperAction { + public String ListShow(){ + request.setAttribute("mainPage","/pages/show/listshow.jsp"); + + String infoType=request.getParameter("infoType"); + Object[] params={infoType}; + String sqlPayfor="SELECT * FROM tb_info WHERE (info_type = ?) AND (info_state='1') AND (info_payfor = '1') ORDER BY info_date DESC"; + + OpDB myOp=new OpDB(); + + /* ȡеĸϢ */ + List onepayforlist=myOp.OpListShow(sqlPayfor, params); //ȡиϢ + request.setAttribute("onepayforlist",onepayforlist); + + /* ȡǰҳҪʾϢ */ + String sqlFreeAll="SELECT * FROM tb_info WHERE (info_type = ?) AND (info_state='1') AND (info_payfor = '0') ORDER BY info_date DESC"; + String sqlFreeSub=""; + int perR=3; + String strCurrentP=request.getParameter("showpage"); + String gowhich="info_ListShow.action?infoType="+infoType; + CreatePage createPage=myOp.OpCreatePage(sqlFreeAll, params,perR,strCurrentP,gowhich); //OpDBеOpCreatePage()ܼ¼ҳõǰҳ룬ЩϢװcreatePage + + int top1=createPage.getPerR(); + int currentP=createPage.getCurrentP(); + if(currentP==1){ //ʾ1ҳϢSQL + sqlFreeSub="SELECT TOP "+top1+" * FROM tb_info WHERE (info_type = ?) AND (info_state = '1') AND (info_payfor = '0') ORDER BY info_date DESC"; + } + else{ //ʾ1ҳ⣬ָҳϢSQl + int top2=(currentP-1)*top1; + sqlFreeSub="SELECT TOP "+top1+" * FROM tb_info i WHERE (info_type = ?) AND (info_state = '1') AND (info_payfor = '0') AND (info_date < (SELECT MIN(info_date) FROM (SELECT TOP "+top2+" (info_date) FROM tb_info WHERE (info_type = i.info_type) AND (info_state = '1') AND (info_payfor = '0') ORDER BY info_date DESC) AS mindate)) ORDER BY info_date DESC"; +// sqlFreeSub="SELECT TOP "+top1+" * FROM tb_info i WHERE (info_type = ?) AND (info_state = '1') AND (info_payfor = '0') AND (info_date NOT IN (SELECT TOP "+top2+" info_date FROM tb_info WHERE (info_type = i.info_type) AND (info_state = '1') AND (info_payfor = '0') ORDER BY info_date DESC)) ORDER BY info_date DESC"; //һʵַҳѯSQL + } + + List onefreelist=myOp.OpListShow(sqlFreeSub, params); //ȡϢϢcreatePage.setPerR(int PerR)ָ + request.setAttribute("onefreelist",onefreelist); + request.setAttribute("createpage", createPage); + + return SUCCESS; + } + + public String SingleShow(){ + request.setAttribute("mainPage","/pages/show/singleshow.jsp"); + + String id=request.getParameter("id"); + String sql="SELECT * FROM tb_info WHERE (id = ?)"; + Object[] params={id}; + + OpDB myOp=new OpDB(); + infoSingle=myOp.OpSingleShow(sql, params); + if(infoSingle==null){ + request.setAttribute("mainPage","/pages/error.jsp"); + addFieldError("SingleShowNoExist",getText("city.singleshow.no.exist")); + } + return SUCCESS; + } + + public String Add(){ + System.out.println("ִAdd()"); + String addType=request.getParameter("addType"); + if(addType==null||addType.equals("")){ + request.setAttribute("mainPage","/pages/add/addInfo.jsp"); + addType="linkTo"; + } + if(addType.equals("add")){ + request.setAttribute("mainPage","/pages/error.jsp"); + OpDB myOp=new OpDB(); + Integer type=Integer.valueOf(infoSingle.getInfoType()); + String title=infoSingle.getInfoTitle(); + String content=DoString.HTMLChange(infoSingle.getInfoContent()); + String phone=infoSingle.getInfoPhone(); + phone=phone.replaceAll(",",""); + + String linkman=infoSingle.getInfoLinkman(); + String email=infoSingle.getInfoEmail(); + String date=DoString.dateTimeChange(new java.util.Date()); + String state="0"; + String payfor="0"; + + Object[] params={type,title,content,linkman,phone,email,date,state,payfor}; + String sql="insert into tb_info values(?,?,?,?,?,?,?,?,?)"; + + int i=myOp.OpUpdate(sql,params); + if(i<=0) + addFieldError("addE",getText("city.info.add.E")); + else{ + sql="select * from tb_info where info_date=?"; + Object[] params1={date}; + int infoNum=myOp.OpSingleShow(sql, params1).getId(); + addFieldError("addS",getText("city.info.add.S")+infoNum); + } + } + return SUCCESS; + } + + public String SearchShow() throws UnsupportedEncodingException{ + request.setAttribute("mainPage","/pages/show/searchshow.jsp"); + + String subsql=searchInfo.getSubsql(); + String sqlvalue=searchInfo.getSqlvalue(); + String type=searchInfo.getType(); + + String showType=request.getParameter("showType"); + if(showType==null) + showType=""; + if(showType.equals("link")){ //ԴӳлȡIJת + try { + sqlvalue=new String(sqlvalue.getBytes("ISO-8859-1"),"gb2312"); + } catch (UnsupportedEncodingException e) { + sqlvalue=""; + e.printStackTrace(); + } + searchInfo.setSqlvalue(sqlvalue); + } + + session.put("subsql",subsql); + session.put("sqlvalue",sqlvalue); + session.put("type",type); + + String param=""; + String opname=""; + if(type.equals("like")){ + opname=" LIKE "; + param="%"+sqlvalue+"%"; + } + else{ + opname=" = "; + param=sqlvalue; + } + + String sqlSearchAll="SELECT * FROM tb_info WHERE ("+subsql+opname+"?) ORDER BY info_date DESC"; + String sqlSearchSub=""; + Object[] params={param}; + + int perR=8; + String strCurrentP=request.getParameter("showpage"); + String gowhich = "info_SearchShow.action?searchInfo.subsql="+subsql+"&searchInfo.sqlvalue="+sqlvalue+"&searchInfo.type="+type+"&showType=link"; + + OpDB myOp=new OpDB(); + CreatePage createPage=myOp.OpCreatePage(sqlSearchAll, params,perR,strCurrentP,gowhich); //OpDBеOpCreatePage()ܼ¼ҳõǰҳ룬ЩϢװcreatePage + + int top1=createPage.getPerR(); + int currentP=createPage.getCurrentP(); + + if(currentP==1){ //ʾ1ҳϢSQL + sqlSearchSub="SELECT TOP "+top1+" * FROM tb_info WHERE ("+subsql+opname+"?) ORDER BY info_date DESC"; + } + else{ //ʾ1ҳ⣬ָҳϢSQl + int top2=(currentP-1)*top1; + sqlSearchSub="SELECT TOP "+top1+" * FROM tb_info WHERE ("+subsql+opname+"?) AND (info_date < (SELECT MIN(info_date) FROM (SELECT TOP "+top2+" info_date FROM tb_info WHERE "+subsql+opname+"'"+param+"' ORDER BY info_date DESC) AS mindate)) ORDER BY info_date DESC"; +// sqlSearchSub="SELECT TOP "+top1+" * FROM tb_info WHERE ("+subsql+opname+"?) AND (info_date NOT IN (SELECT TOP "+top2+" info_date FROM tb_info WHERE "+subsql+opname+"'"+param+"' ORDER BY info_date DESC)) ORDER BY info_date DESC"; //һʵַҳѯSQL + } + + List searchlist=myOp.OpListShow(sqlSearchSub, params); + request.setAttribute("searchlist",searchlist); + request.setAttribute("createpage", createPage); + + return SUCCESS; + } + + public void validateListShow(){ + request.setAttribute("mainPage","/pages/error.jsp"); + + String infoType=request.getParameter("infoType"); + if(infoType==null&&infoType.equals("")){ + System.out.println("ѡҪѯϢ"); + addFieldError("ListShowNoType",getText("city.info.listshow.no.infoType")); + } + else{ + try{ + Integer.parseInt(infoType); + }catch(NumberFormatException e){ + System.out.println("Ϣָʽ"); + addFieldError("ListShowWrongType",getText("city.info.listshow.format.infoType")); + e.printStackTrace(); + } + } + } + + public void validateSingleShow(){ + request.setAttribute("mainPage","/pages/error.jsp"); + + String id=request.getParameter("id"); + if(id==null&&id.equals("")){ + System.out.println("ѡҪ鿴Ϣ"); + addFieldError("SingleShowNoID",getText("city.info.singleshow.no.id")); + } + else{ + try{ + Integer.parseInt(id); + }catch(NumberFormatException e){ + System.out.println("ϢIDֵָʽ"); + addFieldError("ListShowWrongID",getText("city.info.listshow.format.infoID")); + e.printStackTrace(); + } + } + } + + public void validateAdd(){ + System.out.println("ִvalidateAdd()"); + request.setAttribute("mainPage","/pages/add/addInfo.jsp"); + + String addType=request.getParameter("addType"); + if(addType==null||addType.equals("")) + addType="linkTo"; + + if(addType.equals("add")){ + int type=infoSingle.getInfoType(); + String title=infoSingle.getInfoTitle(); + String content=infoSingle.getInfoContent(); + String phone=infoSingle.getInfoPhone(); + String linkman=infoSingle.getInfoLinkman(); + String email=infoSingle.getInfoEmail(); + + boolean mark=true; + if(type<=0){ + mark=false; + addFieldError("typeError",getText("city.info.no.infoType")); + } + if(title==null||title.equals("")){ + mark=false; + addFieldError("titleError",getText("city.info.no.infoTitle")); + } + if(content==null||content.equals("")){ + mark=false; + addFieldError("contentError",getText("city.info.no.infoContent")); + } + if(phone==null||phone.equals("")){ + mark=false; + addFieldError("phoneError",getText("city.info.no.infoPhone")); + } + if(linkman==null||linkman.equals("")){ + mark=false; + addFieldError("linkmanError",getText("city.info.no.infoLinkman")); + } + if(email==null||email.equals("")){ + mark=false; + addFieldError("emailError",getText("city.info.no.infoEmail")); + } + if(mark){ + String phoneRegex="(\\d{3}-)\\d{8}|(\\d{4}-)(\\d{7}|\\d{8})|\\d{11}"; + if(phone.indexOf(",")<0){ + if(!infoSingle.getInfoPhone().matches(phoneRegex)){ + addFieldError("phoneError",getText("city.info.format.infoPhone")); + } + } + else{ + String[] phones=phone.split(","); + for(int i=0;i\u4fe1\u606f\u7c7b\u522b\uff01 +city.info.no.infoTitle=\u8bf7\u8f93\u5165 \u4fe1\u606f\u6807\u9898\uff01 +city.info.no.infoContent=\u8bf7\u8f93\u5165 \u4fe1\u606f\u5185\u5bb9\uff01 +city.info.no.infoPhone=\u8bf7\u8f93\u5165 \u8054\u7cfb\u7535\u8bdd\uff01 +city.info.no.infoLinkman=\u8bf7\u8f93\u5165 \u8054\u7cfb\u4eba\uff01 +city.info.no.infoEmail=\u8bf7\u8f93\u5165 E-mail\u5730\u5740\uff01 +city.info.format.infoPhone=\u8f93\u5165\u7684 \u8054\u7cfb\u65b9\u5f0f \u683c\u5f0f\u4e0d\u6b63\u786e\uff01 +city.info.format.infoEmail=\u8f93\u5165\u7684 E-mail\u5730\u5740\u683c\u5f0f \u4e0d\u6b63\u786e\uff01 +city.info.add.E=\u53d1\u5e03\u4fe1\u606f\u5931\u8d25\uff01 +city.info.add.S=
  • \u4fe1\u606f\u53d1\u5e03\u6210\u529f\uff01\u9700\u8981\u7ba1\u7406\u5458\u8fdb\u884c\u5ba1\u6838\uff01
  • \u8bf7\u8bb0\u4f4f\u63d0\u4f9b\u7ed9\u60a8\u7684ID\uff0c\u4ee5\u4fbf\u65e5\u540e\u8fdb\u884c\u4ed8\u8d39\u64cd\u4f5c\uff01

  • \u4fe1\u606fID\uff1a + +city.login.no.name=\u8bf7\u8f93\u5165 \u7528\u6237\u540d\uff01 +city.login.no.password=\u8bf7\u8f93\u5165 \u5bc6  \u7801\uff01 +city.login.wrong.input=\u8f93\u5165\u7684 \u7528\u6237\u540d \u6216 \u5bc6\u7801 \u4e0d\u6b63\u786e\uff01 + +city.info.listshow.no.infoType=\u8bf7\u9009\u62e9\u8981\u67e5\u770b\u7684\u7c7b\u522b\uff01 +city.info.listshow.format.infoType=\u4fe1\u606f\u7c7b\u522b\u4e0d\u662f\u6570\u5b57\u683c\u5f0f\uff01 +city.info.singleshow.no.id=\u8bf7\u9009\u62e9\u8981\u67e5\u770b\u8be6\u7ec6\u5185\u5bb9\u7684\u4fe1\u606f\uff01 +city.info.listshow.format.infoID=\u4fe1\u606fID\u503c\u4e0d\u662f\u6570\u5b57\u683c\u5f0f\uff01 + +city.admin.list.no.infoType=\u8bf7\u9009\u62e9\u4e00\u79cd \u4fe1\u606f\u7c7b\u522b\uff01 +city.admin.list.no.payforType=\u8bf7\u9009\u62e9\u4e00\u79cd \u4ed8\u8d39\u72b6\u6001 \u9009\u9879\uff01 +city.admin.list.no.stateType=\u8bf7\u9009\u62e9\u4e00\u79cd \u5ba1\u6838\u72b6\u6001 \u9009\u9879\uff01 + +city.admin.setMoney.no.moneyID=\u8bf7\u8f93\u5165 \u4fe1\u606fID\u503c\uff01 +city.admin.setMoney.format.moneyID=\u8f93\u5165\u7684 \u4fe1\u606fID\u503c \u5fc5\u987b\u4e3a\u6570\u5b57\u683c\u5f0f\uff01 +city.admin.setMoney.moneyID.0=\u8f93\u5165\u7684 \u4fe1\u606fID\u503c \u5fc5\u987b\u5927\u4e8e0\uff01 + +city.admin.check.no.success=\u5ba1\u6838\u4fe1\u606f\u5931\u8d25\uff01 +city.admin.delete.no.success=\u5220\u9664\u4fe1\u606f\u5931\u8d25\uff01 +city.admin.setmoney.success=\u4ed8\u8d39\u8bbe\u7f6e\u6210\u529f\uff01 +city.admin.setmoney.no.success=\u4ed8\u8d39\u8bbe\u7f6e\u5931\u8d25\uff01 + +city.singleshow.no.exist=\u8981\u67e5\u770b\u7684\u4fe1\u606f\u4e0d\u5b58\u5728\uff01 + +city.info.search.no.condition=\u8bf7\u8f93\u5165 \u67e5\u8be2\u6761\u4ef6\uff01 +city.info.search.no.value=\u8bf7\u8f93\u5165 \u67e5\u8be2\u5173\u952e\u5b57\uff01 +city.info.search.no.type=\u8bf7\u8f93\u5165 \u641c\u7d22\u7c7b\u522b\uff01 \ No newline at end of file diff --git a/01/src/com/yxq/actionSuper/AdminSuperAction.java b/01/src/com/yxq/actionSuper/AdminSuperAction.java new file mode 100644 index 0000000..55e0bc1 --- /dev/null +++ b/01/src/com/yxq/actionSuper/AdminSuperAction.java @@ -0,0 +1,30 @@ +package com.yxq.actionSuper; + +import com.yxq.model.AdminShowType; +import com.yxq.model.InfoSingle; + +public class AdminSuperAction extends MySuperAction{ + protected AdminShowType showType; + protected InfoSingle infoSingle; + + public AdminSuperAction(){ + + showType=new AdminShowType(); + infoSingle=new InfoSingle(); + } + public AdminShowType getShowType() { + return showType; + } + + public void setShowType(AdminShowType showType) { + this.showType = showType; + } + + public InfoSingle getInfoSingle() { + return infoSingle; + } + + public void setInfoSingle(InfoSingle infoSingle) { + this.infoSingle = infoSingle; + } +} diff --git a/01/src/com/yxq/actionSuper/InfoSuperAction.java b/01/src/com/yxq/actionSuper/InfoSuperAction.java new file mode 100644 index 0000000..b77ed08 --- /dev/null +++ b/01/src/com/yxq/actionSuper/InfoSuperAction.java @@ -0,0 +1,22 @@ +package com.yxq.actionSuper; + +import com.yxq.model.InfoSingle; +import com.yxq.model.SearchInfo; + +public class InfoSuperAction extends MySuperAction { + protected InfoSingle infoSingle; + protected SearchInfo searchInfo; + + public InfoSingle getInfoSingle() { + return infoSingle; + } + public void setInfoSingle(InfoSingle infoSingle) { + this.infoSingle = infoSingle; + } + public SearchInfo getSearchInfo() { + return searchInfo; + } + public void setSearchInfo(SearchInfo searchInfo) { + this.searchInfo = searchInfo; + } +} diff --git a/01/src/com/yxq/actionSuper/MySuperAction.java b/01/src/com/yxq/actionSuper/MySuperAction.java new file mode 100644 index 0000000..98387ad --- /dev/null +++ b/01/src/com/yxq/actionSuper/MySuperAction.java @@ -0,0 +1,28 @@ +package com.yxq.actionSuper; + +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.interceptor.ServletRequestAware; +import org.apache.struts2.interceptor.ServletResponseAware; +import org.apache.struts2.interceptor.SessionAware; + +import com.opensymphony.xwork2.ActionSupport; + +public class MySuperAction extends ActionSupport implements SessionAware,ServletRequestAware,ServletResponseAware { + protected HttpServletRequest request; + protected HttpServletResponse response; + protected Map session; + + public void setSession(Map session) { + this.session=session; + } + public void setServletRequest(HttpServletRequest request) { + this.request=request; + } + public void setServletResponse(HttpServletResponse response) { + this.response=response; + } +} diff --git a/01/src/com/yxq/dao/DB.java b/01/src/com/yxq/dao/DB.java new file mode 100644 index 0000000..195d3de --- /dev/null +++ b/01/src/com/yxq/dao/DB.java @@ -0,0 +1,83 @@ +package com.yxq.dao; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +public class DB { + private Connection con; + private PreparedStatement pstm; + private String user="sa"; + private String password=""; + private String className="com.microsoft.jdbc.sqlserver.SQLServerDriver"; + private String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=db_CityInfo"; + + public DB(){ + try{ + Class.forName(className); + }catch(ClassNotFoundException e){ + System.out.println("ݿʧܣ"); + e.printStackTrace(); + } + } + + /**ݿ*/ + public Connection getCon(){ + try { + con=DriverManager.getConnection(url,user,password); + } catch (SQLException e) { + System.out.println("ݿʧܣ"); + con=null; + e.printStackTrace(); + } + return con; + } + + public void doPstm(String sql,Object[] params){ + if(sql!=null&&!sql.equals("")){ + if(params==null) + params=new Object[0]; + + getCon(); + if(con!=null){ + try{ + System.out.println(sql); + pstm=con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); + for(int i=0;iAllP) + CurrentP=AllP; + } + + /** ÷ҳ״̬ʾϢ */ + public void setPageInfo(){ + if(AllP>1){ + PageInfo="
    "; + PageInfo+="ÿҳʾ"+PerR+"/"+AllR+" ¼"; + PageInfo+="ǰҳ"+CurrentP+"/"+AllP+" ҳ"; + PageInfo+="
    "; + } + } + + /** ÷ҳϢ */ + public void setPageLink(String gowhich){ + if(gowhich==null) + gowhich=""; + if(gowhich.indexOf("?")>=0) + gowhich+="&"; + else + gowhich+="?"; + if(AllP>1){ + PageLink="
    "; + if(CurrentP>1){ + PageLink+="ҳ "; + PageLink+="һҳ "; + } + if(CurrentPһҳ "; + PageLink+="βҳ"; + } + PageLink+="
    "; + } + } + + /** ÿҳ¼ */ + public int getPerR(){ + return PerR; + } + + /** ܼ¼ */ + public int getAllR() { + return AllR; + } + + /** ҳ */ + public int getAllP() { + return AllP; + } + + /** صǰҳ */ + public int getCurrentP() { + return CurrentP; + } + + /** طҳ״̬ʾϢ */ + public String getPageInfo(){ + return PageInfo; + } + + /** طҳϢ */ + public String getPageLink(){ + return PageLink; + } +} diff --git a/01/src/com/yxq/model/InfoSingle.java b/01/src/com/yxq/model/InfoSingle.java new file mode 100644 index 0000000..7b48302 --- /dev/null +++ b/01/src/com/yxq/model/InfoSingle.java @@ -0,0 +1,80 @@ +package com.yxq.model; + +public class InfoSingle { + private int id; + private int infoType; + private String infoTitle; + private String infoContent; + private String infoLinkman; + private String infoPhone; + private String infoEmail; + private String infoDate; + private String infoState; + private String infoPayfor; + + public int getId() { + return this.id; + } + public void setId(int id) { + this.id = id; + } + public String getInfoContent() { + return infoContent; + } + public void setInfoContent(String infoContent) { + this.infoContent = infoContent; + } + public String getInfoDate() { + return infoDate; + } + public void setInfoDate(String infoDate) { + this.infoDate = infoDate; + } + public String getInfoLinkman() { + return infoLinkman; + } + public void setInfoLinkman(String infoLinkman) { + this.infoLinkman = infoLinkman; + } + public String getInfoPayfor() { + return infoPayfor; + } + public void setInfoPayfor(String infoPayfor) { + this.infoPayfor = infoPayfor; + } + public String getInfoPhone() { + return infoPhone; + } + public void setInfoPhone(String infoPhone) { + this.infoPhone=infoPhone; + } + public String getInfoEmail() { + return infoEmail; + } + public void setInfoEmail(String infoEmail) { + this.infoEmail = infoEmail; + } + public String getInfoState() { + return infoState; + } + public void setInfoState(String infoState) { + this.infoState = infoState; + } + public String getInfoTitle() { + return infoTitle; + } + public void setInfoTitle(String infoTitle) { + this.infoTitle = infoTitle; + } + public int getInfoType() { + return infoType; + } + public void setInfoType(int infoType) { + this.infoType = infoType; + } + public String getSubInfoTitle(int len){ + if(len<=0||len>this.infoTitle.length()) + len=this.infoTitle.length(); + return this.infoTitle.substring(0,len); + } +} diff --git a/01/src/com/yxq/model/SearchInfo.java b/01/src/com/yxq/model/SearchInfo.java new file mode 100644 index 0000000..254ade7 --- /dev/null +++ b/01/src/com/yxq/model/SearchInfo.java @@ -0,0 +1,26 @@ +package com.yxq.model; + +public class SearchInfo { + private String subsql; + private String sqlvalue; + private String type="all"; + + public String getSqlvalue() { + return sqlvalue; + } + public void setSqlvalue(String sqlvalue) { + this.sqlvalue = sqlvalue; + } + public String getSubsql() { + return subsql; + } + public void setSubsql(String subsql) { + this.subsql = subsql; + } + public String getType() { + return type; + } + public void setType(String type) { + this.type = type; + } +} diff --git a/01/src/com/yxq/model/UserSingle.java b/01/src/com/yxq/model/UserSingle.java new file mode 100644 index 0000000..18761ba --- /dev/null +++ b/01/src/com/yxq/model/UserSingle.java @@ -0,0 +1,19 @@ +package com.yxq.model; + +public class UserSingle{ + private String userName; + private String userPassword; + + public String getUserName() { + return userName; + } + public void setUserName(String userName) { + this.userName = userName; + } + public String getUserPassword() { + return userPassword; + } + public void setUserPassword(String userPassword) { + this.userPassword = userPassword; + } +} diff --git a/01/src/com/yxq/tools/DoString.java b/01/src/com/yxq/tools/DoString.java new file mode 100644 index 0000000..5f78920 --- /dev/null +++ b/01/src/com/yxq/tools/DoString.java @@ -0,0 +1,21 @@ +package com.yxq.tools; + +import java.text.SimpleDateFormat; +import java.util.Date; + +public class DoString { + public static String HTMLChange(String source){ + String changeStr=""; + changeStr=source.replaceAll("&","&"); + changeStr=changeStr.replaceAll(" "," "); + changeStr=changeStr.replaceAll("<","<"); + changeStr=changeStr.replaceAll(">",">"); + changeStr=changeStr.replaceAll("\r\n","
    "); + return changeStr; + } + public static String dateTimeChange(Date source){ + SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String changeTime=format.format(source); + return changeTime; + } +} diff --git a/01/src/struts.properties b/01/src/struts.properties new file mode 100644 index 0000000..34c2ab4 --- /dev/null +++ b/01/src/struts.properties @@ -0,0 +1 @@ +struts.i18n.encoding=gb2312 \ No newline at end of file diff --git a/01/src/struts.xml b/01/src/struts.xml new file mode 100644 index 0000000..a997c0b --- /dev/null +++ b/01/src/struts.xml @@ -0,0 +1,7 @@ + + + + + diff --git "a/01/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/01/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..53afdac Binary files /dev/null and "b/01/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/02/.classpath b/02/.classpath new file mode 100644 index 0000000..35504c6 --- /dev/null +++ b/02/.classpath @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/02/.mymetadata b/02/.mymetadata new file mode 100644 index 0000000..5c4c238 --- /dev/null +++ b/02/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/02/.project b/02/.project new file mode 100644 index 0000000..ae22d0e --- /dev/null +++ b/02/.project @@ -0,0 +1,50 @@ + + + 02 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/02/.settings/.jsdtscope b/02/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/02/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/02/.settings/org.eclipse.core.resources.prefs b/02/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..f71ce83 --- /dev/null +++ b/02/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +#Mon Feb 14 14:39:45 GMT+08:00 2011 +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/02/.settings/org.eclipse.wst.jsdt.ui.superType.container b/02/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/02/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/02/.settings/org.eclipse.wst.jsdt.ui.superType.name b/02/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/02/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/02/WebRoot/Database/db_wlgl.sql b/02/WebRoot/Database/db_wlgl.sql new file mode 100644 index 0000000..47c53e5 --- /dev/null +++ b/02/WebRoot/Database/db_wlgl.sql @@ -0,0 +1,169 @@ +-- MySQL Administrator dump 1.4 +-- +-- ------------------------------------------------------ +-- Server version 5.1.40-community + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + + +-- +-- Create schema db_wlgl +-- + +CREATE DATABASE IF NOT EXISTS db_wlgl; +USE db_wlgl; + +-- +-- Definition of table `tb_admin` +-- + +DROP TABLE IF EXISTS `tb_admin`; +CREATE TABLE `tb_admin` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `admin_user` varchar(50) NOT NULL, + `admin_password` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=gb2312; + +-- +-- Dumping data for table `tb_admin` +-- + +/*!40000 ALTER TABLE `tb_admin` DISABLE KEYS */; +INSERT INTO `tb_admin` (`id`,`admin_user`,`admin_password`) VALUES + (1,'mr','mrsoft'); +/*!40000 ALTER TABLE `tb_admin` ENABLE KEYS */; + + +-- +-- Definition of table `tb_car` +-- + +DROP TABLE IF EXISTS `tb_car`; +CREATE TABLE `tb_car` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `username` varchar(50) NOT NULL, + `user_number` varchar(50) NOT NULL, + `car_number` varchar(50) NOT NULL, + `tel` varchar(50) NOT NULL, + `address` varchar(80) NOT NULL, + `car_road` varchar(50) NOT NULL, + `car_content` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=gb2312; + +-- +-- Dumping data for table `tb_car` +-- + +/*!40000 ALTER TABLE `tb_car` DISABLE KEYS */; +INSERT INTO `tb_car` (`id`,`username`,`user_number`,`car_number`,`tel`,`address`,`car_road`,`car_content`) VALUES + (11,'小三','333333333333333','33333','84978981','长春市','长春――上海','无'), + (9,'小一','111111111111111','11111','84978981','长春市','长春――哈尔滨','没有了'), + (10,'小二','222222222222222','22222','84978981','长春市','长春――辽宁','无'); +/*!40000 ALTER TABLE `tb_car` ENABLE KEYS */; + + +-- +-- Definition of table `tb_carlog` +-- + +DROP TABLE IF EXISTS `tb_carlog`; +CREATE TABLE `tb_carlog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `goods_id` varchar(255) NOT NULL, + `car_id` int(11) NOT NULL, + `startTime` varchar(255) NOT NULL, + `endTime` varchar(255) NOT NULL, + `describer` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=gb2312; + +-- +-- Dumping data for table `tb_carlog` +-- + +/*!40000 ALTER TABLE `tb_carlog` DISABLE KEYS */; +INSERT INTO `tb_carlog` (`id`,`goods_id`,`car_id`,`startTime`,`endTime`,`describer`) VALUES + (15,'1305783681593',10,'2011-05-19','2011-05-19','没有'), + (17,'1305783758281',11,'2011-5-19','2011-5-19','无'); +/*!40000 ALTER TABLE `tb_carlog` ENABLE KEYS */; + + +-- +-- Definition of table `tb_customer` +-- + +DROP TABLE IF EXISTS `tb_customer`; +CREATE TABLE `tb_customer` ( + `customer_id` int(10) NOT NULL AUTO_INCREMENT, + `customer_user` varchar(50) NOT NULL, + `customer_tel` varchar(50) NOT NULL, + `customer_address` varchar(80) NOT NULL, + PRIMARY KEY (`customer_id`) +) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=gb2312; + +-- +-- Dumping data for table `tb_customer` +-- + +/*!40000 ALTER TABLE `tb_customer` DISABLE KEYS */; +INSERT INTO `tb_customer` (`customer_id`,`customer_user`,`customer_tel`,`customer_address`) VALUES + (1,'张一','0431-12345678','长春市'), + (3,'张三','0431-98765432','长春市'), + (4,'张四','0431-36925810','吉林市'), + (5,'张五','0432-12345678','吉林市'), + (6,'张六','0433-45612378','白山市'), + (7,'张七','0434-56666233','四平市'), + (8,'张八','0431-46454541','长春市'), + (9,'张九','0431-78787888','长春市'), + (10,'张十','0431-33333333','长春市'), + (11,'张零','0431-12345678','九台市'); +/*!40000 ALTER TABLE `tb_customer` ENABLE KEYS */; + + +-- +-- Definition of table `tb_operationgoods` +-- + +DROP TABLE IF EXISTS `tb_operationgoods`; +CREATE TABLE `tb_operationgoods` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `car_id` int(11) NOT NULL, + `customer_id` int(11) NOT NULL, + `goods_id` varchar(255) NOT NULL, + `goods_name` varchar(255) NOT NULL, + `goods_tel` varchar(255) NOT NULL, + `goods_address` varchar(255) NOT NULL, + `goods_sure` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=gb2312; + +-- +-- Dumping data for table `tb_operationgoods` +-- + +/*!40000 ALTER TABLE `tb_operationgoods` DISABLE KEYS */; +INSERT INTO `tb_operationgoods` (`id`,`car_id`,`customer_id`,`goods_id`,`goods_name`,`goods_tel`,`goods_address`,`goods_sure`) VALUES + (15,10,11,'1305783681593','一一','4564','吉林',1), + (17,11,11,'1305783758281','三三','7474','辽宁',1); +/*!40000 ALTER TABLE `tb_operationgoods` ENABLE KEYS */; + + + + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/02/WebRoot/META-INF/MANIFEST.MF b/02/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/02/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/02/WebRoot/WEB-INF/classes/com/dao/AdminDao.class b/02/WebRoot/WEB-INF/classes/com/dao/AdminDao.class new file mode 100644 index 0000000..51bbdf7 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/dao/AdminDao.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/dao/CarDao.class b/02/WebRoot/WEB-INF/classes/com/dao/CarDao.class new file mode 100644 index 0000000..c20fa97 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/dao/CarDao.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/dao/CustomerDao.class b/02/WebRoot/WEB-INF/classes/com/dao/CustomerDao.class new file mode 100644 index 0000000..6a83d53 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/dao/CustomerDao.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/dao/GoodsAndLogDao.class b/02/WebRoot/WEB-INF/classes/com/dao/GoodsAndLogDao.class new file mode 100644 index 0000000..da4c356 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/dao/GoodsAndLogDao.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/form/AdminForm.class b/02/WebRoot/WEB-INF/classes/com/form/AdminForm.class new file mode 100644 index 0000000..262411e Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/form/AdminForm.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/form/CarForm.class b/02/WebRoot/WEB-INF/classes/com/form/CarForm.class new file mode 100644 index 0000000..a7f6d07 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/form/CarForm.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/form/CustomerForm.class b/02/WebRoot/WEB-INF/classes/com/form/CustomerForm.class new file mode 100644 index 0000000..9897233 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/form/CustomerForm.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/form/GoodsForm.class b/02/WebRoot/WEB-INF/classes/com/form/GoodsForm.class new file mode 100644 index 0000000..caf814a Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/form/GoodsForm.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/form/LogForm.class b/02/WebRoot/WEB-INF/classes/com/form/LogForm.class new file mode 100644 index 0000000..9ba08df Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/form/LogForm.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/tools/CurrentTime.class b/02/WebRoot/WEB-INF/classes/com/tools/CurrentTime.class new file mode 100644 index 0000000..1f40168 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/tools/CurrentTime.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/tools/JDBConnection.class b/02/WebRoot/WEB-INF/classes/com/tools/JDBConnection.class new file mode 100644 index 0000000..94fa575 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/tools/JDBConnection.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/tools/MyPagination.class b/02/WebRoot/WEB-INF/classes/com/tools/MyPagination.class new file mode 100644 index 0000000..8054967 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/tools/MyPagination.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/tools/MySuperAction.class b/02/WebRoot/WEB-INF/classes/com/tools/MySuperAction.class new file mode 100644 index 0000000..d4f05f9 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/tools/MySuperAction.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/webtier/AdminAction.class b/02/WebRoot/WEB-INF/classes/com/webtier/AdminAction.class new file mode 100644 index 0000000..67c2405 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/webtier/AdminAction.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/webtier/CarAction.class b/02/WebRoot/WEB-INF/classes/com/webtier/CarAction.class new file mode 100644 index 0000000..3a7ff8a Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/webtier/CarAction.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/webtier/CarAction.properties b/02/WebRoot/WEB-INF/classes/com/webtier/CarAction.properties new file mode 100644 index 0000000..06b4a14 --- /dev/null +++ b/02/WebRoot/WEB-INF/classes/com/webtier/CarAction.properties @@ -0,0 +1,2 @@ +invalid.fieldvalue.tel= +invalid.fieldvalue.user_number= \ No newline at end of file diff --git a/02/WebRoot/WEB-INF/classes/com/webtier/CustomerAction.class b/02/WebRoot/WEB-INF/classes/com/webtier/CustomerAction.class new file mode 100644 index 0000000..6a66fad Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/webtier/CustomerAction.class differ diff --git a/02/WebRoot/WEB-INF/classes/com/webtier/GoodsAction.class b/02/WebRoot/WEB-INF/classes/com/webtier/GoodsAction.class new file mode 100644 index 0000000..5693685 Binary files /dev/null and b/02/WebRoot/WEB-INF/classes/com/webtier/GoodsAction.class differ diff --git a/02/WebRoot/WEB-INF/classes/struts.properties b/02/WebRoot/WEB-INF/classes/struts.properties new file mode 100644 index 0000000..51b82fb --- /dev/null +++ b/02/WebRoot/WEB-INF/classes/struts.properties @@ -0,0 +1,10 @@ +struts.ui.theme=simple +struts.i18n.encoding=gb2312 + + + + + + + + diff --git a/02/WebRoot/WEB-INF/classes/struts.xml b/02/WebRoot/WEB-INF/classes/struts.xml new file mode 100644 index 0000000..d048465 --- /dev/null +++ b/02/WebRoot/WEB-INF/classes/struts.xml @@ -0,0 +1,28 @@ + + + + + + /admin_{1}.jsp + /admin_{1}.jsp + + + /car_{1}.jsp + /car_{1}.jsp + car_queryCarList.action + + + /customer_{1}.jsp + customer_queryCustomerList.action + customer_queryCustomerList.action + + + /goods_{1}.jsp + goods_queryGoodsList.action + + + + + diff --git a/02/WebRoot/WEB-INF/classes/template/simple/actionerror.ftl b/02/WebRoot/WEB-INF/classes/template/simple/actionerror.ftl new file mode 100644 index 0000000..ca34904 --- /dev/null +++ b/02/WebRoot/WEB-INF/classes/template/simple/actionerror.ftl @@ -0,0 +1,5 @@ +<#if (actionErrors?exists && actionErrors?size > 0)> +<#list actionErrors as error> +${error} + + \ No newline at end of file diff --git a/02/WebRoot/WEB-INF/classes/template/simple/fielderror.ftl b/02/WebRoot/WEB-INF/classes/template/simple/fielderror.ftl new file mode 100644 index 0000000..9d23ca1 --- /dev/null +++ b/02/WebRoot/WEB-INF/classes/template/simple/fielderror.ftl @@ -0,0 +1,52 @@ +<#if fieldErrors?exists><#t/> +<#assign eKeys = fieldErrors.keySet()><#t/> +<#assign eKeysSize = eKeys.size()><#t/> +<#assign doneStartUlTag=false><#t/> +<#assign doneEndUlTag=false><#t/> +<#assign haveMatchedErrorField=false><#t/> +<#if (fieldErrorFieldNames?size > 0) ><#t/> + <#list fieldErrorFieldNames as fieldErrorFieldName><#t/> + <#list eKeys as eKey><#t/> + <#if (eKey = fieldErrorFieldName)><#t/> + <#assign haveMatchedErrorField=true><#t/> + <#assign eValue = fieldErrors[fieldErrorFieldName]><#t/> + <#if (haveMatchedErrorField && (!doneStartUlTag))><#t/> + + +<#assign doneStartUlTag=true><#t/> +<#t/> +<#list eValue as eEachValue><#t/> + ${eEachValue} +<#t/> +<#t/> +<#t/> +<#t/> + + + + + + + + + <#if (haveMatchedErrorField && (!doneEndUlTag))><#t/> + <#assign doneEndUlTag=true><#t/> + <#t/> +<#else><#t/> + <#if (eKeysSize > 0)><#t/> + + + + <#list eKeys as eKey><#t/> + <#assign eValue = fieldErrors[eKey]><#t/> + <#list eValue as eEachValue><#t/> + ${eEachValue} + <#t/> + <#t/> + + + + + <#t/> +<#t/> +<#t/> \ No newline at end of file diff --git a/02/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar b/02/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar new file mode 100644 index 0000000..b73a80f Binary files /dev/null and b/02/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar differ diff --git a/02/WebRoot/WEB-INF/lib/freemarker-2.3.8.jar b/02/WebRoot/WEB-INF/lib/freemarker-2.3.8.jar new file mode 100644 index 0000000..737bfb5 Binary files /dev/null and b/02/WebRoot/WEB-INF/lib/freemarker-2.3.8.jar differ diff --git a/02/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar b/02/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar new file mode 100644 index 0000000..0539039 Binary files /dev/null and b/02/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar differ diff --git a/02/WebRoot/WEB-INF/lib/ognl-2.6.11.jar b/02/WebRoot/WEB-INF/lib/ognl-2.6.11.jar new file mode 100644 index 0000000..19cd379 Binary files /dev/null and b/02/WebRoot/WEB-INF/lib/ognl-2.6.11.jar differ diff --git a/02/WebRoot/WEB-INF/lib/struts2-core-2.0.11.jar b/02/WebRoot/WEB-INF/lib/struts2-core-2.0.11.jar new file mode 100644 index 0000000..f00d162 Binary files /dev/null and b/02/WebRoot/WEB-INF/lib/struts2-core-2.0.11.jar differ diff --git a/02/WebRoot/WEB-INF/lib/xwork-2.0.4.jar b/02/WebRoot/WEB-INF/lib/xwork-2.0.4.jar new file mode 100644 index 0000000..a7d763d Binary files /dev/null and b/02/WebRoot/WEB-INF/lib/xwork-2.0.4.jar differ diff --git a/02/WebRoot/WEB-INF/web.xml b/02/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..f957533 --- /dev/null +++ b/02/WebRoot/WEB-INF/web.xml @@ -0,0 +1,18 @@ + + + struts text + + struts2 + org.apache.struts2.dispatcher.FilterDispatcher + + + struts2 + /* + + + admin_index.jsp + + \ No newline at end of file diff --git a/02/WebRoot/admin_index.jsp b/02/WebRoot/admin_index.jsp new file mode 100644 index 0000000..226931c --- /dev/null +++ b/02/WebRoot/admin_index.jsp @@ -0,0 +1,98 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + + + + + + + + + + + +
      
    + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + +
    û
      룺
    + +     + +
      + +
    + + + + + +
    + + + + + + + + + + <% +if(null!=session.getAttribute("admin_user")){ + out.print(""); +} +%> +
    + + + diff --git a/02/WebRoot/admin_loginout.jsp b/02/WebRoot/admin_loginout.jsp new file mode 100644 index 0000000..3bb79af --- /dev/null +++ b/02/WebRoot/admin_loginout.jsp @@ -0,0 +1,18 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +ޱĵ + + + +<% + + session.invalidate(); + response.sendRedirect("admin_index.jsp"); +%> + + + + + diff --git a/02/WebRoot/admin_updatePassword.jsp b/02/WebRoot/admin_updatePassword.jsp new file mode 100644 index 0000000..9cb894e --- /dev/null +++ b/02/WebRoot/admin_updatePassword.jsp @@ -0,0 +1,85 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + +޸ĹԱ + + +<% +String admin=(String)session.getAttribute("admin_user"); +%> + + + + + + + + + + + +
      + + + + +
    ǰλã ޸ĹԱ
    + + + + + + + + + + + + + + + + + + +
    ԭ  룺
      룺
    ȷϣ
      
    +
    + + <% + if(request.getAttribute("editPassword")!=null){ + String editPassword=(String)request.getAttribute("editPassword"); + out.print(""); + } + %> + + + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + diff --git a/02/WebRoot/car_insertCar.jsp b/02/WebRoot/car_insertCar.jsp new file mode 100644 index 0000000..b29425a --- /dev/null +++ b/02/WebRoot/car_insertCar.jsp @@ -0,0 +1,92 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib prefix="s" uri="/struts-tags"%> + + +--ԴϢ + + + + + + + + + + + + + + +
      + + + + +
    ǰλãԴϢ  >>  ӳԴϢ
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    ֤ţ
        ַ
      ţ
        
    ·ߣ
      
    +
    + + + + + + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + diff --git a/02/WebRoot/car_queryCarForm.jsp b/02/WebRoot/car_queryCarForm.jsp new file mode 100644 index 0000000..16debae --- /dev/null +++ b/02/WebRoot/car_queryCarForm.jsp @@ -0,0 +1,99 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib prefix="s" uri="/struts-tags"%> + + +--ԴϢ + + + + + + + + + + + + + + + + + + +
      + + + + +
    ǰλãԴϢ  >>  ޸ijԴϢ
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    ֤ţ
        ַ
      ţ
        
    ·ߣ
      
    +
    + + + + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/02/WebRoot/car_queryCarList.jsp b/02/WebRoot/car_queryCarList.jsp new file mode 100644 index 0000000..a615f20 --- /dev/null +++ b/02/WebRoot/car_queryCarList.jsp @@ -0,0 +1,121 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + +ԴϢ + + + + + +<% +String str=(String)request.getParameter("Page"); +int Page=1; +List list=null; +if(str==null){ + list=(List)request.getAttribute("list"); + int pagesize=4; //ָÿҳʾļ¼ + list=pagination.getInitPage(list,Page,pagesize); //ʼҳϢ +}else{ + Page=pagination.getPage(str); + list=pagination.getAppointPage(Page); //ȡָҳ +} +request.setAttribute("list1",list); +%> + + + + + + + + + + + + + + +
      + + + + +
    ǰλãԴϢ
    + + +
    + ĿǰûгϢ + + + + + + +
        ӳϢ   
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ƺַ֤
    ·
    ޸   ɾ
    + + + + + +

    +
    + + + + + + + + + + + + + +
        ӳԴϢ<%=pagination.printCtrl(Page) %>
    +
    + +
    + + + +
    + + + diff --git a/02/WebRoot/css/style.css b/02/WebRoot/css/style.css new file mode 100644 index 0000000..68c8d12 --- /dev/null +++ b/02/WebRoot/css/style.css @@ -0,0 +1,192 @@ + + \ No newline at end of file diff --git a/02/WebRoot/customer_queryCustomerList.jsp b/02/WebRoot/customer_queryCustomerList.jsp new file mode 100644 index 0000000..9b5644c --- /dev/null +++ b/02/WebRoot/customer_queryCustomerList.jsp @@ -0,0 +1,111 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + +--̶ͻ + + + +<% +String str=(String)request.getParameter("Page"); +int Page=1; +List list=null; +if(str==null){ + list=(List)request.getAttribute("list"); + int pagesize=10; //ָÿҳʾļ¼ + list=pagination.getInitPage(list,Page,pagesize); //ʼҳϢ +}else{ + Page=pagination.getPage(str); + list=pagination.getAppointPage(Page); //ȡָҳ +} +request.setAttribute("list1",list); +%> + + + + + + + + + + + + + + + + +
      + + + + +
    ǰλã̶ͻ
    + +
    + Ŀǰûй̶ͻϢ

    +
    + + + + + + + + + + + + + + + + +
    ͻͻͻ绰ͻַ
    ɾ
    + + +
    +
    <%=pagination.printCtrl(Page)%>
    +
    +
    + + + + + + +

    + + + + + + + + + + + + + + + +
    ͻͻ绰
    ͻַ  


    + + + + + +
    + + + +
    + + + + + diff --git a/02/WebRoot/goods_changeOperation.jsp b/02/WebRoot/goods_changeOperation.jsp new file mode 100644 index 0000000..0bb4fa4 --- /dev/null +++ b/02/WebRoot/goods_changeOperation.jsp @@ -0,0 +1,23 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +ޱĵ + + + + +<% +String goods_id=(String)request.getAttribute("goods_id"); + +out.print(""); + +%> + + + + + + + + diff --git a/02/WebRoot/goods_insertGoods.jsp b/02/WebRoot/goods_insertGoods.jsp new file mode 100644 index 0000000..fbbc7f8 --- /dev/null +++ b/02/WebRoot/goods_insertGoods.jsp @@ -0,0 +1,216 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@page import="com.form.CarForm"%> + + +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + + + + + + +<% + +request.setCharacterEncoding("gb2312"); + +String car_number=null; +if(request.getParameter("car_number")!=null){ + car_number=request.getParameter("car_number"); + car_number=new String(car_number.getBytes("ISO8859_1"), "gb2312"); +} +if(request.getParameter("car_id")!=null){ + request.setAttribute("car_id",request.getParameter("car_id")); +} + + + + +request.setAttribute("carList",carDao.queryCarList("1")); +request.setAttribute("customerList",customerDao.queryCustomerList()); +request.setAttribute("autoNumber",currentTime.autoNumber()); +%> + + + + + + + + + +
      + + + + +
    ǰλã
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + <%if(car_number==null) {%> + ѡ + <%}else{ %> + ƺ룺 + <%} %> + + <%if(car_number==null) {%> + + <%}else{ out.print(car_number); %> + + + <%}%> + + + + ͻ
    ţջ
    ջ˵绰ջ˵ַ
    ʱ䣺ջʱ䣺
    Ϣ
        + + + + +
    +
    + + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/02/WebRoot/goods_queryCar.jsp b/02/WebRoot/goods_queryCar.jsp new file mode 100644 index 0000000..80a4d57 --- /dev/null +++ b/02/WebRoot/goods_queryCar.jsp @@ -0,0 +1,103 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@page import="com.form.LogForm"%> + + +<%@ taglib prefix="s" uri="/struts-tags"%> + + + +ԴϢѯ + + + +<% +String str=(String)request.getParameter("Page"); +int Page=1; +List list=null; +if(str==null){ + list=(List)request.getAttribute("list"); + int pagesize=5; //ָÿҳʾļ¼ + list=pagination.getInitPage(list,Page,pagesize); //ʼҳϢ +}else{ + Page=pagination.getPage(str); + list=pagination.getAppointPage(Page); //ȡָҳ +} +request.setAttribute("list1",list); +%> + + + + + + + + + + + + + +
      + + + + +
    ǰλãҳ >> ԴϢѯ
    + + + + + + + + + + + + + + + + + + + + + + +
    ƺ·ʹ־Ƿʹ
    + <% + Integer car= (Integer)request.getAttribute("car_id"); + LogForm logForm=goodsAndLogDao.queryCarLogForm(car); + System.out.println("ddddddddd "+(logForm==null)); + if(logForm!=null){ + out.print("ʱ䣺"+logForm.getStartTime()+"
    "); + out.print("ջʱ䣺"+logForm.getEndTime()+"
    "); + }else{ + out.print(" "); + } + %> +
    + <% + String information="Ѿʹ"; + + if(logForm==null){ + information="δʹ"; + } + out.print(information); + + %> +
    + + <%=pagination.printCtrl(Page)%> + + + +
    + + + +
    + + + diff --git a/02/WebRoot/goods_queryGoodsId.jsp b/02/WebRoot/goods_queryGoodsId.jsp new file mode 100644 index 0000000..780193e --- /dev/null +++ b/02/WebRoot/goods_queryGoodsId.jsp @@ -0,0 +1,160 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@page import="com.form.GoodsForm"%> +<%@page import="com.form.CarForm"%> +<%@page import="com.form.CustomerForm"%> +<%@page import="com.form.LogForm"%> + +<%@ taglib prefix="s" uri="/struts-tags"%> + + + +ִȷ + + + + + + + + + + + + + + + + +
      + + + + +
    ǰλãҳ >> ִȷ
    + + + + + + + +
    ţ
    +
    + + + <%if(request.getAttribute("goodsForm")!=null){ + GoodsForm goodsForm=(GoodsForm)request.getAttribute("goodsForm"); + CarForm carForm=carDao.queryCarForm(goodsForm.getCar_id()); + CustomerForm customerForm=customerDao.queryCustomerForm(Integer.valueOf(goodsForm.customer_id)); + LogForm logForm=goodsAndLogDao.queryCarLogForm(Integer.valueOf(goodsForm.getCar_id())); + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%if(logForm!=null){ %> + + + + + + + + + + + + + + + + <%}else{ %> + + + + <%} %> + +
    <%=carForm.getUsername()%>ƺ룺<%=carForm.getCar_number()%>
    ַ<%=carForm.getAddress()%><%=carForm.getTel()%>
    ·ߣ<%=carForm.getCar_road()%>
    <%=customerForm.getCustomer_user()%>˵绰<%=customerForm.getCustomer_tel()%>
    ˵ַ<%=customerForm.getCustomer_address()%>
    ջ<%=goodsForm.getGoods_name()%>ջ˵绰<%=goodsForm.getGoods_tel()%>
    ջ˵ַ<%=goodsForm.getGoods_address()%>
    ʱ䣺<%=logForm.getStartTime()%>ջʱ䣺<%=logForm.getEndTime()%>
    ţ<%=logForm.getGoods_id()%><%=logForm.getDescribe()%>
    Ѿȷ
    +
    + <%} %> + + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/02/WebRoot/goods_queryGoodsList.jsp b/02/WebRoot/goods_queryGoodsList.jsp new file mode 100644 index 0000000..33e9c00 --- /dev/null +++ b/02/WebRoot/goods_queryGoodsList.jsp @@ -0,0 +1,158 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@page import="com.form.GoodsForm"%> +<%@page import="com.form.CarForm"%> +<%@page import="com.form.CustomerForm"%> +<%@page import="com.form.LogForm"%> +<%@page import="java.util.List"%> + + +<%@ taglib prefix="s" uri="/struts-tags"%> + + + +ѯ + + + + + + + + + + + + + + + + + + +
      + + + + +
    ǰλãҳ >> ѯ
    +<% +String str=(String)request.getParameter("Page"); +int Page=1; +List list=null; +if(str==null){ + list=(List)request.getAttribute("list"); + System.out.println("ssssss "+list.size()); + int pagesize=2; //ָÿҳʾļ¼ + list=pagination.getInitPage(list,Page,pagesize); //ʼҳϢ +}else{ + Page=pagination.getPage(str); + list=pagination.getAppointPage(Page); //ȡָҳ +} + + + + +for(int i=0;i + +<%if(carForm==null){out.print("óѾԱɾ
    ");}else{ %> + + + + + + + + + + + + + + + + +
    ƺ
    ַ
    ·
    <%=carForm.getUsername()%>
    <%=carForm.getCar_number()%>
    <%=carForm.getAddress()%>
    <%=carForm.getTel()%>
    <%=carForm.getCar_road()%>
    +<%} %> + +<%if(customerForm==null){out.print("ÿͻѾԱɾ
    ");}else{ %> + + + + + + + + + + + + +
    ˵绰
    ˵ַ
    <%=customerForm.getCustomer_user()%>
    <%=customerForm.getCustomer_tel()%>
    <%=customerForm.getCustomer_address()%>
    +<%} %> + + + + + + + + + + + + + +
    ջ
    ջ˵绰
    ջ˵ַ
    <%=goodsForm.getGoods_id()%>
    <%=goodsForm.getGoods_name()%>
    <%=goodsForm.getGoods_tel()%>
    <%=goodsForm.getGoods_address()%>
    + <% + if(goodsForm.getGoods_sure().equals("0")){ + %> + + + + + +
    Ѿȷ
    + <%}else{ %> + + + + + + + + + + + +
    ʱ
    ջʱ
    <%=logForm.getStartTime()%>
    <%=logForm.getEndTime()%>
    <%=logForm.getDescribe()%>
    + + <%} %> +
    + <%}%> + <%=pagination.printCtrl(Page)%> +
    + + + +
    + + + diff --git a/02/WebRoot/images/Thumbs.db b/02/WebRoot/images/Thumbs.db new file mode 100644 index 0000000..0035606 Binary files /dev/null and b/02/WebRoot/images/Thumbs.db differ diff --git a/02/WebRoot/images/btn.swf b/02/WebRoot/images/btn.swf new file mode 100644 index 0000000..40315d9 Binary files /dev/null and b/02/WebRoot/images/btn.swf differ diff --git a/02/WebRoot/images/land.gif b/02/WebRoot/images/land.gif new file mode 100644 index 0000000..7008efb Binary files /dev/null and b/02/WebRoot/images/land.gif differ diff --git a/02/WebRoot/images/logistics_01.jpg b/02/WebRoot/images/logistics_01.jpg new file mode 100644 index 0000000..c33efed Binary files /dev/null and b/02/WebRoot/images/logistics_01.jpg differ diff --git a/02/WebRoot/images/logistics_04.jpg b/02/WebRoot/images/logistics_04.jpg new file mode 100644 index 0000000..691c928 Binary files /dev/null and b/02/WebRoot/images/logistics_04.jpg differ diff --git a/02/WebRoot/images/logistics_05.jpg b/02/WebRoot/images/logistics_05.jpg new file mode 100644 index 0000000..e155b29 Binary files /dev/null and b/02/WebRoot/images/logistics_05.jpg differ diff --git a/02/WebRoot/images/logistics_06.jpg b/02/WebRoot/images/logistics_06.jpg new file mode 100644 index 0000000..ce4f02e Binary files /dev/null and b/02/WebRoot/images/logistics_06.jpg differ diff --git a/02/WebRoot/images/logistics_07.jpg b/02/WebRoot/images/logistics_07.jpg new file mode 100644 index 0000000..6dc8ca0 Binary files /dev/null and b/02/WebRoot/images/logistics_07.jpg differ diff --git a/02/WebRoot/images/logistics_08.jpg b/02/WebRoot/images/logistics_08.jpg new file mode 100644 index 0000000..2181ae5 Binary files /dev/null and b/02/WebRoot/images/logistics_08.jpg differ diff --git a/02/WebRoot/images/logistics_09.jpg b/02/WebRoot/images/logistics_09.jpg new file mode 100644 index 0000000..cabce88 Binary files /dev/null and b/02/WebRoot/images/logistics_09.jpg differ diff --git a/02/WebRoot/images/logistics_10.jpg b/02/WebRoot/images/logistics_10.jpg new file mode 100644 index 0000000..4219a3c Binary files /dev/null and b/02/WebRoot/images/logistics_10.jpg differ diff --git a/02/WebRoot/images/logistics_11.jpg b/02/WebRoot/images/logistics_11.jpg new file mode 100644 index 0000000..50d90bd Binary files /dev/null and b/02/WebRoot/images/logistics_11.jpg differ diff --git a/02/WebRoot/images/logistics_12.jpg b/02/WebRoot/images/logistics_12.jpg new file mode 100644 index 0000000..7782113 Binary files /dev/null and b/02/WebRoot/images/logistics_12.jpg differ diff --git a/02/WebRoot/images/logistics_13.jpg b/02/WebRoot/images/logistics_13.jpg new file mode 100644 index 0000000..d85cce4 Binary files /dev/null and b/02/WebRoot/images/logistics_13.jpg differ diff --git a/02/WebRoot/images/logistics_14.jpg b/02/WebRoot/images/logistics_14.jpg new file mode 100644 index 0000000..840ed0c Binary files /dev/null and b/02/WebRoot/images/logistics_14.jpg differ diff --git a/02/WebRoot/images/logistics_flow.jpg b/02/WebRoot/images/logistics_flow.jpg new file mode 100644 index 0000000..d61c871 Binary files /dev/null and b/02/WebRoot/images/logistics_flow.jpg differ diff --git a/02/WebRoot/images/reset.gif b/02/WebRoot/images/reset.gif new file mode 100644 index 0000000..390768c Binary files /dev/null and b/02/WebRoot/images/reset.gif differ diff --git a/02/WebRoot/images/sign.gif b/02/WebRoot/images/sign.gif new file mode 100644 index 0000000..920b7e2 Binary files /dev/null and b/02/WebRoot/images/sign.gif differ diff --git a/02/WebRoot/images/url.txt b/02/WebRoot/images/url.txt new file mode 100644 index 0000000..8669c16 --- /dev/null +++ b/02/WebRoot/images/url.txt @@ -0,0 +1,4 @@ +&fahuodan=goods_insertGoods.jsp& +&cheyuan=car_queryCarList.action& +&huizhi=car_queryCarList.action& +&chaxun=car_queryCarList.action& diff --git a/02/WebRoot/index.jsp b/02/WebRoot/index.jsp new file mode 100644 index 0000000..d871e53 --- /dev/null +++ b/02/WebRoot/index.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + My JSP 'index.jsp' starting page + + + + + + + + + + This is my JSP page.
    + + diff --git a/02/WebRoot/mainPage.jsp b/02/WebRoot/mainPage.jsp new file mode 100644 index 0000000..b7cc4c7 --- /dev/null +++ b/02/WebRoot/mainPage.jsp @@ -0,0 +1,62 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<%@ taglib prefix="s" uri="/struts-tags"%> + + + +ҳ + + + + + + + + + + + + +
      + + + + +
    ǰλãҳ >>
    + + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/02/WebRoot/main_down.jsp b/02/WebRoot/main_down.jsp new file mode 100644 index 0000000..7cfb17c --- /dev/null +++ b/02/WebRoot/main_down.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + + + +
    + + + + + +
     © Ȩ2008 ʡտƼ޹˾ | ϵ | ʿ |
    diff --git a/02/WebRoot/main_right.jsp b/02/WebRoot/main_right.jsp new file mode 100644 index 0000000..2f2a579 --- /dev/null +++ b/02/WebRoot/main_right.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + +
    + + + + + +
    diff --git a/02/WebRoot/main_top.jsp b/02/WebRoot/main_top.jsp new file mode 100644 index 0000000..5a1867e --- /dev/null +++ b/02/WebRoot/main_top.jsp @@ -0,0 +1,42 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + + + + +
    + + + +
    ޸ | ҳ | ˳ϵͳ
     
    + + + + + + +
    + + + + + +
    <%=currentTime.currentlyTime()%>̶ͻԴϢ
    + +<% + if (null == session.getAttribute("admin_user")) { + + out.print(""); + + } +%> + + + + + + + diff --git a/02/src/com/dao/AdminDao.java b/02/src/com/dao/AdminDao.java new file mode 100644 index 0000000..8e160c0 --- /dev/null +++ b/02/src/com/dao/AdminDao.java @@ -0,0 +1,37 @@ +package com.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import com.form.AdminForm; +import com.tools.JDBConnection; + +public class AdminDao { + public JDBConnection connection = null; + + public AdminDao() { + connection = new JDBConnection(); + } + + // 根据用户名查看密码信息 + public String getAdminPassword(String admin_user) { + String admin_password = ""; + String sql = "select * from tb_admin where admin_user='" + admin_user + + "'"; + ResultSet rs = connection.executeQuery(sql); + try { + while (rs.next()) { + admin_password = rs.getString("admin_password"); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return admin_password; + } + + // 修改管理员密码操作 + public boolean operationAdmin(String sql) { + return connection.executeUpdate(sql); + } + +} diff --git a/02/src/com/dao/CarDao.java b/02/src/com/dao/CarDao.java new file mode 100644 index 0000000..75aa407 --- /dev/null +++ b/02/src/com/dao/CarDao.java @@ -0,0 +1,79 @@ +package com.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.*; + +import com.form.CarForm; +import com.tools.JDBConnection; + +public class CarDao { + + private JDBConnection connection = null; + + public CarDao() { + connection = new JDBConnection(); + } + + public boolean operationCar(String sql) { + return connection.executeUpdate(sql); + } + + + + public List queryCarList(String sign) { + List list = new ArrayList(); + CarForm carForm = null; + String sql=null; + if(sign==null){ + sql = "select * from tb_car order by id desc"; + }else{ + + sql = "select * from tb_car where id not in (select car_id from tb_carlog)"; + + } + + ResultSet rs = connection.executeQuery(sql); + try { + while (rs.next()) { + carForm = new CarForm(); + carForm.setId(rs.getInt(1)); + carForm.setUsername(rs.getString(2)); + carForm.setUser_number(rs.getString(3)); + carForm.setCar_number(rs.getString(4)); + carForm.setTel(rs.getInt(5)); + carForm.setAddress(rs.getString(6)); + carForm.setCar_road(rs.getString(7)); + carForm.setCar_content(rs.getString(8)); + + list.add(carForm); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return list; + } + + public CarForm queryCarForm(String id) { + CarForm carForm = null; + String sql = "select * from tb_car where id=" + id + ""; + ResultSet rs = connection.executeQuery(sql); + try { + while (rs.next()) { + carForm = new CarForm(); + carForm.setId(rs.getInt(1)); + carForm.setUsername(rs.getString(2)); + carForm.setUser_number(rs.getString(3)); + carForm.setCar_number(rs.getString(4)); + carForm.setTel(rs.getInt(5)); + carForm.setAddress(rs.getString(6)); + carForm.setCar_road(rs.getString(7)); + carForm.setCar_content(rs.getString(8)); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return carForm; + } + +} diff --git a/02/src/com/dao/CustomerDao.java b/02/src/com/dao/CustomerDao.java new file mode 100644 index 0000000..aa24958 --- /dev/null +++ b/02/src/com/dao/CustomerDao.java @@ -0,0 +1,66 @@ +package com.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.form.CustomerForm; +import com.tools.JDBConnection; + +public class CustomerDao { + public JDBConnection connection = null; + + public CustomerDao() { + connection = new JDBConnection(); + } + + public boolean operationCustomer(String sql) { + return connection.executeUpdate(sql); + } + + public List queryCustomerList() { + List list = new ArrayList(); + CustomerForm customerForm = null; + String sql = "select * from tb_customer order by customer_id desc"; + ResultSet rs = connection.executeQuery(sql); + try { + while (rs.next()) { + customerForm = new CustomerForm(); + customerForm.setCustomer_id(rs.getInt(1)); + customerForm.setCustomer_user(rs.getString(2)); + customerForm.setCustomer_tel(rs.getString(3)); + customerForm.setCustomer_address(rs.getString(4)); + list.add(customerForm); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return list; + } + + + public CustomerForm queryCustomerForm(Integer id) { + CustomerForm customerForm = null; + String sql = "select * from tb_customer where customer_id="+id+""; + ResultSet rs = connection.executeQuery(sql); + try { + while (rs.next()) { + customerForm = new CustomerForm(); + customerForm.setCustomer_id(rs.getInt(1)); + customerForm.setCustomer_user(rs.getString(2)); + customerForm.setCustomer_tel(rs.getString(3)); + customerForm.setCustomer_address(rs.getString(4)); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return customerForm; + } + + + + + + +} diff --git a/02/src/com/dao/GoodsAndLogDao.java b/02/src/com/dao/GoodsAndLogDao.java new file mode 100644 index 0000000..945ca77 --- /dev/null +++ b/02/src/com/dao/GoodsAndLogDao.java @@ -0,0 +1,103 @@ +package com.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.form.GoodsForm; +import com.form.LogForm; +import com.tools.JDBConnection; + +public class GoodsAndLogDao { + private GoodsForm goodsForm = null; + private LogForm logForm = null; + private JDBConnection connection = null; + + public GoodsAndLogDao() { + connection = new JDBConnection(); + } + + public boolean operationGoodsAndLog(String sql) { + return connection.executeUpdate(sql); + } + + public LogForm queryCarLogForm(Integer car_id) { + String sql = "select * from tb_carlog where car_id=" + car_id + ""; + ResultSet rs = connection.executeQuery(sql); + logForm = null; + try { + while (rs.next()) { + logForm = new LogForm(); + logForm.setId(rs.getInt(1)); + logForm.setGoods_id(rs.getString(2)); + logForm.setCar_id(rs.getString(3)); + logForm.setStartTime(rs.getString(4)); + logForm.setEndTime(rs.getString(5)); + logForm.setDescribe(rs.getString(6)); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return logForm; + } + public static void main(String[] args) { + GoodsAndLogDao dao = new GoodsAndLogDao(); + LogForm form = dao.queryCarLogForm(4); + System.out.println(form.getId()); + } + public GoodsForm queryGoodsForm(String goods_id) { + String sql = "select * from tb_operationgoods where goods_id='" + goods_id + "'"; + ResultSet rs = connection.executeQuery(sql); + try { + while (rs.next()) { + goodsForm = new GoodsForm(); + goodsForm.setId(rs.getInt(1)); + goodsForm.setCar_id(rs.getString(2)); + goodsForm.setCustomer_id(rs.getString(3)); + goodsForm.setGoods_id(rs.getString(4)); + goodsForm.setGoods_name(rs.getString(5)); + goodsForm.setGoods_tel(rs.getString(6)); + goodsForm.setGoods_address(rs.getString(7)); + goodsForm.setGoods_sure(rs.getString(8)); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return goodsForm; + } + + + + public List queryGoodsList() { + List list=new ArrayList(); + String sql = "select * from tb_operationgoods order by id desc"; + ResultSet rs = connection.executeQuery(sql); + try { + while (rs.next()) { + goodsForm = new GoodsForm(); + goodsForm.setId(rs.getInt(1)); + goodsForm.setCar_id(rs.getString(2)); + goodsForm.setCustomer_id(rs.getString(3)); + goodsForm.setGoods_id(rs.getString(4)); + goodsForm.setGoods_name(rs.getString(5)); + goodsForm.setGoods_tel(rs.getString(6)); + goodsForm.setGoods_address(rs.getString(7)); + goodsForm.setGoods_sure(rs.getString(8)); + list.add(goodsForm); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return list; + } + + + + + + + + + +} diff --git a/02/src/com/form/AdminForm.java b/02/src/com/form/AdminForm.java new file mode 100644 index 0000000..9241bdf --- /dev/null +++ b/02/src/com/form/AdminForm.java @@ -0,0 +1,40 @@ +package com.form; + + +import com.tools.MySuperAction; + +public class AdminForm extends MySuperAction { + public String admin_user; + public String admin_password; + public String admin_repassword1; + public String admin_repassword2; + public String getAdmin_user() { + return admin_user; + } + public void setAdmin_user(String admin_user) { + this.admin_user = admin_user; + } + public String getAdmin_password() { + return admin_password; + } + public void setAdmin_password(String admin_password) { + this.admin_password = admin_password; + } + public String getAdmin_repassword1() { + return admin_repassword1; + } + public void setAdmin_repassword1(String admin_repassword1) { + this.admin_repassword1 = admin_repassword1; + } + public String getAdmin_repassword2() { + return admin_repassword2; + } + public void setAdmin_repassword2(String admin_repassword2) { + this.admin_repassword2 = admin_repassword2; + } + + + +} + + diff --git a/02/src/com/form/CarForm.java b/02/src/com/form/CarForm.java new file mode 100644 index 0000000..cd119ac --- /dev/null +++ b/02/src/com/form/CarForm.java @@ -0,0 +1,66 @@ +package com.form; +import com.tools.MySuperAction; + +public class CarForm extends MySuperAction{ + public Integer id=null; + public String username=null; + public String user_number=null; + public String car_number=null; + public Integer tel=null; + public String address=null; + public String car_road=null; + public String car_content=null; + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + + public String getUser_number() { + return user_number; + } + public void setUser_number(String user_number) { + this.user_number = user_number; + } + public String getCar_number() { + return car_number; + } + public void setCar_number(String car_number) { + this.car_number = car_number; + } + public Integer getTel() { + return tel; + } + public void setTel(Integer tel) { + this.tel = tel; + } + public String getAddress() { + return address; + } + public void setAddress(String address) { + this.address = address; + } + public String getCar_road() { + return car_road; + } + public void setCar_road(String car_road) { + this.car_road = car_road; + } + public String getCar_content() { + return car_content; + } + public void setCar_content(String car_content) { + this.car_content = car_content; + } + + +} + + diff --git a/02/src/com/form/CustomerForm.java b/02/src/com/form/CustomerForm.java new file mode 100644 index 0000000..a5c156b --- /dev/null +++ b/02/src/com/form/CustomerForm.java @@ -0,0 +1,38 @@ +package com.form; + +import com.tools.MySuperAction; + +public class CustomerForm extends MySuperAction{ + public Integer customer_id=null; + public String customer_user=null; + public String customer_tel=null; + public String customer_address=null; + public Integer getCustomer_id() { + return customer_id; + } + public void setCustomer_id(Integer customer_id) { + this.customer_id = customer_id; + } + public String getCustomer_user() { + return customer_user; + } + public void setCustomer_user(String customer_user) { + this.customer_user = customer_user; + } + public String getCustomer_tel() { + return customer_tel; + } + public void setCustomer_tel(String customer_tel) { + this.customer_tel = customer_tel; + } + public String getCustomer_address() { + return customer_address; + } + public void setCustomer_address(String customer_address) { + this.customer_address = customer_address; + } + + +} + + diff --git a/02/src/com/form/GoodsForm.java b/02/src/com/form/GoodsForm.java new file mode 100644 index 0000000..3472e9c --- /dev/null +++ b/02/src/com/form/GoodsForm.java @@ -0,0 +1,69 @@ +package com.form; + +import java.sql.Date; + +import com.tools.MySuperAction; + +public class GoodsForm extends MySuperAction{ + public Integer id=null; + public String car_id=null; + public String customer_id=null; + public String goods_id=null; + public String goods_name=null; + public String goods_tel=null; + public String goods_address=null; + public String goods_sure=null; + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getCar_id() { + return car_id; + } + public void setCar_id(String car_id) { + this.car_id = car_id; + } + public String getCustomer_id() { + return customer_id; + } + public void setCustomer_id(String customer_id) { + this.customer_id = customer_id; + } + public String getGoods_id() { + return goods_id; + } + public void setGoods_id(String goods_id) { + this.goods_id = goods_id; + } + public String getGoods_name() { + return goods_name; + } + public void setGoods_name(String goods_name) { + this.goods_name = goods_name; + } + public String getGoods_tel() { + return goods_tel; + } + public void setGoods_tel(String goods_tel) { + this.goods_tel = goods_tel; + } + public String getGoods_address() { + return goods_address; + } + public void setGoods_address(String goods_address) { + this.goods_address = goods_address; + } + public String getGoods_sure() { + return goods_sure; + } + public void setGoods_sure(String goods_sure) { + this.goods_sure = goods_sure; + } + + + +} + + diff --git a/02/src/com/form/LogForm.java b/02/src/com/form/LogForm.java new file mode 100644 index 0000000..a47bc0d --- /dev/null +++ b/02/src/com/form/LogForm.java @@ -0,0 +1,50 @@ +package com.form; + +public class LogForm{ + public Integer id=null; + public String car_id=null; + public String goods_id=null; + public String startTime=null; + public String endTime=null; + public String describe=null; + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getCar_id() { + return car_id; + } + public void setCar_id(String car_id) { + this.car_id = car_id; + } + public String getGoods_id() { + return goods_id; + } + public void setGoods_id(String goods_id) { + this.goods_id = goods_id; + } + public String getStartTime() { + return startTime; + } + public void setStartTime(String startTime) { + this.startTime = startTime; + } + public String getEndTime() { + return endTime; + } + public void setEndTime(String endTime) { + this.endTime = endTime; + } + public String getDescribe() { + return describe; + } + public void setDescribe(String describe) { + this.describe = describe; + } + + +} + + diff --git a/02/src/com/tools/CurrentTime.java b/02/src/com/tools/CurrentTime.java new file mode 100644 index 0000000..0eea613 --- /dev/null +++ b/02/src/com/tools/CurrentTime.java @@ -0,0 +1,18 @@ +package com.tools; + +import java.text.DateFormat; +import java.util.Date; + +public class CurrentTime { + public String currentlyTime() { + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.FULL); + return dateFormat.format(date); + } + + public long autoNumber() { + Date date = new Date(); + long autoNumber = date.getTime(); + return autoNumber; + } +} diff --git a/02/src/com/tools/JDBConnection.java b/02/src/com/tools/JDBConnection.java new file mode 100644 index 0000000..730775a --- /dev/null +++ b/02/src/com/tools/JDBConnection.java @@ -0,0 +1,69 @@ +package com.tools; + +import java.sql.*; + +public class JDBConnection { + private final static String url = "jdbc:mysql://localhost:3306/db_wlgl?user=root&password=111&useUnicode=true&characterEncoding=gb2312"; + private final static String dbDriver = "com.mysql.jdbc.Driver"; + private Connection con = null; + // 通过构造方法加载数据库驱动 + static { + try { + Class.forName(dbDriver).newInstance(); + } catch (Exception ex) { + System.out.println("数据库加载失败"); + } + } + + // 创建数据库连接 + public boolean creatConnection() { + try { + con = DriverManager.getConnection(url); + con.setAutoCommit(true); + + } catch (SQLException e) { + System.out.println(e.getMessage()); + System.out.println("creatConnectionError!"); + } + return true; + } + + // 对数据库的增加、修改和删除的操作 + public boolean executeUpdate(String sql) { + if (con == null) { + creatConnection(); + } + try { + Statement stmt = con.createStatement(); + int iCount = stmt.executeUpdate(sql); + System.out.println("操作成功,所影响的记录数为" + String.valueOf(iCount)); + return true; + } catch (SQLException e) { + System.out.println(e.getMessage()); + return false; + } + } + + // 对数据库的查询操作 + public ResultSet executeQuery(String sql) { + ResultSet rs; + try { + if (con == null) { + creatConnection(); + } + Statement stmt = con.createStatement(); + try { + rs = stmt.executeQuery(sql); + } catch (SQLException e) { + System.out.println(e.getMessage()); + return null; + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + System.out.println("executeQueryError!"); + return null; + } + return rs; + } + +} diff --git a/02/src/com/tools/MyPagination.java b/02/src/com/tools/MyPagination.java new file mode 100644 index 0000000..cecd9ef --- /dev/null +++ b/02/src/com/tools/MyPagination.java @@ -0,0 +1,94 @@ +package com.tools; + +import java.util.ArrayList; +import java.util.List; + +public class MyPagination { + public List list=null; + private int recordCount=0; + private int pagesize=0; + private int maxPage=0; + + public List getInitPage(List list,int Page,int pagesize){ + List newList=new ArrayList(); + this.list=list; + recordCount=list.size(); + this.pagesize=pagesize; + this.maxPage=getMaxPage(); + try{ + for(int i=(Page-1)*pagesize;i<=Page*pagesize-1;i++){ + try{ + if(i>=recordCount){break;} + }catch(Exception e){} + newList.add((Object)list.get(i)); + } + }catch(Exception e){ + e.printStackTrace(); + } + return newList; + } + + public List getAppointPage(int Page){ + List newList=new ArrayList(); + try{ + for(int i=(Page-1)*pagesize;i<=Page*pagesize-1;i++){ + try{ + if(i>=recordCount){break;} + }catch(Exception e){} + newList.add((Object)list.get(i)); + } + }catch(Exception e){ + e.printStackTrace(); + } + return newList; + } + + public int getMaxPage(){ + int maxPage=(recordCount%pagesize==0)?(recordCount/pagesize):(recordCount/pagesize+1); + return maxPage; + } + + public int getRecordSize(){ + return recordCount; + } + + + public int getPage(String str){ + if(str==null){ + str="0"; + } + int Page=Integer.parseInt(str); + if(Page<1){ + Page=1; + }else{ + if(((Page-1)*pagesize+1)>recordCount){ + Page=maxPage; + } + } + return Page; + } + + + + + public String printCtrl(int Page){ + String strHtml="
    当前页数:["+Page+"/"+maxPage+"]  "; + try{ + if(Page>1){ + strHtml=strHtml+"第一页 "; + strHtml=strHtml+"  上一页"; + } + if(Page下一页   最后一页 "; + } + strHtml=strHtml+"
    "; + }catch(Exception e){ + e.printStackTrace(); + + } + return strHtml; + } + + + +} diff --git a/02/src/com/tools/MySuperAction.java b/02/src/com/tools/MySuperAction.java new file mode 100644 index 0000000..92ec25a --- /dev/null +++ b/02/src/com/tools/MySuperAction.java @@ -0,0 +1,26 @@ +package com.tools; + +import java.util.Map; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts2.interceptor.ServletRequestAware; +import org.apache.struts2.interceptor.ServletResponseAware; +import org.apache.struts2.interceptor.SessionAware; + +import com.opensymphony.xwork2.ActionSupport; + +public class MySuperAction extends ActionSupport implements SessionAware,ServletRequestAware,ServletResponseAware { + protected HttpServletRequest request; + protected HttpServletResponse response; + protected Map session; + + public void setSession(Map session) { + this.session=session; + } + public void setServletRequest(HttpServletRequest request) { + this.request=request; + } + public void setServletResponse(HttpServletResponse response) { + this.response=response; + } +} diff --git a/02/src/com/webtier/AdminAction.java b/02/src/com/webtier/AdminAction.java new file mode 100644 index 0000000..fb0deac --- /dev/null +++ b/02/src/com/webtier/AdminAction.java @@ -0,0 +1,72 @@ +package com.webtier; + +import com.dao.AdminDao; +import com.form.AdminForm; + +public class AdminAction extends AdminForm { + private static AdminDao adminDao = null; + + static{ + adminDao=new AdminDao(); + } + + // 对登录用户的表单验证是否为空 + public void validateIndex() { + if (null == admin_user || admin_user.equals("")) { + this.addFieldError("admin_user", "| 请您输入用户名"); + } + if (null == admin_password || admin_password.equals("")) { + this.addFieldError("admin_password", "| 请您输入密码"); + } + } + + // 对登录用户的表单验证 + public String index() { + String query_password = adminDao.getAdminPassword(admin_user); + if (query_password.equals("")) { + this.addActionError("| 该用户名不存在"); + return INPUT; + } + if (!query_password.equals(admin_password)) { + this.addActionError("| 您输入的密码有误,请重新输入"); + return INPUT; + } + session.put("admin_user", admin_user); + return SUCCESS; + } + + // 对修改管理员密码表单验证是否为空 + public void validateUpdatePassword() { + + if (null == admin_password || admin_password.equals("")) { + this.addFieldError("admin_password", "请输入原密码"); + } + if (null == admin_repassword1 || admin_repassword1.equals("")) { + this.addFieldError("admin_repassword1", "请输入新密码"); + } + if (null == admin_repassword2 || admin_repassword2.equals("")) { + this.addFieldError("admin_repassword2", "请输入密码确认"); + } + if (!admin_repassword1.equals(admin_repassword2)) { + this.addActionError("您输入两次密码不相同,请重新输入!!!"); + } + + } + + public String updatePassword() { + String query_password = adminDao.getAdminPassword(admin_user); + if (!admin_password.equals(query_password)) { + this.addFieldError("admin_password", "您输入的原密码有误,请重新输入"); + } + String sql = "update tb_admin set admin_password='" + admin_repassword1 + + "' where admin_user='" + admin_user + "'"; + if (!adminDao.operationAdmin(sql)) { + this.addActionError("修改密码失败!!!"); + return INPUT; + } else { + request.setAttribute("editPassword", "您修改密码成功,请您重新登录!!!"); + return SUCCESS; + } + } + +} diff --git a/02/src/com/webtier/CarAction.java b/02/src/com/webtier/CarAction.java new file mode 100644 index 0000000..d559d9b --- /dev/null +++ b/02/src/com/webtier/CarAction.java @@ -0,0 +1,115 @@ +package com.webtier; + +import java.util.List; + +import com.dao.CarDao; +import com.form.CarForm; +import com.tools.MyPagination; + +public class CarAction extends CarForm { + private static CarDao carDao = null; + public CarAction() { + + carDao = new CarDao(); + } + + public String queryCarList() { + List list = carDao.queryCarList(null); + request.setAttribute("list", list); + return SUCCESS; + } + + public void validateInsertCar() { + if (null == username || username.equals("")) { + this.addFieldError("username", "请您输入姓名"); + } + if (null == user_number || user_number.equals("")) { + this.addFieldError("user_number", "请您输入身份证号"); + } + if (null == car_number || car_number.equals("")) { + this.addFieldError("car_number", "请您输入车牌号"); + } + if (null == tel || tel.equals("")) { + this.addFieldError("tel", "请您输入电话"); + } + if (null == address || address.equals("")) { + this.addFieldError("address", "请您输入地址"); + } + if (null == car_road || car_road.equals("")) { + this.addFieldError("car_road", "请您输入运输路线"); + } + if (null == car_content || car_content.equals("")) { + this.addFieldError("car_content", "请您输入车辆描述"); + } + } + + public String deleteCar() { + String sql = "delete from tb_car where id='" + id + "'"; + carDao.operationCar(sql); + return "operationSuccess"; + } + + public String insertCar() { + String sql = "insert into tb_car (username,user_number,car_number,tel,address,car_road,car_content) value('" + + username + + "','" + + user_number + + "','" + + car_number + + "','" + + tel + + "','" + + address + + "','" + + car_road + + "','" + + car_content + "')"; + carDao.operationCar(sql); + return "operationSuccess"; + } + + public String queryCarForm() { + CarForm carForm = carDao.queryCarForm(id.toString()); + request.setAttribute("carForm", carForm); + return SUCCESS; + } + + + + + + public void validateUpdateCar() { + if (null == username || username.equals("")) { + this.addFieldError("username", "请您输入姓名"); + } + if (null == user_number || user_number.equals("")) { + this.addFieldError("user_number", "请您输入身份证号"); + } + if (null == car_number || car_number.equals("")) { + this.addFieldError("car_number", "请您输入车牌号"); + } + if (null == tel || tel.equals("")) { + this.addFieldError("tel", "请您输入电话"); + } + if (null == address || address.equals("")) { + this.addFieldError("address", "请您输入地址"); + } + if (null == car_road || car_road.equals("")) { + this.addFieldError("car_road", "请您输入运输路线"); + } + if (null == car_content || car_content.equals("")) { + this.addFieldError("car_content", "请您输入车辆描述"); + } + } + + public String updateCar() { + String sql = "update tb_car set username='" + username + + "',user_number='" + user_number + "',car_number='" + + car_number + "',tel='" + tel + "',address='" + address + + "',car_road='" + car_road + "',car_content='" + car_content + + "' where id='" + id + "'"; + carDao.operationCar(sql); + return "operationSuccess"; + } + +} diff --git a/02/src/com/webtier/CarAction.properties b/02/src/com/webtier/CarAction.properties new file mode 100644 index 0000000..06b4a14 --- /dev/null +++ b/02/src/com/webtier/CarAction.properties @@ -0,0 +1,2 @@ +invalid.fieldvalue.tel= +invalid.fieldvalue.user_number= \ No newline at end of file diff --git a/02/src/com/webtier/CustomerAction.java b/02/src/com/webtier/CustomerAction.java new file mode 100644 index 0000000..d370744 --- /dev/null +++ b/02/src/com/webtier/CustomerAction.java @@ -0,0 +1,56 @@ +package com.webtier; + +import java.util.List; + +import com.dao.CustomerDao; +import com.form.CustomerForm; +import com.tools.MyPagination; + +public class CustomerAction extends CustomerForm { + private static CustomerDao customerDao = null; + static{ + customerDao = new CustomerDao(); + + } + + public String deleteCustomer() { + String sql = "delete from tb_customer where customer_id='" + + customer_id + "'"; + customerDao.operationCustomer(sql); + return "operationSuccess1"; + } + + + + public void validateInsertCustomer(){ + if(null==this.customer_user||this.customer_user.equals("")){ + this.addFieldError("customer_user", "请您输入客户姓名"); + } + if(null==this.customer_tel||this.customer_tel.equals("")){ + this.addFieldError("customer_tel", "请您输入客户电话"); + } + if(null==this.customer_address||this.customer_address.equals("")){ + this.addFieldError("customer_address", "请您输入客户地址"); + } + + } + + + public String insertCustomer() { + String sql = "insert into tb_customer (customer_user,customer_tel,customer_address) value ('" + + this.customer_user + + "','" + + this.customer_tel + + "','" + + this.customer_address + "')"; + customerDao.operationCustomer(sql); + return "operationSuccess1"; + } + + public String queryCustomerList() { + List list = customerDao.queryCustomerList(); + request.setAttribute("list", list); + return SUCCESS; + } + +} diff --git a/02/src/com/webtier/GoodsAction.java b/02/src/com/webtier/GoodsAction.java new file mode 100644 index 0000000..8d302ad --- /dev/null +++ b/02/src/com/webtier/GoodsAction.java @@ -0,0 +1,81 @@ +package com.webtier; + +import java.util.List; + +import com.dao.CarDao; +import com.dao.GoodsAndLogDao; +import com.form.GoodsForm; +import com.tools.MyPagination; + +public class GoodsAction extends GoodsForm { + private static GoodsAndLogDao goodsAndLogDao = null; + private static CarDao carDao = null; + + static { + goodsAndLogDao = new GoodsAndLogDao(); + carDao=new CarDao(); + } + public String queryGoodsId(){ + GoodsForm goodsForm = goodsAndLogDao.queryGoodsForm(request.getParameter("goods_id")); + request.setAttribute("goodsForm", goodsForm); + return SUCCESS; + } + public String queryCar(){ + List list = carDao.queryCarList(null); + request.setAttribute("list", list); + return SUCCESS; + } + public String insertGoods() { + String sql1 = "insert into tb_operationgoods (car_id,customer_id,goods_id,goods_name,goods_tel,goods_address,goods_sure) value (" + + this.car_id + + "," + + this.customer_id + + ",'" + + this.goods_id + + "','" + + this.goods_name + + "','" + + this.goods_tel + "','" + this.goods_address + "',1)"; + String startTime = request.getParameter("startTime"); + String endTime = request.getParameter("endTime"); + String describer = request.getParameter("describer"); + String sql2 = "insert into tb_carlog (goods_id,car_id,startTime,endTime,describer) value ('" + + goods_id + + "','" + + car_id + + "','" + + startTime + + "','" + endTime + "','" + describer + "')"; + this.goodsAndLogDao.operationGoodsAndLog(sql1); + this.goodsAndLogDao.operationGoodsAndLog(sql2); + request.setAttribute("goodsSuccess", "

    您添加订货单成功"); + return SUCCESS; + } + public String changeOperation(){ + String goods_id=request.getParameter("goods_id"); + String sql1="update tb_operationgoods set goods_sure=0 where goods_id='"+goods_id+"'"; + String sql2="delete from tb_carlog where goods_id='"+goods_id+"'"; + this.goodsAndLogDao.operationGoodsAndLog(sql1); + this.goodsAndLogDao.operationGoodsAndLog(sql2); + request.setAttribute("goods_id", goods_id); + return SUCCESS; + } + + + public String queryGoodsList(){ + List list = goodsAndLogDao.queryGoodsList(); + request.setAttribute("list", list); + return SUCCESS; + } + + + public String deleteGoods(){ + String id=request.getParameter("id"); + String sql="delete from tb_operationgoods where id='"+id+"'"; + this.goodsAndLogDao.operationGoodsAndLog(sql); + return "deleteSuccess"; + } + + + +} diff --git a/02/src/struts.properties b/02/src/struts.properties new file mode 100644 index 0000000..51b82fb --- /dev/null +++ b/02/src/struts.properties @@ -0,0 +1,10 @@ +struts.ui.theme=simple +struts.i18n.encoding=gb2312 + + + + + + + + diff --git a/02/src/struts.xml b/02/src/struts.xml new file mode 100644 index 0000000..d048465 --- /dev/null +++ b/02/src/struts.xml @@ -0,0 +1,28 @@ + + + + + + /admin_{1}.jsp + /admin_{1}.jsp + + + /car_{1}.jsp + /car_{1}.jsp + car_queryCarList.action + + + /customer_{1}.jsp + customer_queryCustomerList.action + customer_queryCustomerList.action + + + /goods_{1}.jsp + goods_queryGoodsList.action + + + + + diff --git a/02/src/template/simple/actionerror.ftl b/02/src/template/simple/actionerror.ftl new file mode 100644 index 0000000..ca34904 --- /dev/null +++ b/02/src/template/simple/actionerror.ftl @@ -0,0 +1,5 @@ +<#if (actionErrors?exists && actionErrors?size > 0)> +<#list actionErrors as error> +${error} + + \ No newline at end of file diff --git a/02/src/template/simple/fielderror.ftl b/02/src/template/simple/fielderror.ftl new file mode 100644 index 0000000..9d23ca1 --- /dev/null +++ b/02/src/template/simple/fielderror.ftl @@ -0,0 +1,52 @@ +<#if fieldErrors?exists><#t/> +<#assign eKeys = fieldErrors.keySet()><#t/> +<#assign eKeysSize = eKeys.size()><#t/> +<#assign doneStartUlTag=false><#t/> +<#assign doneEndUlTag=false><#t/> +<#assign haveMatchedErrorField=false><#t/> +<#if (fieldErrorFieldNames?size > 0) ><#t/> + <#list fieldErrorFieldNames as fieldErrorFieldName><#t/> + <#list eKeys as eKey><#t/> + <#if (eKey = fieldErrorFieldName)><#t/> + <#assign haveMatchedErrorField=true><#t/> + <#assign eValue = fieldErrors[fieldErrorFieldName]><#t/> + <#if (haveMatchedErrorField && (!doneStartUlTag))><#t/> + + +<#assign doneStartUlTag=true><#t/> +<#t/> +<#list eValue as eEachValue><#t/> + ${eEachValue} +<#t/> +<#t/> +<#t/> +<#t/> + + + + + + + + + <#if (haveMatchedErrorField && (!doneEndUlTag))><#t/> + <#assign doneEndUlTag=true><#t/> + <#t/> +<#else><#t/> + <#if (eKeysSize > 0)><#t/> + + + + <#list eKeys as eKey><#t/> + <#assign eValue = fieldErrors[eKey]><#t/> + <#list eValue as eEachValue><#t/> + ${eEachValue} + <#t/> + <#t/> + + + + + <#t/> +<#t/> +<#t/> \ No newline at end of file diff --git "a/02/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/02/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..ef9bf1d Binary files /dev/null and "b/02/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/03/.classpath b/03/.classpath new file mode 100644 index 0000000..45b3f92 --- /dev/null +++ b/03/.classpath @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/03/.mymetadata b/03/.mymetadata new file mode 100644 index 0000000..b3f837c --- /dev/null +++ b/03/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/03/.project b/03/.project new file mode 100644 index 0000000..b53762e --- /dev/null +++ b/03/.project @@ -0,0 +1,50 @@ + + + 03 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/03/.settings/.jsdtscope b/03/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/03/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/03/.settings/org.eclipse.wst.jsdt.ui.superType.container b/03/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/03/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/03/.settings/org.eclipse.wst.jsdt.ui.superType.name b/03/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/03/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/03/WebRoot/META-INF/MANIFEST.MF b/03/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..5e94951 --- /dev/null +++ b/03/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/03/WebRoot/WEB-INF/classes/com/mr/dao/ObjectDao.class b/03/WebRoot/WEB-INF/classes/com/mr/dao/ObjectDao.class new file mode 100644 index 0000000..106a7e2 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/dao/ObjectDao.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/AdminInfo.class b/03/WebRoot/WEB-INF/classes/com/mr/model/AdminInfo.class new file mode 100644 index 0000000..48fbc95 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/model/AdminInfo.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/AdminInfo.hbm.xml b/03/WebRoot/WEB-INF/classes/com/mr/model/AdminInfo.hbm.xml new file mode 100644 index 0000000..414c96c --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/com/mr/model/AdminInfo.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/ArticleInfo.class b/03/WebRoot/WEB-INF/classes/com/mr/model/ArticleInfo.class new file mode 100644 index 0000000..27ce56f Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/model/ArticleInfo.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/ArticleInfo.hbm.xml b/03/WebRoot/WEB-INF/classes/com/mr/model/ArticleInfo.hbm.xml new file mode 100644 index 0000000..0f901d0 --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/com/mr/model/ArticleInfo.hbm.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/Info.class b/03/WebRoot/WEB-INF/classes/com/mr/model/Info.class new file mode 100644 index 0000000..8de970c Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/model/Info.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/Info.hbm.xml b/03/WebRoot/WEB-INF/classes/com/mr/model/Info.hbm.xml new file mode 100644 index 0000000..bf9b685 --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/com/mr/model/Info.hbm.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/PhotoInfo.class b/03/WebRoot/WEB-INF/classes/com/mr/model/PhotoInfo.class new file mode 100644 index 0000000..f0efe64 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/model/PhotoInfo.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/PhotoInfo.hbm.xml b/03/WebRoot/WEB-INF/classes/com/mr/model/PhotoInfo.hbm.xml new file mode 100644 index 0000000..dbc9156 --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/com/mr/model/PhotoInfo.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/ReArticleInfo.class b/03/WebRoot/WEB-INF/classes/com/mr/model/ReArticleInfo.class new file mode 100644 index 0000000..4062e83 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/model/ReArticleInfo.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/ReArticleInfo.hbm.xml b/03/WebRoot/WEB-INF/classes/com/mr/model/ReArticleInfo.hbm.xml new file mode 100644 index 0000000..7d90b1c --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/com/mr/model/ReArticleInfo.hbm.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/UserInfo.class b/03/WebRoot/WEB-INF/classes/com/mr/model/UserInfo.class new file mode 100644 index 0000000..5759b62 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/model/UserInfo.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/model/UserInfo.hbm.xml b/03/WebRoot/WEB-INF/classes/com/mr/model/UserInfo.hbm.xml new file mode 100644 index 0000000..c275cdd --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/com/mr/model/UserInfo.hbm.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/03/WebRoot/WEB-INF/classes/com/mr/tools/FileOperation.class b/03/WebRoot/WEB-INF/classes/com/mr/tools/FileOperation.class new file mode 100644 index 0000000..aada304 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/tools/FileOperation.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/tools/ToChinese.class b/03/WebRoot/WEB-INF/classes/com/mr/tools/ToChinese.class new file mode 100644 index 0000000..5ba4709 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/tools/ToChinese.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/tools/ValidateExpression.class b/03/WebRoot/WEB-INF/classes/com/mr/tools/ValidateExpression.class new file mode 100644 index 0000000..da10336 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/tools/ValidateExpression.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/webiter/A.class b/03/WebRoot/WEB-INF/classes/com/mr/webiter/A.class new file mode 100644 index 0000000..e4a7a23 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/webiter/A.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/webiter/AdminAction.class b/03/WebRoot/WEB-INF/classes/com/mr/webiter/AdminAction.class new file mode 100644 index 0000000..fb8122e Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/webiter/AdminAction.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/webiter/ArticleAction.class b/03/WebRoot/WEB-INF/classes/com/mr/webiter/ArticleAction.class new file mode 100644 index 0000000..5d3b90b Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/webiter/ArticleAction.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/webiter/BlogMainAction.class b/03/WebRoot/WEB-INF/classes/com/mr/webiter/BlogMainAction.class new file mode 100644 index 0000000..407e9ed Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/webiter/BlogMainAction.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/webiter/InfoAction.class b/03/WebRoot/WEB-INF/classes/com/mr/webiter/InfoAction.class new file mode 100644 index 0000000..2422ec7 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/webiter/InfoAction.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/webiter/PhotoAction.class b/03/WebRoot/WEB-INF/classes/com/mr/webiter/PhotoAction.class new file mode 100644 index 0000000..e0c7b53 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/webiter/PhotoAction.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/webiter/ReArticleAction.class b/03/WebRoot/WEB-INF/classes/com/mr/webiter/ReArticleAction.class new file mode 100644 index 0000000..d833dd5 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/webiter/ReArticleAction.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/webiter/UserInfoAction.class b/03/WebRoot/WEB-INF/classes/com/mr/webiter/UserInfoAction.class new file mode 100644 index 0000000..ace0165 Binary files /dev/null and b/03/WebRoot/WEB-INF/classes/com/mr/webiter/UserInfoAction.class differ diff --git a/03/WebRoot/WEB-INF/classes/com/mr/webiter/UserInfoAction.properties b/03/WebRoot/WEB-INF/classes/com/mr/webiter/UserInfoAction.properties new file mode 100644 index 0000000..c4427ef --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/com/mr/webiter/UserInfoAction.properties @@ -0,0 +1,3 @@ +invalid.fieldvalue.tel= +invalid.fieldvalue.qq= +invalid.fieldvalue.born= \ No newline at end of file diff --git a/03/WebRoot/WEB-INF/classes/hibernate.cfg.xml b/03/WebRoot/WEB-INF/classes/hibernate.cfg.xml new file mode 100644 index 0000000..74a1e91 --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/hibernate.cfg.xml @@ -0,0 +1,27 @@ + + + + + + + com.mysql.jdbc.Driver + + jdbc:mysql://localhost:3306/db_blog + + root + + 111 + + org.hibernate.dialect.MySQLDialect + + true + + + + + + + + + \ No newline at end of file diff --git a/03/WebRoot/WEB-INF/classes/struts.properties b/03/WebRoot/WEB-INF/classes/struts.properties new file mode 100644 index 0000000..9272019 --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/struts.properties @@ -0,0 +1,7 @@ +struts.ui.theme=simple +struts.i18n.encoding=gb2312 +struts.action.extension=htm +struts.multipart.saveDir=d:/tmp +struts.messages.error.content.type.not.allowed=\u4e0a\u4f20\u7684\u6587\u4ef6\u7c7b\u578b\u53ea\u80fd\u662f\u56fe\u7247\u6587\u4ef6\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01 +struts.messages.error.file.too.large=\u60a8\u8981\u4e0a\u4f20\u7684\u6587\u4ef6\u592a\u5927\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01 +struts.messages.error.uploading=\u60a8\u8981\u4e0a\u4f20\u7684\u5185\u5bb9\u5931\u8d25\uff01 diff --git a/03/WebRoot/WEB-INF/classes/struts.xml b/03/WebRoot/WEB-INF/classes/struts.xml new file mode 100644 index 0000000..c92b129 --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/struts.xml @@ -0,0 +1,59 @@ + + + + + + /blog_main.jsp + + + /blog/userManager/{1}.jsp + /blog/userManager/{1}.jsp + /admin/user/user_query.jsp + /dealwith.jsp + /blog/blog.jsp + /blog/userManager/user_query.jsp + /blog/userManager/user_update.jsp + /blog/userManager/article_add.jsp + /blog/userManager/friends_query.jsp + + + /admin/admin/{1}.jsp + /admin/admin/{1}.jsp + /dealwith.jsp + + + /blog/userManager/{1}.jsp + /blog/userManager/{1}.jsp + /blog/userManager/article_update.jsp + /dealwith.jsp + /blog/blog_articleInfo.jsp + /admin/article/article_query.jsp + /admin/article/article_queryOne.jsp + + + /dealwith.jsp + + + /photo + + image/bmp,image/png,image/gif,image/pjpeg + 1024000 + + + /blog/userManager/{1}.jsp + /blog/userManager/{1}.jsp + /dealwith.jsp + /blog/photo_query.jsp + /admin/photo/photo_query.jsp + + + /dealwith.jsp + /blog/info_query.jsp + /blog/userManager/info_query.jsp + + + + + diff --git a/03/WebRoot/WEB-INF/classes/template/simple/actionerror.ftl b/03/WebRoot/WEB-INF/classes/template/simple/actionerror.ftl new file mode 100644 index 0000000..ca34904 --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/template/simple/actionerror.ftl @@ -0,0 +1,5 @@ +<#if (actionErrors?exists && actionErrors?size > 0)> +<#list actionErrors as error> +${error} + + \ No newline at end of file diff --git a/03/WebRoot/WEB-INF/classes/template/simple/fielderror.ftl b/03/WebRoot/WEB-INF/classes/template/simple/fielderror.ftl new file mode 100644 index 0000000..9d23ca1 --- /dev/null +++ b/03/WebRoot/WEB-INF/classes/template/simple/fielderror.ftl @@ -0,0 +1,52 @@ +<#if fieldErrors?exists><#t/> +<#assign eKeys = fieldErrors.keySet()><#t/> +<#assign eKeysSize = eKeys.size()><#t/> +<#assign doneStartUlTag=false><#t/> +<#assign doneEndUlTag=false><#t/> +<#assign haveMatchedErrorField=false><#t/> +<#if (fieldErrorFieldNames?size > 0) ><#t/> + <#list fieldErrorFieldNames as fieldErrorFieldName><#t/> + <#list eKeys as eKey><#t/> + <#if (eKey = fieldErrorFieldName)><#t/> + <#assign haveMatchedErrorField=true><#t/> + <#assign eValue = fieldErrors[fieldErrorFieldName]><#t/> + <#if (haveMatchedErrorField && (!doneStartUlTag))><#t/> + + +<#assign doneStartUlTag=true><#t/> +<#t/> +<#list eValue as eEachValue><#t/> + ${eEachValue} +<#t/> +<#t/> +<#t/> +<#t/> + + + + + + + + + <#if (haveMatchedErrorField && (!doneEndUlTag))><#t/> + <#assign doneEndUlTag=true><#t/> + <#t/> +<#else><#t/> + <#if (eKeysSize > 0)><#t/> + + + + <#list eKeys as eKey><#t/> + <#assign eValue = fieldErrors[eKey]><#t/> + <#list eValue as eEachValue><#t/> + ${eEachValue} + <#t/> + <#t/> + + + + + <#t/> +<#t/> +<#t/> \ No newline at end of file diff --git a/03/WebRoot/WEB-INF/lib/ant-1.6.5.jar b/03/WebRoot/WEB-INF/lib/ant-1.6.5.jar new file mode 100644 index 0000000..3beb3b8 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/ant-1.6.5.jar differ diff --git a/03/WebRoot/WEB-INF/lib/ant-antlr-1.6.5.jar b/03/WebRoot/WEB-INF/lib/ant-antlr-1.6.5.jar new file mode 100644 index 0000000..167ac03 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/ant-antlr-1.6.5.jar differ diff --git a/03/WebRoot/WEB-INF/lib/ant-launcher-1.6.5.jar b/03/WebRoot/WEB-INF/lib/ant-launcher-1.6.5.jar new file mode 100644 index 0000000..1a71612 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/ant-launcher-1.6.5.jar differ diff --git a/03/WebRoot/WEB-INF/lib/antlr-2.7.6.jar b/03/WebRoot/WEB-INF/lib/antlr-2.7.6.jar new file mode 100644 index 0000000..3702b64 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/antlr-2.7.6.jar differ diff --git a/03/WebRoot/WEB-INF/lib/asm-attrs.jar b/03/WebRoot/WEB-INF/lib/asm-attrs.jar new file mode 100644 index 0000000..f07bcb2 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/asm-attrs.jar differ diff --git a/03/WebRoot/WEB-INF/lib/asm.jar b/03/WebRoot/WEB-INF/lib/asm.jar new file mode 100644 index 0000000..ee0c7cc Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/asm.jar differ diff --git a/03/WebRoot/WEB-INF/lib/c3p0-0.9.1.2.jar b/03/WebRoot/WEB-INF/lib/c3p0-0.9.1.2.jar new file mode 100644 index 0000000..0f42d60 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/c3p0-0.9.1.2.jar differ diff --git a/03/WebRoot/WEB-INF/lib/cglib-2.1.3.jar b/03/WebRoot/WEB-INF/lib/cglib-2.1.3.jar new file mode 100644 index 0000000..ddfbdb0 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/cglib-2.1.3.jar differ diff --git a/03/WebRoot/WEB-INF/lib/cglib-nodep-2.1_3.jar b/03/WebRoot/WEB-INF/lib/cglib-nodep-2.1_3.jar new file mode 100644 index 0000000..e9b17eb Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/cglib-nodep-2.1_3.jar differ diff --git a/03/WebRoot/WEB-INF/lib/checkstyle-all.jar b/03/WebRoot/WEB-INF/lib/checkstyle-all.jar new file mode 100644 index 0000000..aa86825 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/checkstyle-all.jar differ diff --git a/03/WebRoot/WEB-INF/lib/common-annotations.jar b/03/WebRoot/WEB-INF/lib/common-annotations.jar new file mode 100644 index 0000000..c1f29bf Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/common-annotations.jar differ diff --git a/03/WebRoot/WEB-INF/lib/commons-beanutils.jar b/03/WebRoot/WEB-INF/lib/commons-beanutils.jar new file mode 100644 index 0000000..b1b89c9 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/commons-beanutils.jar differ diff --git a/03/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar b/03/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar new file mode 100644 index 0000000..3272f2b Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar differ diff --git a/03/WebRoot/WEB-INF/lib/commons-collections-3.2.jar b/03/WebRoot/WEB-INF/lib/commons-collections-3.2.jar new file mode 100644 index 0000000..75580be Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/commons-collections-3.2.jar differ diff --git a/03/WebRoot/WEB-INF/lib/commons-dbcp.jar b/03/WebRoot/WEB-INF/lib/commons-dbcp.jar new file mode 100644 index 0000000..faea056 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/commons-dbcp.jar differ diff --git a/03/WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar b/03/WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar new file mode 100644 index 0000000..7db423e Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar differ diff --git a/03/WebRoot/WEB-INF/lib/commons-io-1.3.2.jar b/03/WebRoot/WEB-INF/lib/commons-io-1.3.2.jar new file mode 100644 index 0000000..865c9e4 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/commons-io-1.3.2.jar differ diff --git a/03/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar b/03/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar new file mode 100644 index 0000000..b73a80f Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar differ diff --git a/03/WebRoot/WEB-INF/lib/commons-logging-api-1.1.jar b/03/WebRoot/WEB-INF/lib/commons-logging-api-1.1.jar new file mode 100644 index 0000000..d1abcbb Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/commons-logging-api-1.1.jar differ diff --git a/03/WebRoot/WEB-INF/lib/commons-pool.jar b/03/WebRoot/WEB-INF/lib/commons-pool.jar new file mode 100644 index 0000000..e8de327 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/commons-pool.jar differ diff --git a/03/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar b/03/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..c8c4dbb Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/03/WebRoot/WEB-INF/lib/freemarker-2.3.15.jar b/03/WebRoot/WEB-INF/lib/freemarker-2.3.15.jar new file mode 100644 index 0000000..8b93b17 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/freemarker-2.3.15.jar differ diff --git a/03/WebRoot/WEB-INF/lib/hibernate3.jar b/03/WebRoot/WEB-INF/lib/hibernate3.jar new file mode 100644 index 0000000..861edd0 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/hibernate3.jar differ diff --git a/03/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar b/03/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar new file mode 100644 index 0000000..c773f85 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar differ diff --git a/03/WebRoot/WEB-INF/lib/json-lib-2.1.jar b/03/WebRoot/WEB-INF/lib/json-lib-2.1.jar new file mode 100644 index 0000000..28880c4 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/json-lib-2.1.jar differ diff --git a/03/WebRoot/WEB-INF/lib/jspSmartUpload.jar b/03/WebRoot/WEB-INF/lib/jspSmartUpload.jar new file mode 100644 index 0000000..e297164 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/jspSmartUpload.jar differ diff --git a/03/WebRoot/WEB-INF/lib/jstl-1.2.jar b/03/WebRoot/WEB-INF/lib/jstl-1.2.jar new file mode 100644 index 0000000..ee6f78d Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/jstl-1.2.jar differ diff --git a/03/WebRoot/WEB-INF/lib/jta.jar b/03/WebRoot/WEB-INF/lib/jta.jar new file mode 100644 index 0000000..e0822a9 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/jta.jar differ diff --git a/03/WebRoot/WEB-INF/lib/log4j-1.2.15.jar b/03/WebRoot/WEB-INF/lib/log4j-1.2.15.jar new file mode 100644 index 0000000..c930a6a Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/log4j-1.2.15.jar differ diff --git a/03/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.10-bin.jar b/03/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.10-bin.jar new file mode 100644 index 0000000..33c35c6 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.10-bin.jar differ diff --git a/03/WebRoot/WEB-INF/lib/ognl-2.7.3.jar b/03/WebRoot/WEB-INF/lib/ognl-2.7.3.jar new file mode 100644 index 0000000..6517028 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/ognl-2.7.3.jar differ diff --git a/03/WebRoot/WEB-INF/lib/oscache-2.1.jar b/03/WebRoot/WEB-INF/lib/oscache-2.1.jar new file mode 100644 index 0000000..4496a88 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/oscache-2.1.jar differ diff --git a/03/WebRoot/WEB-INF/lib/proxool-0.8.3.jar b/03/WebRoot/WEB-INF/lib/proxool-0.8.3.jar new file mode 100644 index 0000000..5bc3491 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/proxool-0.8.3.jar differ diff --git a/03/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar b/03/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar new file mode 100644 index 0000000..1439f17 Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar differ diff --git a/03/WebRoot/WEB-INF/lib/xwork-core-2.1.6.jar b/03/WebRoot/WEB-INF/lib/xwork-core-2.1.6.jar new file mode 100644 index 0000000..bd5996b Binary files /dev/null and b/03/WebRoot/WEB-INF/lib/xwork-core-2.1.6.jar differ diff --git a/03/WebRoot/WEB-INF/web.xml b/03/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..21fcb98 --- /dev/null +++ b/03/WebRoot/WEB-INF/web.xml @@ -0,0 +1,15 @@ + + + 22.1 + + struts2 + org.apache.struts2.dispatcher.FilterDispatcher + + + struts2 + /* + + + index.jsp + + \ No newline at end of file diff --git a/03/WebRoot/admin/admin/admin_check.jsp b/03/WebRoot/admin/admin/admin_check.jsp new file mode 100644 index 0000000..1033092 --- /dev/null +++ b/03/WebRoot/admin/admin/admin_check.jsp @@ -0,0 +1,55 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%> +<%@ taglib uri="/struts-tags" prefix="s"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + ղ͵ش-Ա¼ + + + +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
      ţ
      룺
    У룺
        
     
    + +
    +
    +
    + + diff --git a/03/WebRoot/admin/admin/admin_passwordUpdate.jsp b/03/WebRoot/admin/admin/admin_passwordUpdate.jsp new file mode 100644 index 0000000..6710bd4 --- /dev/null +++ b/03/WebRoot/admin/admin/admin_passwordUpdate.jsp @@ -0,0 +1,53 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +ղ͵ش-̨ҳ-Ա޸ + +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + + + +

    +
    + Ա޸
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    ԭ룺
    ȷϣ
    ֤룺
     
    +
    + +
    + ${requestScope.result} +
    + + + diff --git a/03/WebRoot/admin/article/article_query.jsp b/03/WebRoot/admin/article/article_query.jsp new file mode 100644 index 0000000..90341f1 --- /dev/null +++ b/03/WebRoot/admin/article/article_query.jsp @@ -0,0 +1,66 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib prefix="s" uri="/struts-tags" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +ղ͵ش-̨ҳ-²ѯ + + + + + + + + +
    + + + + + +

    ²ѯ

    + + + + + + + + + + + + + + + + + + + +
    ±·ʱ·ʴ
    ϸѯ
    +
    + + + + + + + + + + + +     + + + +
    + + + diff --git a/03/WebRoot/admin/article/article_queryOne.jsp b/03/WebRoot/admin/article/article_queryOne.jsp new file mode 100644 index 0000000..1d717ee --- /dev/null +++ b/03/WebRoot/admin/article/article_queryOne.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib prefix="s" uri="/struts-tags" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +ղ͵ش-̨ҳ-²ѯ + + + + + + + + +
    + + + + + +

      + ${requestScope.articleInfo.title} +

    + + + + + + + +
    ${requestScope.articleInfo.content}
    ˣ${requestScope.articleInfo.author}    ʱ䣺${requestScope.articleInfo.sendTime}    ͣ${requestScope.articleInfo.typeName}    ǷƼ${requestScope.articleInfo.commend}    ʴ${requestScope.articleInfo.visit}
    + + + + +
    + + + diff --git a/03/WebRoot/admin/down.jsp b/03/WebRoot/admin/down.jsp new file mode 100644 index 0000000..f40e5e1 --- /dev/null +++ b/03/WebRoot/admin/down.jsp @@ -0,0 +1,7 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + +
    \ No newline at end of file diff --git a/03/WebRoot/admin/index.jsp b/03/WebRoot/admin/index.jsp new file mode 100644 index 0000000..acf4f35 --- /dev/null +++ b/03/WebRoot/admin/index.jsp @@ -0,0 +1,4 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%> +<% +response.sendRedirect("admin/admin_check.jsp"); +%> diff --git a/03/WebRoot/admin/main.jsp b/03/WebRoot/admin/main.jsp new file mode 100644 index 0000000..d4c3e39 --- /dev/null +++ b/03/WebRoot/admin/main.jsp @@ -0,0 +1,21 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +ղ͵ش-̨ҳ + + + + + + + +
    ӭղ͵ַ̨
    + + + diff --git a/03/WebRoot/admin/photo/photo_query.jsp b/03/WebRoot/admin/photo/photo_query.jsp new file mode 100644 index 0000000..a95e032 --- /dev/null +++ b/03/WebRoot/admin/photo/photo_query.jsp @@ -0,0 +1,102 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +岩͵ش-̨ҳ-ѯ + +<%@ taglib prefix="s" uri="/struts-tags" %> +<% +String info="ȫѯ"; +if(null!=request.getAttribute("info")){ +info=(String)request.getAttribute("info"); +} +%> + + + + + + + +
    + <% + List userInfoList=(List)request.getAttribute("userInfoList"); + for(UserInfo userInfo:userInfoList){ + String photos[]=userInfo.getPicType().split(","); + %> + + + + <% + + if(photos.length>1){ + for(String photo:photos){ + %> + + + + <%} } }%> +
    <%=userInfo.getAccount()%>
    <%=photo%>

    + <%=info%>
    + + + + <% + List list=(List)request.getAttribute("list"); + int lineCount=4; + int size=list.size(); + int rowCount=size/lineCount; + if(size%lineCount!=0){ + rowCount++; + } + for(int i = 0;i + + <% + if(i%lineCount==lineCount-1){ + out.print(""); + } + } + if(rowCount*lineCount-size>0){ + int overCount=rowCount*lineCount-size; + for(int j=0;j "); + } + } + %> + +
    + + + + + + + + + + + + + +
    + + + +
    Ƭ<%=photoInfo.getPhotoType()%>
    Ƭƣ<%=photoInfo.getPhotoName() %>
    ɾ
    +
    +
    + +
    + + + diff --git a/03/WebRoot/admin/top.jsp b/03/WebRoot/admin/top.jsp new file mode 100644 index 0000000..cef87cb --- /dev/null +++ b/03/WebRoot/admin/top.jsp @@ -0,0 +1,33 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String path = request.getContextPath(); +if(null==session.getAttribute("admin")){ + out.print(""); +} +%> + + + + + + + +
      + + + +
    + û    + ¹    + ͼƬ    + ޸ĹԱ    + ˳̨ + +
    + + + + +
      ǰ¼Ա${sessionScope.admin}
    + diff --git a/03/WebRoot/admin/user/user_query.jsp b/03/WebRoot/admin/user/user_query.jsp new file mode 100644 index 0000000..d90339f --- /dev/null +++ b/03/WebRoot/admin/user/user_query.jsp @@ -0,0 +1,71 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +ղ͵ش-̨ҳ-ûѯ + +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    ûѯ

     ûEmailַʵԱ͵ǷƼ/ⶳ
    " type="checkbox" name="account" class="button" id="chk_id">
    + + + + +
    [ȫѡ/ѡ}  
    +
    +
    + + + + + + +     + + + + +
    + + + diff --git a/03/WebRoot/blog/Info_add.jsp b/03/WebRoot/blog/Info_add.jsp new file mode 100644 index 0000000..e6c9505 --- /dev/null +++ b/03/WebRoot/blog/Info_add.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +Сֽ + + +<%@ taglib prefix="s" uri="/struts-tags" %> + + +<% +String account=(String)request.getParameter("account"); +account = new String(account.getBytes("ISO8859_1"), "gbk"); +%> + +
    + +Сֽ + + + + + + + + + + + + + + + +
    ˣ<%=account %>
    ݣ
      + + + + +
    + + +
    + + diff --git a/03/WebRoot/blog/blog.jsp b/03/WebRoot/blog/blog.jsp new file mode 100644 index 0000000..c31a406 --- /dev/null +++ b/03/WebRoot/blog/blog.jsp @@ -0,0 +1,125 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@taglib prefix ="s" uri="/struts-tags"%> + + + +<s:property value="#userInfo.account"/>Ϳռ + +<% +UserInfo userInfo=(UserInfo)session.getAttribute("userInfo"); +String account=userInfo.getAccount(); +String hql = "from ArticleInfo where author = '"+account+"' order by id desc"; +String type=null; +if(null!=request.getParameter("type")){ + type=ToChinese.toChinese(request.getParameter("type")); + hql = "from ArticleInfo where author = '"+account+"' and typeName='"+type+"' order by id desc"; +} +request.setAttribute("type",type); +ObjectDao objectDao= new ObjectDao(); +List list = objectDao.queryList(hql); + +int showNumber = 5; +Integer count = 0; +if (null != request.getParameter("count")) { + count = Integer.valueOf(request.getParameter("count")); +} +list = objectDao.queryList(hql); +int maxPage = list.size(); +if (maxPage % showNumber == 0) { + maxPage = maxPage / showNumber; +} else { + maxPage = maxPage / showNumber + 1; +} +if (0 == count) { + list = objectDao.queryList(hql, showNumber, count); +} else { + count--; + list = objectDao.queryList(hql, showNumber, count * showNumber); +} +request.setAttribute("count", count); +request.setAttribute("list", list); +request.setAttribute("maxPage", maxPage); + + + + +%> + + + + + + + + +
    +
    + + <% + if(list.size()==0){ + out.print("κ£"); + }else{ + for(int i=0;i50){ + content=content.substring(0,50)+"......"; + } + %> + + + + + + + + + + + + + +
    + <%=articleInfo.getTitle()%>
    <%=content%>
    + + ʱ䣺<%=articleInfo.getSendTime()%> | ʴ<%=articleInfo.getVisit() %> | :<%=articleInfo.getTypeName()%>
    >ϸѯ
    +
    + <% } }%> + + + + + + + + + + + + +     + + + + + + + +
    + + + + diff --git a/03/WebRoot/blog/blog_ReArticleInfo_add.jsp b/03/WebRoot/blog/blog_ReArticleInfo_add.jsp new file mode 100644 index 0000000..dd6b699 --- /dev/null +++ b/03/WebRoot/blog/blog_ReArticleInfo_add.jsp @@ -0,0 +1,34 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags" %> +<%request.setAttribute("id",request.getParameter("id")); %> + + + + +
    + + + + + + + + + + + + +
    »ظ${sessionScope.account}
    + +
    + + + diff --git a/03/WebRoot/blog/blog_articleInfo.jsp b/03/WebRoot/blog/blog_articleInfo.jsp new file mode 100644 index 0000000..bf07419 --- /dev/null +++ b/03/WebRoot/blog/blog_articleInfo.jsp @@ -0,0 +1,112 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@taglib prefix ="s" uri="/struts-tags"%> + + + +<s:property value="#userInfo.account"/>Ϳռ + + + + + + + + + + + + +
    +
    + ${requestScope.articleInfo.title} + + + + + + + + +
    ${requestScope.articleInfo.content}
    ${requestScope.articleInfo.typeName } | ˣ${requestScope.articleInfo.author } | ʱ䣺${requestScope.articleInfo.sendTime} | ʴ${requestScope.articleInfo.visit}
    + + + + + + +
    + <%if(null!=session.getAttribute("account")){ + String account=(String)session.getAttribute("account"); + UserInfo userInfo=(UserInfo)session.getAttribute("userInfo"); + if(!account.equals(userInfo.getAccount())){ + %> + ӻظ + <%}}%> +      +    +
    +
    + + + + + + + + + + + + + +
    ظˣ
    ظʱ䣺  + <% + ArticleInfo articleInfo=(ArticleInfo)request.getAttribute("articleInfo"); + String account=null; + if(null!=session.getAttribute("account")){ + account=(String)session.getAttribute("account"); + } + if(articleInfo.getAuthor().equals(account)){ + %> + ɾ + <%} %> +
    +
    +
    + + + + + + +     + + + +
    + + +
    + + + + diff --git a/03/WebRoot/blog/blog_down.jsp b/03/WebRoot/blog/blog_down.jsp new file mode 100644 index 0000000..90a46ac --- /dev/null +++ b/03/WebRoot/blog/blog_down.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<%@taglib prefix="s" uri="/struts-tags" %> + + + + +
    +
    + + + + + + + + + + + + +
    (ûе¼ʾ)
    + + + + + + +
    +
    + + + + +
    diff --git a/03/WebRoot/blog/blog_friends.jsp b/03/WebRoot/blog/blog_friends.jsp new file mode 100644 index 0000000..ea2fec4 --- /dev/null +++ b/03/WebRoot/blog/blog_friends.jsp @@ -0,0 +1,64 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@taglib prefix ="s" uri="/struts-tags"%> + + + +<s:property value="#userInfo.account"/>Ϳռ + +<% +UserInfo userInfo=(UserInfo)session.getAttribute("userInfo"); +String friend_type=userInfo.getFriendType(); +String friends[]=null; +if(!friend_type.equals("")){ + friends=friend_type.split(","); + request.setAttribute("friends",friends); +} +%> + + + + + + + + + +
    +
    Ѳѯ


    + + + ޺ѣ + + + + + + +
    + +     + +

    +
    +
    +
    +
    +
    +
    + + + + diff --git a/03/WebRoot/blog/blog_individual.jsp b/03/WebRoot/blog/blog_individual.jsp new file mode 100644 index 0000000..5075a1a --- /dev/null +++ b/03/WebRoot/blog/blog_individual.jsp @@ -0,0 +1,89 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@taglib prefix ="s" uri="/struts-tags"%> + + + +<s:property value="#userInfo.account"/>Ϳռ + + + + + + + + + + + + + +
    + + + +
    + + + Ϣ
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ${sessionScope.userInfo.realname}Ա${sessionScope.userInfo.sex}
    ${sessionScope.userInfo.email}${sessionScope.userInfo.tel}
    ְҵ${sessionScope.userInfo.profession}QQ룺${sessionScope.userInfo.qq}
    ͥסַ${sessionScope.userInfo.address}
    ҳ${sessionScope.userInfo.homepage}
    ${sessionScope.userInfo.self}
    +
    + + + + +
    + + + + + + + + + + diff --git a/03/WebRoot/blog/blog_left.jsp b/03/WebRoot/blog/blog_left.jsp new file mode 100644 index 0000000..30236ca --- /dev/null +++ b/03/WebRoot/blog/blog_left.jsp @@ -0,0 +1,160 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + +<%@taglib prefix ="s" uri="/struts-tags"%> +<%@ page language="java" import="java.util.*" %> + + + + +<%! String days[]; %> +<% +days=new String[42]; +for(int i=0;i<42;i++) +{ +days[i]=""; +} +%> + +<% +GregorianCalendar currentDay = new GregorianCalendar(); +int today=currentDay.get(Calendar.DAY_OF_MONTH); +int month=currentDay.get(Calendar.MONTH); +int year= currentDay.get(Calendar.YEAR); +Calendar thisMonth=Calendar.getInstance(); +thisMonth.set(Calendar.MONTH, month ); +thisMonth.set(Calendar.YEAR, year ); +thisMonth.setFirstDayOfWeek(Calendar.SUNDAY); +thisMonth.set(Calendar.DAY_OF_MONTH,1); +int firstIndex=thisMonth.get(Calendar.DAY_OF_WEEK)-1; +int maxIndex=thisMonth.getActualMaximum(Calendar.DAY_OF_MONTH); +for(int i=0;i objectDao=new ObjectDao(); +String hql_info="from Info where info_sign=0 and info_account = '"+userInfo.getAccount()+"'"; +List list=objectDao.queryList(hql_info); +%> + + + + + + + <%} %> + <%} }%> +

    +
    +
    +
    + ͵:

    + <%if(null!=session.getAttribute("account")){ + String account1=(String)session.getAttribute("account"); + String account2=userInfo.getAccount(); + if(!account1.equals(account2)){ + %> + Ϊ

    +<% + if(request.getParameter("topId")==null){ + %> + Сֽ
    + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + <% for(int j=0;j<6;j++) { %> + + <% for(int i=j*7;i<(j+1)*7;i++) { %> + + <% } %> + + <% } %> +
    <%=year%><%=month+1%>
    һ
    + <%if((i-firstIndex+1)==today){ +%> + <%=days[i]%> + <% +} else { +%> + <%=days[i]%> + <% +} +%>
    + +
    + + + + + + +
    + + + + +
    + + <%if(list.size()==0){ %> + + + + <%}else{ + int size=list.size(); + if(size>8){ + size=8; + } + for(int i=0;i10){ + content=content.substring(0,10); + } + %> + + + + <%} %> + + + + <%} %> +
    ʱû
    <%=account%>:<%=content%>
    ...
    +

    +
    +
    + \ No newline at end of file diff --git a/03/WebRoot/blog/blog_right.jsp b/03/WebRoot/blog/blog_right.jsp new file mode 100644 index 0000000..fd2389d --- /dev/null +++ b/03/WebRoot/blog/blog_right.jsp @@ -0,0 +1,150 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" + import="java.sql.*" errorPage=""%> + + + + + + +<%@taglib prefix="s" uri="/struts-tags"%> +<% + ObjectDao objectDao = new ObjectDao(); + UserInfo userInfo = (UserInfo) session.getAttribute("userInfo"); + String account = userInfo.getAccount(); + String hql = "select typeName , count(*) as number from ArticleInfo where author='" + + account + "' group by typeName"; + List typeList = objectDao.queryListObject(hql); + + + hql="select id,title from ArticleInfo where author='"+ account + "' order by visit desc";; + List visitList = objectDao.queryListObject(hql); + if(visitList.size()>5){ + visitList=visitList.subList(0,5); + } + + + String friends[]=null; + String friends_type = userInfo.getFriendType(); + if(!friends_type.equals("")){ + friends=friends_type.split(","); + } + + + ObjectDao objectDao1 = new ObjectDao(); + String hql1 = "select photoType , count(*) as number from PhotoInfo where author='" + + account + "' group by photoType"; + List photoType = objectDao1.queryListObject(hql1); + +%> + + + + + + + + +
    + + + + <%if(visitList.size()==0){ %> + + + + <%}else{ + for(int i = 0;i + + + + <%} }%> +
    <%=result1[1]%>
    + + + + +
    + + + + + + + +
    + + <%if(typeList.size()==0){ %> + + + + +<%}else{ +for(int i =0;i + + + +<% }}%> +
    ·
    ><%=result2[0]%><%=result2[1]%>
    + +
    + + + + + + + + + + +
    + <%if(typeList.size()==0){ %> + + + + +<%}else{ +for(int i =0;i + + + +<% }}%> +
    ͼƬ
    ><%=result2[0]%><%=result2[1]%>
    + + + + + + + + + + +
    + + <%if(null==friends) {%> + + + + <%}else{ + int size=friends.length; + if(size>5){ + size=5; + } + for(int i = 0;i + + + + <%} }%> +
    ޺ϵ
    <%=friends[i]%>
    diff --git a/03/WebRoot/blog/blog_top.jsp b/03/WebRoot/blog/blog_top.jsp new file mode 100644 index 0000000..8f15c9f --- /dev/null +++ b/03/WebRoot/blog/blog_top.jsp @@ -0,0 +1,66 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<%@taglib prefix ="s" uri="/struts-tags"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +
    + ӭ | ˳ò + + | ҵIJ + +     +
    + + + + + +
    + + + +
    + + IJ
    + <%=basePath%> +
     
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    ãӭIJ磡ףи飡 + + + + +
    ҵ  |  ҵ  |  ҵ  |  ҵĺ
    + +
    + + + diff --git a/03/WebRoot/blog/info_query.jsp b/03/WebRoot/blog/info_query.jsp new file mode 100644 index 0000000..9a311ff --- /dev/null +++ b/03/WebRoot/blog/info_query.jsp @@ -0,0 +1,58 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@taglib prefix ="s" uri="/struts-tags"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + +<s:property value="#userInfo.account"/>Ϳռ + + + + + + + + + + +
    + + +
    + + + + + + + +
    :
    + + + + + + +     + + + +
    + + + + + +
    + + + + diff --git a/03/WebRoot/blog/photo_query.jsp b/03/WebRoot/blog/photo_query.jsp new file mode 100644 index 0000000..60bad0e --- /dev/null +++ b/03/WebRoot/blog/photo_query.jsp @@ -0,0 +1,97 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@taglib prefix ="s" uri="/struts-tags"%> + + + +<s:property value="#userInfo.account"/>Ϳռ + +<% +String info="Ƭȫѯ"; +if(null!=request.getAttribute("Info")){ + info=(String)request.getAttribute("info"); +} +List list=(List)request.getAttribute("list"); +%> + + + + + + + + + +
    + +
    + <%=info%>

    + + + <% + int lineCount=2; + int size=list.size(); + int rowCount=size/lineCount; + if(size%lineCount!=0){ + rowCount++; + } + for(int i = 0;i + + <% + if(i%lineCount==lineCount-1){ + + out.print(""); + } + } + + if(rowCount*lineCount-size>0){ + int overCount=rowCount*lineCount-size; + for(int j=0;j "); + } + } + %> + +
    + + + + + + + + + + + +
    + + + +
    Ƭ<%=photoInfo.getPhotoType()%>
    Ƭƣ<%=photoInfo.getPhotoName() %>
    +
    + + + +
    + +
    + + + + diff --git a/03/WebRoot/blog/userManager/addUserInfo.jsp b/03/WebRoot/blog/userManager/addUserInfo.jsp new file mode 100644 index 0000000..bd6c8ae --- /dev/null +++ b/03/WebRoot/blog/userManager/addUserInfo.jsp @@ -0,0 +1,163 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +request.setAttribute("homepage",basePath); +%> + + + + + + ղ͵ش-ûע + + <%@ taglib prefix="s" uri="/struts-tags"%> + + + + + +
    + + + + + + +
      | ע     
    + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ûʵ
    ȷ
    ϵQQ
    ַͥԱ
    ְҵϵ绰
    ͷ + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
    +

    +
     
    У
      
    + +
    + +
    + + + + +
    +
    +
    + ʡտƼ޹˾   ߵ绰0431-84948981  84948981 + + +
    + + diff --git a/03/WebRoot/blog/userManager/artType_query.jsp b/03/WebRoot/blog/userManager/artType_query.jsp new file mode 100644 index 0000000..9e96496 --- /dev/null +++ b/03/WebRoot/blog/userManager/artType_query.jsp @@ -0,0 +1,78 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> +${session.account}IJͺ̨-ѯ + + + + + + + + + + + +
      ǰ¼û${session.account}ѯ
    + + + + + +

    +
    +
    + + Ŀǰû + + + + + +
    + + " type="checkbox" name="type" class="button" id="chk_id">  + ')"> + +

    +
    +
    +
    + + + + +
    +[ȫѡ/ѡ}   +
    +
    +
    +

    + + + + + + + +
    +
    + +
    + + + diff --git a/03/WebRoot/blog/userManager/artType_update.jsp b/03/WebRoot/blog/userManager/artType_update.jsp new file mode 100644 index 0000000..1caefd2 --- /dev/null +++ b/03/WebRoot/blog/userManager/artType_update.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +޸ + + +<%@ taglib prefix="s" uri="/struts-tags" %> + +<% +String type=request.getParameter("type"); +type=ToChinese.toChinese(type); +request.setAttribute("type",type); %> + +
    + +޸ + + + + + + + + + + + + + + + +
    ԭƣ<%=type%>
    ƣ
     
    + + +
    + + diff --git a/03/WebRoot/blog/userManager/article_add.jsp b/03/WebRoot/blog/userManager/article_add.jsp new file mode 100644 index 0000000..96390f0 --- /dev/null +++ b/03/WebRoot/blog/userManager/article_add.jsp @@ -0,0 +1,68 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> +${sessionScope.account}IJͺ̨- + +<% +String account = (String) request.getSession().getAttribute("account"); +String hql = "from UserInfo where account = '" + account + "'"; +ObjectDao objectDao = new ObjectDao(); +UserInfo userInfo = (UserInfo) objectDao.queryFrom(hql); +String type = userInfo.getArtType().trim(); +String types[] = type.split(","); +request.setAttribute("types", types); +if(type.equals("")){ +out.print(""); +} + + +%> + + + + + + + +
      ǰ¼û${session.account}
    + + + + + +

    + + + + + + + + + + + + + + + + + + + +
    ±⣺
    ݣ
     

    + + + ${requestScope.result}
    + + + diff --git a/03/WebRoot/blog/userManager/article_query.jsp b/03/WebRoot/blog/userManager/article_query.jsp new file mode 100644 index 0000000..b17cf00 --- /dev/null +++ b/03/WebRoot/blog/userManager/article_query.jsp @@ -0,0 +1,65 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> +${sessionScope.account}IJͺ̨-²ѯ + + + + + + + + + + + + +
      ǰ¼û${session.account}²ѯ
    + + + + + +

    +

    + + + + + + + + + + + + + + + + + + + +
    ʱ
    ޸ ɾ

    + + + + + + + +     + + +
    + + + diff --git a/03/WebRoot/blog/userManager/article_queryContent.jsp b/03/WebRoot/blog/userManager/article_queryContent.jsp new file mode 100644 index 0000000..6b557c4 --- /dev/null +++ b/03/WebRoot/blog/userManager/article_queryContent.jsp @@ -0,0 +1,43 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> +${sessionScope.account}IJͺ̨-ѯ + + + + + + + + + + + + +
      ǰ¼û${session.account}${requestScope.form.title}
    + + + + + +

    +
    +
    + + + + + + + +
    ${requestScope.form.content}
    ${requestScope.form.typeName }   ˣ${requestScope.form.author }   ʱ䣺${requestScope.form.sendTime}   ʴ${requestScope.form.visit}   
    + + + diff --git a/03/WebRoot/blog/userManager/article_update.jsp b/03/WebRoot/blog/userManager/article_update.jsp new file mode 100644 index 0000000..adb3d50 --- /dev/null +++ b/03/WebRoot/blog/userManager/article_update.jsp @@ -0,0 +1,75 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> +${sessionScope.account}IJͺ̨-޸ + + +<% +String account = (String) request.getSession().getAttribute("account"); +String hql = "from UserInfo where account = '" + account + "'"; +ObjectDao objectDao = new ObjectDao(); +UserInfo userInfo = (UserInfo) objectDao.queryFrom(hql); +String type = userInfo.getArtType().trim(); +String types[] = type.split(","); +request.setAttribute("types", types); +if(type.equals("")){ +out.print(""); +} + + +%> + + + + + + + +
      ǰ¼û${session.account}޸
    + + + + + +

    +
    + + + + + + + + + + + + + + + + + + + +
    ±⣺
    ݣ
        
    +
    + + + ${requestScope.result}
    + + + diff --git a/03/WebRoot/blog/userManager/checkUser.jsp b/03/WebRoot/blog/userManager/checkUser.jsp new file mode 100644 index 0000000..3656712 --- /dev/null +++ b/03/WebRoot/blog/userManager/checkUser.jsp @@ -0,0 +1,47 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    û
      룺
    У룺
     
       
    + +
    + + + diff --git a/03/WebRoot/blog/userManager/friends_query.jsp b/03/WebRoot/blog/userManager/friends_query.jsp new file mode 100644 index 0000000..66f9caf --- /dev/null +++ b/03/WebRoot/blog/userManager/friends_query.jsp @@ -0,0 +1,52 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> +${sessionScope.account}IJͺ̨-ѹ + +<% + +%> + + + + + + + +
      ǰ¼û${session.account}Ѳѯ
    + + + + + +

    +
    + + + + +
    + + ">  +     + +

    +
    +
    +
    + [ȫѡ/ѡ}   + + +
    + + + diff --git a/03/WebRoot/blog/userManager/info_query.jsp b/03/WebRoot/blog/userManager/info_query.jsp new file mode 100644 index 0000000..d1e1638 --- /dev/null +++ b/03/WebRoot/blog/userManager/info_query.jsp @@ -0,0 +1,60 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> +<% +String sign=request.getParameter("sign"); +request.setAttribute("sign",sign); +%> + +${sessionScope.account}IJͺ̨-${requestScope.result} + + + + + + + + +
      ǰ¼û${session.account}${requestScope.result}
    + + + + + +

    +
    + + + + + + + + + +
    " type="checkbox" name="id" class="button" id="chk_id"> :
    [ȫѡ/ѡ}   +
    +
    + + + + + + + +     + + +
    + + + diff --git a/03/WebRoot/blog/userManager/manager_down.jsp b/03/WebRoot/blog/userManager/manager_down.jsp new file mode 100644 index 0000000..dee657c --- /dev/null +++ b/03/WebRoot/blog/userManager/manager_down.jsp @@ -0,0 +1,7 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + +
    diff --git a/03/WebRoot/blog/userManager/manager_left.jsp b/03/WebRoot/blog/userManager/manager_left.jsp new file mode 100644 index 0000000..6e4aab6 --- /dev/null +++ b/03/WebRoot/blog/userManager/manager_left.jsp @@ -0,0 +1,81 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +
    + + + + + + + + + + +
    ˹
    ϸϢ
    ޸ĸ
    + + + + + + + + + + + + + +
    ¹
    б
    + + + + + + + + + + + + + +
    Ƭ
    Ƭѯ
    + + + + + + + +
    ѹ
    + + + + + + + + +
    Թ
    + + + + + + + + +
    Сֽ
    鿴ֽ
    + + + + + + + + + + +
    ˳
    ҵIJ
    ˳ϵͳ
    + diff --git a/03/WebRoot/blog/userManager/manager_top.jsp b/03/WebRoot/blog/userManager/manager_top.jsp new file mode 100644 index 0000000..abc6c10 --- /dev/null +++ b/03/WebRoot/blog/userManager/manager_top.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + + + + + + +
    + diff --git a/03/WebRoot/blog/userManager/photo_add.jsp b/03/WebRoot/blog/userManager/photo_add.jsp new file mode 100644 index 0000000..e7dee2f --- /dev/null +++ b/03/WebRoot/blog/userManager/photo_add.jsp @@ -0,0 +1,67 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> +${sessionScope.account}IJͺ̨-Ƭ + +<% +String account = (String) request.getSession().getAttribute("account"); +String hql = "from UserInfo where account = '" + account + "'"; +ObjectDao objectDao = new ObjectDao(); +UserInfo userInfo = (UserInfo) objectDao.queryFrom(hql); +String type = userInfo.getPicType().trim(); +String types[] = type.split(","); +request.setAttribute("types", types); +if(type.equals("")){ +out.print(""); +} + + +%> + + + + + + + +
      ǰ¼û${session.account}Ƭ
    + + + + + +


    + + + + + + + + + + + + + + + + + + + +
    Ƭ⣺
    Ƭַ
     

    + + ${requestScope.result}
    + + + diff --git a/03/WebRoot/blog/userManager/photo_query.jsp b/03/WebRoot/blog/userManager/photo_query.jsp new file mode 100644 index 0000000..136a2c3 --- /dev/null +++ b/03/WebRoot/blog/userManager/photo_query.jsp @@ -0,0 +1,86 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> + +${sessionScope.account}IJͺ̨-ѯ + +<% +List list=(List)request.getAttribute("list"); +%> + + + + + + + +
      ǰ¼û${session.account}ѯ
    + + + + + +

    +
    +
    + + + <% + int lineCount=3; + int size=list.size(); + int rowCount=size/lineCount; + if(size%lineCount!=0){ + rowCount++; + } + for(int i = 0;i + + <% + if(i%lineCount==lineCount-1){ + + out.print(""); + } + } + + if(rowCount*lineCount-size>0){ + int overCount=rowCount*lineCount-size; + for(int j=0;j "); + } + } + %> + +
    + + + + + + + + + + + + + + +
    + + + +
    Ƭ<%=photoInfo.getPhotoType()%>
    Ƭƣ<%=photoInfo.getPhotoName() %>
    ɾ
    +
    + + + diff --git a/03/WebRoot/blog/userManager/photo_queryOne.jsp b/03/WebRoot/blog/userManager/photo_queryOne.jsp new file mode 100644 index 0000000..6aaa038 --- /dev/null +++ b/03/WebRoot/blog/userManager/photo_queryOne.jsp @@ -0,0 +1,22 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> + +Ƭϸѯ + + +  + + + + +
    ">
    + + diff --git a/03/WebRoot/blog/userManager/phtType_query.jsp b/03/WebRoot/blog/userManager/phtType_query.jsp new file mode 100644 index 0000000..94c19ab --- /dev/null +++ b/03/WebRoot/blog/userManager/phtType_query.jsp @@ -0,0 +1,79 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> +${session.account}IJͺ̨-ѯ + + + + + + + + + + + + +
      ǰ¼û${session.account}Ƭѯ
    + + + + + +

    +
    +
    + + ĿǰûƬ + + + + + +
    + + " type="checkbox" name="type" class="button" id="chk_id">  + ')"> + +

    +
    +
    +
    + + + + +
    +[ȫѡ/ѡ}   +
    +
    +
    +

    + + + + + + + +
    +
    + +
    + + + diff --git a/03/WebRoot/blog/userManager/phtType_update.jsp b/03/WebRoot/blog/userManager/phtType_update.jsp new file mode 100644 index 0000000..66cd4f0 --- /dev/null +++ b/03/WebRoot/blog/userManager/phtType_update.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +޸ + + +<%@ taglib prefix="s" uri="/struts-tags" %> + +<% +String type=request.getParameter("type"); +type=ToChinese.toChinese(type); +request.setAttribute("type",type); %> + +
    + +޸ + + + + + + + + + + + + + + + +
    ԭƣ<%=type%>
    ƣ
     
    + + +
    + + diff --git a/03/WebRoot/blog/userManager/userPassword_update.jsp b/03/WebRoot/blog/userManager/userPassword_update.jsp new file mode 100644 index 0000000..064a79d --- /dev/null +++ b/03/WebRoot/blog/userManager/userPassword_update.jsp @@ -0,0 +1,53 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> +<s:property value="#session.account"/>IJͺ̨-û޸ + + + + + + + + + +
      ǰ¼û${session.account}û޸
    + + + + + +

    +
    +
    + + + + + + + + + + + + + + + + + + + +
      룺
      룺
    ȷ룺
     
    + ${requestScope.result}
    + + + diff --git a/03/WebRoot/blog/userManager/user_query.jsp b/03/WebRoot/blog/userManager/user_query.jsp new file mode 100644 index 0000000..ffdda4a --- /dev/null +++ b/03/WebRoot/blog/userManager/user_query.jsp @@ -0,0 +1,91 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> + +<s:property value="#session.account"/>IJͺ̨-ûѯ + + + + + + + + + +
      ǰ¼û${session.account}Ϣѯ
    + + + + + +



    + + + + + + + + + + + + + + + + + + + + +
    ޸ĵϢ
    ˺
       
    ҳ
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + String account = session.getAttribute("account").toString(); + String acNew = new String (account.getBytes("ISO8859-1"),"gbk"); + System.out.println(account); + %> + + +
    Ϣ޸ģ
    ʵְҵ">
    EmailַԱ
    ϵַQQ룺
    ˸ԣ޸Ϣ
    +
    + + +
    + + + diff --git a/03/WebRoot/blog/userManager/user_update.jsp b/03/WebRoot/blog/userManager/user_update.jsp new file mode 100644 index 0000000..a65c737 --- /dev/null +++ b/03/WebRoot/blog/userManager/user_update.jsp @@ -0,0 +1,178 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +<%@ taglib prefix="s" uri="/struts-tags"%> +<% + String account = session.getAttribute("account").toString(); + + +%> + + +<s:property value="#account"/>IJͺ̨-û޸ + + + + + + + + +
      ǰ¼û${session.account}Ϣ޸
    + + + + + +


    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       readonly="true"> + ʵ
    ϵQQ
    ַͥ    
    ְ   ҵϵ绰
    ͷ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + " checked class="button">
         
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
     
       
    У  
      
    + + +
    + + + diff --git a/03/WebRoot/blog_main.jsp b/03/WebRoot/blog_main.jsp new file mode 100644 index 0000000..140f0cd --- /dev/null +++ b/03/WebRoot/blog_main.jsp @@ -0,0 +1,173 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + +ղ͵ش-ҳ + +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + + + + + + +
    + + + + + +
    + + ¼ | ע + + + ӭ | ȫ˳ + | ҵIJͿռ + + +       +
    + + + + + + + + + + + +
    + + + + + + + + + + + +

    + + + + + + + + + + + + + +
    " target="_blank">
    + + + + +
    +
    + + + + + + +
     
    +
    + + + + +
    ӭղ͵شԾ㷢С
    + 飬עԷѵ£
    + Ķ˵£ԽкܺõĹͨύѡ
    +ɣףзݺ!

     


    + + + + + + + + + + + + + + + + + +
    " target="_blank">
    +
    +

    + + + + + + + + + + + + + + + +
    " target="_blank">
    +
    +

    + + + + + + + + + + + + + + + +
    " target="_blank">
    +
    +
    + + + + +
    +
    +
    + ʡտƼ޹˾   ߵ绰0431-84948981  84948981 + + +
    + + + + + diff --git a/03/WebRoot/css/style.css b/03/WebRoot/css/style.css new file mode 100644 index 0000000..75fa28c --- /dev/null +++ b/03/WebRoot/css/style.css @@ -0,0 +1,153 @@ + + \ No newline at end of file diff --git a/03/WebRoot/database/db_database03.sql b/03/WebRoot/database/db_database03.sql new file mode 100644 index 0000000..fe584bc --- /dev/null +++ b/03/WebRoot/database/db_database03.sql @@ -0,0 +1,203 @@ +-- MySQL Administrator dump 1.4 +-- +-- ------------------------------------------------------ +-- Server version 5.0.67-community-nt + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + + +-- +-- Create schema db_blog +-- + +CREATE DATABASE IF NOT EXISTS db_blog; +USE db_blog; + +-- +-- Definition of table `tb_admin` +-- + +DROP TABLE IF EXISTS `tb_admin`; +CREATE TABLE `tb_admin` ( + `id` int(10) unsigned NOT NULL auto_increment, + `account` varchar(45) NOT NULL COMMENT '用户名', + `password` varchar(45) NOT NULL COMMENT '登录密码', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `tb_admin` +-- + +/*!40000 ALTER TABLE `tb_admin` DISABLE KEYS */; +INSERT INTO `tb_admin` (`id`,`account`,`password`) VALUES + (1,'mr','FDB390E945559E74475ED8C8BBB48CA5'); +/*!40000 ALTER TABLE `tb_admin` ENABLE KEYS */; + + +-- +-- Definition of table `tb_article` +-- + +DROP TABLE IF EXISTS `tb_article`; +CREATE TABLE `tb_article` ( + `id` int(10) unsigned NOT NULL auto_increment, + `typeName` varchar(45) NOT NULL COMMENT '文章类别名称', + `title` varchar(45) NOT NULL COMMENT '题目', + `content` varchar(3000) NOT NULL COMMENT '文章主要内容', + `author` varchar(20) NOT NULL COMMENT '发布人', + `sendTime` varchar(45) NOT NULL COMMENT '发布时间', + `visit` int(10) unsigned NOT NULL COMMENT '访问次数', + `commend` varchar(10) NOT NULL COMMENT '是否推荐', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `tb_article` +-- + +/*!40000 ALTER TABLE `tb_article` DISABLE KEYS */; +INSERT INTO `tb_article` (`id`,`typeName`,`title`,`content`,`author`,`sendTime`,`visit`,`commend`) VALUES + (2,'技术','Spring技术入门','Spring是一个开源框架,由Rod Johnson创建,从2003年初正式启动。它能够降低开发企业应用程序的复杂性,可以使用Spring替代EJB开发企业级应用,而不用担心工作量太大、开发进度难以控制和复杂的测试过程等问题。Spring简化了企业应用的开发、降低了开发成本、能够整合各种流行框架。它以IoC(反向控制)和AOP(面向切面编程)两种先进的技术为基础,完美的简化了企业级开发的复杂度。','test','2010-04-22 09:14:52',1,'是'), + (3,'笑话','Hibernate技术入门','话说很久很久以前,在遥远的遥远的天际上…………话说很久很久以前,在遥远的遥远的天际上…………话说很久很久以前,在遥远的遥远的天际上…………话说很久很久以前,在遥远的遥远的天际上…………话说很久很久以前,在遥远的遥远的天际上…………话说很久很久以前,在遥远的遥远的天际上…………话说很久很久以前,在遥远的遥远的天际上…………话说很久很久以前,在遥远的遥远的天际上…………话说很久很久以前,在遥远的遥远的天际上…………','test','2010-04-22 09:16:19',1,'否'), + (4,'技术','struts2高级技术应用','struts2高级技术应用struts2高级技术应用struts2高级技术应用struts2高级技术应用struts2高级技术应用struts2高级技术应用struts2高级技术应用struts2高级技术应用struts2高级技术应用struts2高级技术应用','test','2010-04-22 09:18:19',0,'是'), + (5,'随笔','元宵节','祝您元宵节快乐!','mrwgh','2011-02-17 11:48:40',0,'否'), + (6,'技术','艾瑟顿','艾瑟顿','陈丹丹','2011-04-16 15:14:24',0,'否'), + (7,'技术','圣达菲','圣达菲','cdd','2011-04-16 15:18:55',0,'否'); +/*!40000 ALTER TABLE `tb_article` ENABLE KEYS */; + + +-- +-- Definition of table `tb_info` +-- + +DROP TABLE IF EXISTS `tb_info`; +CREATE TABLE `tb_info` ( + `id` int(10) unsigned NOT NULL auto_increment, + `info_account` varchar(45) NOT NULL COMMENT '发送信息人', + `info_fromAccount` varchar(45) NOT NULL COMMENT '接受信息人', + `info_content` varchar(45) NOT NULL COMMENT '发送内容', + `info_sign` int(10) unsigned NOT NULL COMMENT '留言与小纸条标识', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `tb_info` +-- + +/*!40000 ALTER TABLE `tb_info` DISABLE KEYS */; +INSERT INTO `tb_info` (`id`,`info_account`,`info_fromAccount`,`info_content`,`info_sign`) VALUES + (1,'test','匿名','最近怎么样?',0), + (2,'风轻云淡','cdd','大法官',1), + (3,'风轻云淡','cdd','爱上当飞',1); +/*!40000 ALTER TABLE `tb_info` ENABLE KEYS */; + + +-- +-- Definition of table `tb_photo` +-- + +DROP TABLE IF EXISTS `tb_photo`; +CREATE TABLE `tb_photo` ( + `id` int(10) unsigned NOT NULL auto_increment, + `photoType` varchar(45) NOT NULL COMMENT '照片类型', + `photoName` varchar(45) NOT NULL COMMENT '照片名称', + `photoAddress` varchar(45) NOT NULL COMMENT '照片地址', + `photoVisit` int(10) unsigned NOT NULL COMMENT '访问次数', + `author` varchar(45) NOT NULL COMMENT '用户名', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `tb_photo` +-- + +/*!40000 ALTER TABLE `tb_photo` DISABLE KEYS */; +/*!40000 ALTER TABLE `tb_photo` ENABLE KEYS */; + + +-- +-- Definition of table `tb_rearticle` +-- + +DROP TABLE IF EXISTS `tb_rearticle`; +CREATE TABLE `tb_rearticle` ( + `id` int(10) unsigned NOT NULL auto_increment, + `re_id` int(10) unsigned NOT NULL COMMENT '文章回复人ID号', + `account` varchar(45) NOT NULL COMMENT '文章回复人名称', + `content` varchar(45) NOT NULL COMMENT '文章回复内容', + `re_time` datetime NOT NULL COMMENT '文章回复时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `tb_rearticle` +-- + +/*!40000 ALTER TABLE `tb_rearticle` DISABLE KEYS */; +/*!40000 ALTER TABLE `tb_rearticle` ENABLE KEYS */; + + +-- +-- Definition of table `tb_userinfo` +-- + +DROP TABLE IF EXISTS `tb_userinfo`; +CREATE TABLE `tb_userinfo` ( + `id` int(10) unsigned NOT NULL auto_increment, + `account` varchar(45) NOT NULL COMMENT '用户名', + `password` varchar(45) NOT NULL COMMENT '用户登录密码', + `realname` varchar(45) NOT NULL COMMENT '真实姓名', + `email` varchar(45) NOT NULL COMMENT 'E-mail地址', + `sex` varchar(2) NOT NULL COMMENT '性别', + `tel` int(10) unsigned NOT NULL COMMENT '联系电话', + `profession` varchar(45) NOT NULL COMMENT '职业名称', + `address` varchar(45) NOT NULL COMMENT '联系地址', + `homepage` varchar(45) default NULL COMMENT '主页名称', + `qq` int(10) unsigned NOT NULL COMMENT 'QQ号码', + `headgif` varchar(45) default NULL COMMENT '个人头像地址', + `freeze` varchar(10) default NULL COMMENT '用户是否冻结', + `art_type` varchar(100) default NULL COMMENT '文章类别名称', + `pic_type` varchar(100) default NULL COMMENT '相片类别名称', + `friend_type` varchar(45) default NULL COMMENT '好友名称', + `commend` varchar(45) default NULL COMMENT '是否推荐', + `vistor` int(10) unsigned default '0' COMMENT '访问次数', + `self` varchar(200) default NULL COMMENT '自我评价', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `tb_userinfo` +-- + +/*!40000 ALTER TABLE `tb_userinfo` DISABLE KEYS */; +INSERT INTO `tb_userinfo` (`id`,`account`,`password`,`realname`,`email`,`sex`,`tel`,`profession`,`address`,`homepage`,`qq`,`headgif`,`freeze`,`art_type`,`pic_type`,`friend_type`,`commend`,`vistor`,`self`) VALUES + (1,'test','698D51A19D8A121CE581499D7B701668','测试','mr@163.com','男',1234,'软件工程师','不知','http://192.168.1.199:8080/22.1/test',1234,'images/headgif/1.gif','解冻','技术,笑话','分享','','是',0,'斯蒂芬萨菲'), + (2,'风轻云淡','698D51A19D8A121CE581499D7B701668','测试','mr@1126.com','男',1324,'不告诉你','不知道','http://192.168.1.199:8080/22.1/风轻云淡',2564,'images/headgif/1.gif','解冻','','','','是',0,'阿斯顿飞'), + (3,'wgh','96E79218965EB72C92A549DD5A330112','wgh','wgh717@sohu.com','男',11111111,'程序员','长春市','http://192.168.1.66:8080/577/wgh',1111111111,'images/headgif/6.gif','解冻','','个人写真','','否',0,'平平淡淡才是真!'), + (4,'qq','698D51A19D8A121CE581499D7B701668','qiqi','wgh717@sohu.com','女',111111,'111','长春市','http://192.168.1.66:8080/577/qq',805342,'images/headgif/4.gif','冻结','','','','否',0,'天天'), + (5,'rty','202CB962AC59075B964B07152D234B70','345','rty@ert.fgf','男',345,'345345','345345','http://192.168.1.66:8080/577/rty',345,'images/headgif/2.gif','冻结','','','','否',0,'345'), + (6,'sss','202CB962AC59075B964B07152D234B70','dsa','ssss@163.com','男',123456,'sda','asd','http://192.168.1.66:8080/577/sss',123456,'images/headgif/1.gif','冻结','','','','否',0,'sdfsd'), + (7,'mrwgh','698D51A19D8A121CE581499D7B701668','wanggh','wgh717@sohu.com','女',11111111,'程序员','长春市','http://localhost:8080/577/mrwgh',11111111,'images/headgif/6.gif','解冻','随笔','','','是',0,'平平淡淡才是真!'), + (8,'cdd','96E79218965EB72C92A549DD5A330112','vdd','sdf@sdf.com','男',123123,'123','123','http://127.0.0.1:8080/blog/cdd',23123,'images/headgif/1.gif','冻结','技术','','','否',1,'123'), + (9,'陈丹丹','96E79218965EB72C92A549DD5A330112','陈丹丹','sdf@sdf.com','女',12123,'sdf','sadf ','http://127.0.0.1:8080/blog/陈丹丹',12312,'images/headgif/2.gif','解冻','技术','','','否',3,'234'); +/*!40000 ALTER TABLE `tb_userinfo` ENABLE KEYS */; + + + + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/03/WebRoot/dealwith.jsp b/03/WebRoot/dealwith.jsp new file mode 100644 index 0000000..1b03615 --- /dev/null +++ b/03/WebRoot/dealwith.jsp @@ -0,0 +1,113 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" + import="java.sql.*" errorPage=""%> + +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + +<% + String sign = (String) request.getAttribute("sign"); + System.out.println("dfa:"+sign); + if(sign==null||sign.equals("")){ + session.invalidate(); + out.println(""); + }else{ + if (sign.equals("1")) { + String result = (String) request.getAttribute("result"); + if (result.equals("")) { + out.print(""); + } else { + out.print(""); + } + } + if (sign.equals("2")) { + session.setAttribute("admin",request.getAttribute("admin")); + out.print(""); + } + if(sign.equals("3")){ + out.print(""); + } + if(sign.equals("4")){ + out.print(""); + } + if(sign.equals("5")){ + if(null==request.getAttribute("pageCounter")){ + out.print(""); + }else{ + String result = "ûɹ"; + if(null!=request.getAttribute("result")){ + result=(String)request.getAttribute("result"); + } + Integer pageCounter = (Integer)request.getAttribute("pageCounter"); + out.print(""); + } + } + if(sign.equals("6")){ + out.println(""); + } + if(sign.equals("7")){ + out.print(""); + } + if(sign.equals("8")){ + out.print(""); + } + if(sign.equals("9")){ + out.print(""); + } + if(sign.equals("10")){ + String result = (String)request.getAttribute("result"); + out.print(""); + } + if(sign.equals("11")){ + String result = (String)request.getAttribute("result"); + out.print(""); + } + if(sign.equals("12")){ + Integer id=(Integer)request.getAttribute("id"); + out.print(""); + } + if(sign.equals("13")){ + System.out.print("321:"+sign); + out.print(""); + } + if(sign.equals("14")){ + out.print(""); + } + if(sign.equals("15")){ + String result = (String)request.getAttribute("result"); + out.print(""); + } + if(sign.equals("16")){ + String result = (String)request.getAttribute("result"); + out.print(""); + } + if(sign.equals("17")){ + String sign1=(String)request.getAttribute("sign1"); + String result = (String)request.getAttribute("result"); + out.print(""); + } + if(sign.equals("18")){ + String result = (String)request.getAttribute("result"); + String account1=(String)request.getAttribute("account1"); + out.print(""); + } + if(sign.equals("19")){ + out.print(""); + } + if(sign.equals("20")){ + System.out.print(sign); + out.print(""); + } + if(sign.equals("21")){ + out.print(""); + } + } + +%> + + + + diff --git a/03/WebRoot/image.jsp b/03/WebRoot/image.jsp new file mode 100644 index 0000000..be3f367 --- /dev/null +++ b/03/WebRoot/image.jsp @@ -0,0 +1,74 @@ +<%@ page contentType="image/jpeg" + import="java.awt.*,java.awt.image.*,java.util.*,javax.imageio.*" + pageEncoding="gb2312"%> +<%!Color getRandColor(int fc, int bc) + {//Χɫ + Random random = new Random(); + if (fc > 255) + fc = 255; + if (bc > 255) + bc = 255; + int r = fc + random.nextInt(bc - fc); + int g = fc + random.nextInt(bc - fc); + int b = fc + random.nextInt(bc - fc); + return new Color(r, g, b); + }%><% + response.setHeader("Pragma", "No-cache"); + response.setHeader("Cache-Control", "no-cache"); + response.setDateHeader("Expires", 0); + // ڴдͼ + int width = 60, height = 20; + BufferedImage image = new BufferedImage(width, height, + BufferedImage.TYPE_INT_RGB); + + // ȡͼ + Graphics g = image.getGraphics(); + + // + Random random = new Random(); + + // 趨ɫ + g.setColor(getRandColor(200, 250)); + g.fillRect(0, 0, width, height); + + //趨 + g.setFont(new Font("Times New Roman", Font.PLAIN, 18)); + + // 155ߣʹͼе֤벻ױ̽⵽ + g.setColor(getRandColor(160, 200)); + for (int i = 0; i < 155; i++) + { + int x = random.nextInt(width); + int y = random.nextInt(height); + int xl = random.nextInt(12); + int yl = random.nextInt(12); + g.drawLine(x, y, x + xl, y + yl); + } + + // ȡ֤(4λ) + String sRand = ""; + for (int i = 0; i < 4; i++) + { + String rand = String + .valueOf(random.nextInt(10)); + sRand += rand; + // ֤ʾͼ + g.setColor(new Color(20 + random.nextInt(110), + 20 + random.nextInt(110), 20 + random + .nextInt(110))); + //úɫͬΪ̫ӽֱֻ + g.drawString(rand, 13 * i + 6, 16); + } + + // ֤SESSION + session.setAttribute("rand", sRand); + + // ͼЧ + g.dispose(); + + // ͼҳ + ImageIO + .write(image, "JPEG",response.getOutputStream()); + out.clear(); + out=pageContext.pushBody(); +%> \ No newline at end of file diff --git a/03/WebRoot/images/a_land.gif b/03/WebRoot/images/a_land.gif new file mode 100644 index 0000000..2bddd21 Binary files /dev/null and b/03/WebRoot/images/a_land.gif differ diff --git a/03/WebRoot/images/a_top.gif b/03/WebRoot/images/a_top.gif new file mode 100644 index 0000000..22abcf4 Binary files /dev/null and b/03/WebRoot/images/a_top.gif differ diff --git a/03/WebRoot/images/b_b_top.gif b/03/WebRoot/images/b_b_top.gif new file mode 100644 index 0000000..6aa8d47 Binary files /dev/null and b/03/WebRoot/images/b_b_top.gif differ diff --git a/03/WebRoot/images/b_b_top1.gif b/03/WebRoot/images/b_b_top1.gif new file mode 100644 index 0000000..b925dd8 Binary files /dev/null and b/03/WebRoot/images/b_b_top1.gif differ diff --git a/03/WebRoot/images/b_b_top2.gif b/03/WebRoot/images/b_b_top2.gif new file mode 100644 index 0000000..ea9bb21 Binary files /dev/null and b/03/WebRoot/images/b_b_top2.gif differ diff --git a/03/WebRoot/images/b_l_1.gif b/03/WebRoot/images/b_l_1.gif new file mode 100644 index 0000000..3585d1a Binary files /dev/null and b/03/WebRoot/images/b_l_1.gif differ diff --git a/03/WebRoot/images/b_l_2.gif b/03/WebRoot/images/b_l_2.gif new file mode 100644 index 0000000..6f732b2 Binary files /dev/null and b/03/WebRoot/images/b_l_2.gif differ diff --git a/03/WebRoot/images/b_l_3.gif b/03/WebRoot/images/b_l_3.gif new file mode 100644 index 0000000..4a8b175 Binary files /dev/null and b/03/WebRoot/images/b_l_3.gif differ diff --git a/03/WebRoot/images/b_l_4.gif b/03/WebRoot/images/b_l_4.gif new file mode 100644 index 0000000..fddaaad Binary files /dev/null and b/03/WebRoot/images/b_l_4.gif differ diff --git a/03/WebRoot/images/b_r_1.gif b/03/WebRoot/images/b_r_1.gif new file mode 100644 index 0000000..673fc16 Binary files /dev/null and b/03/WebRoot/images/b_r_1.gif differ diff --git a/03/WebRoot/images/b_r_2.gif b/03/WebRoot/images/b_r_2.gif new file mode 100644 index 0000000..a3a0eb5 Binary files /dev/null and b/03/WebRoot/images/b_r_2.gif differ diff --git a/03/WebRoot/images/b_r_3.gif b/03/WebRoot/images/b_r_3.gif new file mode 100644 index 0000000..4ed36ad Binary files /dev/null and b/03/WebRoot/images/b_r_3.gif differ diff --git a/03/WebRoot/images/b_r_4.gif b/03/WebRoot/images/b_r_4.gif new file mode 100644 index 0000000..6c4f790 Binary files /dev/null and b/03/WebRoot/images/b_r_4.gif differ diff --git a/03/WebRoot/images/b_r_5.gif b/03/WebRoot/images/b_r_5.gif new file mode 100644 index 0000000..cfeaa5b Binary files /dev/null and b/03/WebRoot/images/b_r_5.gif differ diff --git a/03/WebRoot/images/b_top1.gif b/03/WebRoot/images/b_top1.gif new file mode 100644 index 0000000..1480a87 Binary files /dev/null and b/03/WebRoot/images/b_top1.gif differ diff --git a/03/WebRoot/images/b_top2.gif b/03/WebRoot/images/b_top2.gif new file mode 100644 index 0000000..aa97cd4 Binary files /dev/null and b/03/WebRoot/images/b_top2.gif differ diff --git a/03/WebRoot/images/b_top3.gif b/03/WebRoot/images/b_top3.gif new file mode 100644 index 0000000..7b7ac96 Binary files /dev/null and b/03/WebRoot/images/b_top3.gif differ diff --git a/03/WebRoot/images/b_top4.gif b/03/WebRoot/images/b_top4.gif new file mode 100644 index 0000000..07bf5fb Binary files /dev/null and b/03/WebRoot/images/b_top4.gif differ diff --git a/03/WebRoot/images/f_certer.gif b/03/WebRoot/images/f_certer.gif new file mode 100644 index 0000000..34aa495 Binary files /dev/null and b/03/WebRoot/images/f_certer.gif differ diff --git a/03/WebRoot/images/f_commend_article.gif b/03/WebRoot/images/f_commend_article.gif new file mode 100644 index 0000000..9c40a20 Binary files /dev/null and b/03/WebRoot/images/f_commend_article.gif differ diff --git a/03/WebRoot/images/f_commend_blog.gif b/03/WebRoot/images/f_commend_blog.gif new file mode 100644 index 0000000..81a5993 Binary files /dev/null and b/03/WebRoot/images/f_commend_blog.gif differ diff --git a/03/WebRoot/images/f_down.gif b/03/WebRoot/images/f_down.gif new file mode 100644 index 0000000..49bce62 Binary files /dev/null and b/03/WebRoot/images/f_down.gif differ diff --git a/03/WebRoot/images/f_down1.gif b/03/WebRoot/images/f_down1.gif new file mode 100644 index 0000000..08dd673 Binary files /dev/null and b/03/WebRoot/images/f_down1.gif differ diff --git a/03/WebRoot/images/f_down2.gif b/03/WebRoot/images/f_down2.gif new file mode 100644 index 0000000..ebd586b Binary files /dev/null and b/03/WebRoot/images/f_down2.gif differ diff --git a/03/WebRoot/images/f_hot_article.gif b/03/WebRoot/images/f_hot_article.gif new file mode 100644 index 0000000..946ca97 Binary files /dev/null and b/03/WebRoot/images/f_hot_article.gif differ diff --git a/03/WebRoot/images/f_hot_blog.gif b/03/WebRoot/images/f_hot_blog.gif new file mode 100644 index 0000000..08369ae Binary files /dev/null and b/03/WebRoot/images/f_hot_blog.gif differ diff --git a/03/WebRoot/images/f_main.gif b/03/WebRoot/images/f_main.gif new file mode 100644 index 0000000..f76b956 Binary files /dev/null and b/03/WebRoot/images/f_main.gif differ diff --git a/03/WebRoot/images/f_top1.gif b/03/WebRoot/images/f_top1.gif new file mode 100644 index 0000000..9f5287f Binary files /dev/null and b/03/WebRoot/images/f_top1.gif differ diff --git a/03/WebRoot/images/f_top2.gif b/03/WebRoot/images/f_top2.gif new file mode 100644 index 0000000..ec76e5d Binary files /dev/null and b/03/WebRoot/images/f_top2.gif differ diff --git a/03/WebRoot/images/headgif/1.gif b/03/WebRoot/images/headgif/1.gif new file mode 100644 index 0000000..ab4ff91 Binary files /dev/null and b/03/WebRoot/images/headgif/1.gif differ diff --git a/03/WebRoot/images/headgif/10.gif b/03/WebRoot/images/headgif/10.gif new file mode 100644 index 0000000..9bdb3ca Binary files /dev/null and b/03/WebRoot/images/headgif/10.gif differ diff --git a/03/WebRoot/images/headgif/11.gif b/03/WebRoot/images/headgif/11.gif new file mode 100644 index 0000000..a32d93e Binary files /dev/null and b/03/WebRoot/images/headgif/11.gif differ diff --git a/03/WebRoot/images/headgif/12.gif b/03/WebRoot/images/headgif/12.gif new file mode 100644 index 0000000..072a94f Binary files /dev/null and b/03/WebRoot/images/headgif/12.gif differ diff --git a/03/WebRoot/images/headgif/13.gif b/03/WebRoot/images/headgif/13.gif new file mode 100644 index 0000000..0b8d14e Binary files /dev/null and b/03/WebRoot/images/headgif/13.gif differ diff --git a/03/WebRoot/images/headgif/14.gif b/03/WebRoot/images/headgif/14.gif new file mode 100644 index 0000000..b86e4fa Binary files /dev/null and b/03/WebRoot/images/headgif/14.gif differ diff --git a/03/WebRoot/images/headgif/15.gif b/03/WebRoot/images/headgif/15.gif new file mode 100644 index 0000000..a8b18d2 Binary files /dev/null and b/03/WebRoot/images/headgif/15.gif differ diff --git a/03/WebRoot/images/headgif/16.gif b/03/WebRoot/images/headgif/16.gif new file mode 100644 index 0000000..9bcf48c Binary files /dev/null and b/03/WebRoot/images/headgif/16.gif differ diff --git a/03/WebRoot/images/headgif/17.gif b/03/WebRoot/images/headgif/17.gif new file mode 100644 index 0000000..e92e943 Binary files /dev/null and b/03/WebRoot/images/headgif/17.gif differ diff --git a/03/WebRoot/images/headgif/2.gif b/03/WebRoot/images/headgif/2.gif new file mode 100644 index 0000000..10cab90 Binary files /dev/null and b/03/WebRoot/images/headgif/2.gif differ diff --git a/03/WebRoot/images/headgif/3.gif b/03/WebRoot/images/headgif/3.gif new file mode 100644 index 0000000..937e8c2 Binary files /dev/null and b/03/WebRoot/images/headgif/3.gif differ diff --git a/03/WebRoot/images/headgif/4.gif b/03/WebRoot/images/headgif/4.gif new file mode 100644 index 0000000..1743420 Binary files /dev/null and b/03/WebRoot/images/headgif/4.gif differ diff --git a/03/WebRoot/images/headgif/5.gif b/03/WebRoot/images/headgif/5.gif new file mode 100644 index 0000000..47f5afb Binary files /dev/null and b/03/WebRoot/images/headgif/5.gif differ diff --git a/03/WebRoot/images/headgif/6.gif b/03/WebRoot/images/headgif/6.gif new file mode 100644 index 0000000..ebd43d2 Binary files /dev/null and b/03/WebRoot/images/headgif/6.gif differ diff --git a/03/WebRoot/images/headgif/7.gif b/03/WebRoot/images/headgif/7.gif new file mode 100644 index 0000000..0b1adb1 Binary files /dev/null and b/03/WebRoot/images/headgif/7.gif differ diff --git a/03/WebRoot/images/headgif/8.gif b/03/WebRoot/images/headgif/8.gif new file mode 100644 index 0000000..492c09c Binary files /dev/null and b/03/WebRoot/images/headgif/8.gif differ diff --git a/03/WebRoot/images/headgif/9.gif b/03/WebRoot/images/headgif/9.gif new file mode 100644 index 0000000..329d824 Binary files /dev/null and b/03/WebRoot/images/headgif/9.gif differ diff --git a/03/WebRoot/index.jsp b/03/WebRoot/index.jsp new file mode 100644 index 0000000..190bb09 --- /dev/null +++ b/03/WebRoot/index.jsp @@ -0,0 +1,4 @@ +<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%> +<% +response.sendRedirect("blogMain_BlogMain.htm"); +%> \ No newline at end of file diff --git a/03/WebRoot/js/validate.JS b/03/WebRoot/js/validate.JS new file mode 100644 index 0000000..ed1e512 --- /dev/null +++ b/03/WebRoot/js/validate.JS @@ -0,0 +1,135 @@ +function checkEmpty(form){ +for(i=0;i 0) { + for(i=0;i + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + +<% +String path1=request.getServletPath(); +path1 = path1.substring(1); +path1=path1.substring(0, path1.indexOf("/")); + +response.sendRedirect("userInfo_goinUser.htm?account="+path1+""); + +%> diff --git a/03/src/com/mr/dao/ObjectDao.java b/03/src/com/mr/dao/ObjectDao.java new file mode 100644 index 0000000..09e1477 --- /dev/null +++ b/03/src/com/mr/dao/ObjectDao.java @@ -0,0 +1,159 @@ +package com.mr.dao; + +import java.util.List; + +import org.hibernate.Query; +import org.hibernate.Session; +import org.hibernate.SessionFactory; +import org.hibernate.Transaction; +import org.hibernate.cfg.Configuration; + +public class ObjectDao { + private static SessionFactory sessionFactory = null; + private Session session = null;//Session + Transaction tx = null;// + //ݿ + static { + try { + // Hibernateļ + Configuration cfg = new Configuration().configure(); + sessionFactory = cfg.buildSessionFactory(); + } catch (Exception e) { + System.err.println("Ựʧ"); + e.printStackTrace(); + } + } + /** + * ɾ + * @param t + * @return + */ + public boolean deleteT(T t) { + Session session = sessionFactory.openSession();//Session + try { + tx = session.beginTransaction();// + session.delete(t);//ִɾ + tx.commit();//ύ + } catch (Exception e) { + e.printStackTrace(); + return false; + } finally { + session.close();//رSession + } + return true; + } + /** + * + * @param t + * @return + */ + public boolean saveT(T t) { + Session session = sessionFactory.openSession();//Session + try { + tx = session.beginTransaction();// + session.save(t);//ִӲ + tx.commit();//ύ + } catch (Exception e) { + e.printStackTrace(); + return false; + } finally { + session.close();//رSession + } + return true; + } + /** + * ޸ + * @param t + * @return + */ + public boolean updateT(T t) { + Session session = sessionFactory.openSession();//Session + try { + tx = session.beginTransaction();// + session.update(t);//ִ޸IJ + tx.commit();//ύ + } catch (Exception e) { + e.printStackTrace(); + return false; + } finally { + session.close();//رSession + } + return true; + } + /** + * ͨͶIJѯ䷽ + * @param hql + * @return + */ + public List queryList(String hql) { + session = sessionFactory.openSession();//Session + tx = session.beginTransaction();// + List list = null; + try { + Query query = session.createQuery(hql);//hqlвѯ + list = query.list();//صĽתList + } catch (Exception e) { + e.printStackTrace(); + } + tx.commit();//ύ + session.close();//رSession + return list;//List + } + /** + * ڲѯзָķ + * @param hql + * @param showNumber ѯ + * @param beginNumber ѯʼλ + * @return + */ + public List queryList(String hql, int showNumber, int beginNumber) { + session = sessionFactory.openSession();//Session + tx = session.beginTransaction();// + List list = null; + try { + Query query = session.createQuery(hql);//hqlвѯ + query.setMaxResults(showNumber);//òѯ + query.setFirstResult(beginNumber);//òѯʼλ + list = query.list();//صĽתList + } catch (Exception e) { + e.printStackTrace(); + } + tx.commit();//ύ + session.close();//رSession + return list;//List + } + /** + * ѯϢ + * @param hql + * @return + */ + public T queryFrom(String hql) { + T t = null;//ʵ + session = sessionFactory.openSession();//Session + tx = session.beginTransaction();// + try { + Query query = session.createQuery(hql);//hqlвѯ + t = (T) query.uniqueResult();//ѯתΪʵ + } catch (Exception e) { + e.printStackTrace(); + } + tx.commit();//ύ + session.close();//Sessionر + return t;//ض + } + + public List queryListObject(String hql) { + session = sessionFactory.openSession(); + tx = session.beginTransaction(); + List list = null; + try { + Query query = session.createQuery(hql); + list = query.list(); + } catch (Exception e) { + e.printStackTrace(); + } + tx.commit(); + session.close(); + return list; + } +} diff --git a/03/src/com/mr/model/AdminInfo.hbm.xml b/03/src/com/mr/model/AdminInfo.hbm.xml new file mode 100644 index 0000000..414c96c --- /dev/null +++ b/03/src/com/mr/model/AdminInfo.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + diff --git a/03/src/com/mr/model/AdminInfo.java b/03/src/com/mr/model/AdminInfo.java new file mode 100644 index 0000000..bbf0ea5 --- /dev/null +++ b/03/src/com/mr/model/AdminInfo.java @@ -0,0 +1,43 @@ +package com.mr.model; + +public class AdminInfo { + private Integer id = -1; + private String account = ""; + private String password = ""; + private String repassword=""; + + private String code = ""; + public String getCode() { + return code; + } + public void setCode(String code) { + this.code = code; + } + public String getAccount() { + return account; + } + public void setAccount(String account) { + this.account = account; + } + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getPassword() { + return password; + } + public void setPassword(String password) { + this.password = password; + } + + public String getRepassword() { + return repassword; + } + public void setRepassword(String repassword) { + this.repassword = repassword; + } + + +} diff --git a/03/src/com/mr/model/ArticleInfo.hbm.xml b/03/src/com/mr/model/ArticleInfo.hbm.xml new file mode 100644 index 0000000..0f901d0 --- /dev/null +++ b/03/src/com/mr/model/ArticleInfo.hbm.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/03/src/com/mr/model/ArticleInfo.java b/03/src/com/mr/model/ArticleInfo.java new file mode 100644 index 0000000..c38632d --- /dev/null +++ b/03/src/com/mr/model/ArticleInfo.java @@ -0,0 +1,62 @@ +package com.mr.model; + + + +public class ArticleInfo { + private Integer id=-1;//ϵͳԶ + private String typeName=""; // + private String title="";//± + private String content="";// + private String author="";//· + private String sendTime="";//·ʱ + private Integer visit=0;//·ʴ + private String commend="";//Ƽʶ + public String getAuthor() { + return author; + } + public void setAuthor(String author) { + this.author = author; + } + public String getCommend() { + return commend; + } + public void setCommend(String commend) { + this.commend = commend; + } + public String getContent() { + return content; + } + public void setContent(String content) { + this.content = content; + } + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getSendTime() { + return sendTime; + } + public void setSendTime(String sendTime) { + this.sendTime = sendTime; + } + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public String getTypeName() { + return typeName; + } + public void setTypeName(String typeName) { + this.typeName = typeName; + } + public Integer getVisit() { + return visit; + } + public void setVisit(Integer visit) { + this.visit = visit; + } +} diff --git a/03/src/com/mr/model/Info.hbm.xml b/03/src/com/mr/model/Info.hbm.xml new file mode 100644 index 0000000..bf9b685 --- /dev/null +++ b/03/src/com/mr/model/Info.hbm.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/03/src/com/mr/model/Info.java b/03/src/com/mr/model/Info.java new file mode 100644 index 0000000..53974ee --- /dev/null +++ b/03/src/com/mr/model/Info.java @@ -0,0 +1,40 @@ +package com.mr.model; + +public class Info { + private Integer id=-1; + private String info_account=""; + private String info_fromAccount=""; + private String info_content=""; + private Integer info_sign=-1; + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getInfo_account() { + return info_account; + } + public void setInfo_account(String info_account) { + this.info_account = info_account; + } + public String getInfo_content() { + return info_content; + } + public void setInfo_content(String info_content) { + this.info_content = info_content; + } + public String getInfo_fromAccount() { + return info_fromAccount; + } + public void setInfo_fromAccount(String info_fromAccount) { + this.info_fromAccount = info_fromAccount; + } + public Integer getInfo_sign() { + return info_sign; + } + public void setInfo_sign(Integer info_sign) { + this.info_sign = info_sign; + } + +} diff --git a/03/src/com/mr/model/PhotoInfo.hbm.xml b/03/src/com/mr/model/PhotoInfo.hbm.xml new file mode 100644 index 0000000..dbc9156 --- /dev/null +++ b/03/src/com/mr/model/PhotoInfo.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/03/src/com/mr/model/PhotoInfo.java b/03/src/com/mr/model/PhotoInfo.java new file mode 100644 index 0000000..a720bef --- /dev/null +++ b/03/src/com/mr/model/PhotoInfo.java @@ -0,0 +1,80 @@ +package com.mr.model; + +import java.io.File; + +public class PhotoInfo { + private Integer id = -1; + private String photoType = ""; + private String photoName = ""; + private String photoAddress = ""; + private Integer photoVisit = 0; + private String author = ""; + private File upload = null; + /** ***************************** */ + private String uploadContentType = ""; + private String uploadFileName = ""; + private String savePath = ""; + + public String getSavePath() { + return savePath; + } + public void setSavePath(String savePath) { + this.savePath = savePath; + } + public String getAuthor() { + return author; + } + public void setAuthor(String author) { + this.author = author; + } + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getPhotoAddress() { + return photoAddress; + } + public void setPhotoAddress(String photoAddress) { + this.photoAddress = photoAddress; + } + public String getPhotoName() { + return photoName; + } + public void setPhotoName(String photoName) { + this.photoName = photoName; + } + public String getPhotoType() { + return photoType.trim(); + } + public void setPhotoType(String photoType) { + this.photoType = photoType.trim(); + } + public Integer getPhotoVisit() { + return photoVisit; + } + public void setPhotoVisit(Integer photoVisit) { + this.photoVisit = photoVisit; + } + public File getUpload() { + return upload; + } + public void setUpload(File upload) { + this.upload = upload; + } + + public String getUploadContentType() { + return uploadContentType; + } + public void setUploadContentType(String uploadContentType) { + this.uploadContentType = uploadContentType; + } + public String getUploadFileName() { + return uploadFileName; + } + public void setUploadFileName(String uploadFileName) { + this.uploadFileName = uploadFileName; + } + +} diff --git a/03/src/com/mr/model/ReArticleInfo.hbm.xml b/03/src/com/mr/model/ReArticleInfo.hbm.xml new file mode 100644 index 0000000..7d90b1c --- /dev/null +++ b/03/src/com/mr/model/ReArticleInfo.hbm.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/03/src/com/mr/model/ReArticleInfo.java b/03/src/com/mr/model/ReArticleInfo.java new file mode 100644 index 0000000..9f82424 --- /dev/null +++ b/03/src/com/mr/model/ReArticleInfo.java @@ -0,0 +1,40 @@ +package com.mr.model; + +public class ReArticleInfo { + private Integer id=-1; + private Integer re_id=-1; + private String account=""; + private String re_time=""; + private String content = ""; + + public Integer getRe_id() { + return re_id; + } + public void setRe_id(Integer re_id) { + this.re_id = re_id; + } + public String getContent() { + return content; + } + public void setContent(String content) { + this.content = content; + } + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getRe_time() { + return re_time; + } + public void setRe_time(String re_time) { + this.re_time = re_time; + } + public String getAccount() { + return account; + } + public void setAccount(String account) { + this.account = account; + } +} diff --git a/03/src/com/mr/model/UserInfo.hbm.xml b/03/src/com/mr/model/UserInfo.hbm.xml new file mode 100644 index 0000000..c275cdd --- /dev/null +++ b/03/src/com/mr/model/UserInfo.hbm.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/03/src/com/mr/model/UserInfo.java b/03/src/com/mr/model/UserInfo.java new file mode 100644 index 0000000..65091d2 --- /dev/null +++ b/03/src/com/mr/model/UserInfo.java @@ -0,0 +1,153 @@ +package com.mr.model; + +public class UserInfo { + private Integer id; + private String account; + private String password; + private String repassword; + private String realname; + private String email; + private String sex; + private Integer tel; + private String address; + private String homepage; + private Integer qq; + private String headgif; + private String freeze = ""; + private String artType=""; + private String picType=""; + private String commend = ""; + private Integer vistor = 0; + private String self; + private String profession; + private String code; + private String friendType=""; + + public String getCode() { + return code; + } + public void setCode(String code) { + this.code = code; + } + public String getProfession() { + return profession; + } + public void setProfession(String profession) { + this.profession = profession; + } + public String getAccount() { + return account; + } + public void setAccount(String account) { + this.account = account; + } + public String getAddress() { + return address; + } + public void setAddress(String address) { + this.address = address; + } + public String getArtType() { + return artType; + } + public void setArtType(String artType) { + this.artType = artType; + } + + public String getCommend() { + return commend; + } + public void setCommend(String commend) { + this.commend = commend; + } + public String getEmail() { + return email; + } + public void setEmail(String email) { + this.email = email; + } + public String getFreeze() { + return freeze; + } + public void setFreeze(String freeze) { + this.freeze = freeze; + } + public String getHeadgif() { + return headgif; + } + public void setHeadgif(String headgif) { + this.headgif = headgif; + } + public String getHomepage() { + return homepage; + } + public void setHomepage(String homepage) { + this.homepage = homepage; + } + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getPassword() { + return password; + } + public void setPassword(String password) { + this.password = password; + } + public String getPicType() { + return picType; + } + public void setPicType(String picType) { + this.picType = picType; + } + public Integer getQq() { + return qq; + } + public void setQq(Integer qq) { + this.qq = qq; + } + public void setTel(Integer tel) { + this.tel = tel; + } + public String getRealname() { + return realname; + } + public void setRealname(String realname) { + this.realname = realname; + } + public String getSex() { + return sex; + } + public void setSex(String sex) { + this.sex = sex; + } + public Integer getTel() { + return tel; + } + public Integer getVistor() { + return vistor; + } + public void setVistor(Integer vistor) { + this.vistor = vistor; + } + public String getRepassword() { + return repassword; + } + public void setRepassword(String repassword) { + this.repassword = repassword; + } + public String getSelf() { + return self; + } + public void setSelf(String self) { + this.self = self; + } + public String getFriendType() { + return friendType; + } + public void setFriendType(String friendType) { + this.friendType = friendType; + } +} diff --git a/03/src/com/mr/tools/FileOperation.java b/03/src/com/mr/tools/FileOperation.java new file mode 100644 index 0000000..e16013c --- /dev/null +++ b/03/src/com/mr/tools/FileOperation.java @@ -0,0 +1,34 @@ +package com.mr.tools; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; + +public class FileOperation { + + public static boolean buildJSP(String souPath, String desPath, String title) { + FileInputStream fileinputstream = null; + byte[] bytes = null; + try { + fileinputstream = new FileInputStream(souPath); + bytes = new byte[1024 * 5]; + fileinputstream.read(bytes); + fileinputstream.close(); + String templateContent = new String(bytes); + File file = new File(desPath); + if(!file.exists()){ + file.mkdir(); + } + desPath=desPath+"/index.jsp"; + FileOutputStream fileoutputstream = new FileOutputStream(desPath); + byte tag_bytes[] = templateContent.getBytes(); + fileoutputstream.write(tag_bytes); + fileoutputstream.close(); + return true; + } catch (Exception e) { + System.out.println(e); + return false; + } + } + +} diff --git a/03/src/com/mr/tools/ToChinese.java b/03/src/com/mr/tools/ToChinese.java new file mode 100644 index 0000000..c95ab3a --- /dev/null +++ b/03/src/com/mr/tools/ToChinese.java @@ -0,0 +1,19 @@ +package com.mr.tools; + + + +public class ToChinese { + public static String toChinese(String strvalue) { + try { + if (strvalue == null) { + return ""; + } else { + strvalue = new String(strvalue.getBytes("ISO8859_1"), "gb2312"); + return strvalue; + } + } catch (Exception e) { + return ""; + } + } + +} diff --git a/03/src/com/mr/tools/ValidateExpression.java b/03/src/com/mr/tools/ValidateExpression.java new file mode 100644 index 0000000..54b5768 --- /dev/null +++ b/03/src/com/mr/tools/ValidateExpression.java @@ -0,0 +1,81 @@ +package com.mr.tools; + +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class ValidateExpression { + // УEmailַ + public static boolean checkemail(String email) { + String regex = "[a-zA-Z][\\w_]+@\\w+(\\.\\w+)+"; + Pattern p = Pattern.compile(regex); + Matcher m = p.matcher(email); + return m.matches(); + } + // MD5 + public static String encodeMD5(String str) { + if (str == null) { + return null; + } + StringBuilder sb = new StringBuilder(); + try { + MessageDigest code = MessageDigest.getInstance("MD5"); + code.update(str.getBytes()); + byte[] bs = code.digest(); + for (int i = 0; i < bs.length; i++) { + int v = bs[i] & 0xFF; + if (v < 16) { + sb.append(0); + } + sb.append(Integer.toHexString(v)); + } + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + return sb.toString().toUpperCase(); + } + + // ɾַеָ + public static String deleteString(String oldString, String del) { + String oldStrings[] = oldString.split(","); + String newStrings[] = new String[oldStrings.length - 1]; + int j = 0; + for (int i = 0; i < oldStrings.length; i++) { + if (!del.equals(oldStrings[i])) { + newStrings[j] = oldStrings[i]; + j++; + } + } + String sy = ","; + String newString = ""; + for (int a = 0; a < newStrings.length; a++) { + if (a == newStrings.length - 1) { + sy = ""; + } + + newString = newString + newStrings[a] + sy; + } + + return newString; + } + + public static void main(String[] args) { + String str1=",Ƽ,̴ʵ,ֵ,"; + + + String regex="(^,)|(,,)|(,$)"; + String b=str1.replaceAll(regex,""); + + + System.out.println(b); + + } + + + + + +} diff --git a/03/src/com/mr/webiter/A.java b/03/src/com/mr/webiter/A.java new file mode 100644 index 0000000..f43e8fd --- /dev/null +++ b/03/src/com/mr/webiter/A.java @@ -0,0 +1,21 @@ +package com.mr.webiter; + +import java.io.UnsupportedEncodingException; + +public class A { + + /** + * @param args + */ + public static void main(String[] args) { + String account= new String("sdfsdf "); + try { + account = new String(account.getBytes("ISO8859_1"),"gbk"); + + } catch (UnsupportedEncodingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + +} diff --git a/03/src/com/mr/webiter/AdminAction.java b/03/src/com/mr/webiter/AdminAction.java new file mode 100644 index 0000000..c264fb1 --- /dev/null +++ b/03/src/com/mr/webiter/AdminAction.java @@ -0,0 +1,127 @@ +package com.mr.webiter; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts2.ServletActionContext; +import org.apache.struts2.interceptor.ServletRequestAware; + +import com.opensymphony.xwork2.ActionSupport; +import com.opensymphony.xwork2.ModelDriven; +import com.mr.dao.ObjectDao; +import com.mr.model.AdminInfo; + +public class AdminAction extends ActionSupport + implements + ModelDriven, + ServletRequestAware { + private AdminInfo adminInfo = new AdminInfo(); + private ObjectDao objectDao = null; + private String hql = ""; + protected HttpServletRequest request; + + public AdminInfo getModel() { + return adminInfo; + } + + public void setServletRequest(HttpServletRequest request) { + this.request = request; + } + + public void validateAdmin_passwordUpdate() { + String oldPassword = request.getParameter("oldPassword"); + if (null == oldPassword || oldPassword.equals("")) { + this.addFieldError("oldPassword", "ԭ룡"); + } else { + oldPassword = com.mr.tools.ValidateExpression + .encodeMD5(oldPassword); + String admin = (String) request.getSession().getAttribute("admin"); + hql = "from AdminInfo where account = '" + admin + "'"; + objectDao = new ObjectDao(); + AdminInfo admininfo = objectDao.queryFrom(hql); + if (!oldPassword.equals(admininfo.getPassword())) { + this.addFieldError("oldPassword", "ԭ"); + } + } + if (adminInfo.getPassword().equals("")) { + this.addFieldError("password", "룡"); + } + if (adminInfo.getRepassword().equals("")) { + this.addFieldError("repassword", "ȷ룡"); + } + System.out.println("룺" + adminInfo.getPassword()); + System.out.println("ȷϣ" + adminInfo.getRepassword()); + System.out.println("֤룺" + adminInfo.getCode()); + if (!adminInfo.getPassword().equals(adminInfo.getRepassword())) { + this.addFieldError("repassword", "ȷϲһ£"); + } + if (adminInfo.getCode().equals("")) { + this.addFieldError("code", "֤룡"); + } else { + String rand = (String) request.getSession().getAttribute("rand"); + if (!rand.equals(adminInfo.getCode())) { + this.addFieldError("code", "У벻ȷ"); + } + } + } + + public String admin_passwordUpdate() { + String password = adminInfo.getPassword(); + password = com.mr.tools.ValidateExpression.encodeMD5(password); + String admin = (String) request.getSession().getAttribute("admin"); + hql = "from AdminInfo where account = '" + admin + "'"; + objectDao = new ObjectDao(); + adminInfo = objectDao.queryFrom(hql); + adminInfo.setPassword(password); + String result = "Ա޸ʧܣ"; + if (objectDao.updateT(adminInfo)) { + result = "Ա޸ɹ"; + } + request.setAttribute("result", result); + return SUCCESS; + } + + // ̨Ա˳ + public String landOutAdmin() { + request.getSession().invalidate(); + request.setAttribute("sign", "4"); + return "operationAdmin"; + } + + // ̨Աû¼У + public void validateAdmin_check() { + if (adminInfo.getAccount().equals("")) { + this.addFieldError("account", "  ˺ŲΪգ"); + } + if (adminInfo.getPassword().equals("")) { + this.addFieldError("password", "  벻Ϊգ"); + } + if (adminInfo.getCode().equals("")) { + this.addFieldError("code", "  У벻Ϊգ"); + } else { + String rand = (String) request.getSession().getAttribute("rand"); + if (!rand.equals(adminInfo.getCode())) { + this.addFieldError("code", "  У벻ȷ"); + } + } + } + // ̨Ա¼ + public String admin_check() { + objectDao = new ObjectDao(); + String password = com.mr.tools.ValidateExpression.encodeMD5(adminInfo + .getPassword()); + hql = "from AdminInfo where account = '" + adminInfo.getAccount() + "'"; + AdminInfo admin = objectDao.queryFrom(hql); + if (null == admin) { + this.addFieldError("account", "  ûڣ"); + } else { + if (!admin.getPassword().equals(password)) { + this.addFieldError("password", "  "); + } else { + request.setAttribute("admin", admin.getAccount()); + request.setAttribute("sign", "2"); + } + } + return "operationAdmin"; + } + +} diff --git a/03/src/com/mr/webiter/ArticleAction.java b/03/src/com/mr/webiter/ArticleAction.java new file mode 100644 index 0000000..12b1de4 --- /dev/null +++ b/03/src/com/mr/webiter/ArticleAction.java @@ -0,0 +1,282 @@ +package com.mr.webiter; + +import java.io.UnsupportedEncodingException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts2.interceptor.ServletRequestAware; + +import com.opensymphony.xwork2.ActionSupport; +import com.opensymphony.xwork2.ModelDriven; +import com.mr.dao.ObjectDao; +import com.mr.model.ArticleInfo; +import com.mr.model.ReArticleInfo; +import com.mr.model.UserInfo; + +public class ArticleAction extends ActionSupport implements + ModelDriven, ServletRequestAware { + private String hql; + + private ArticleInfo articleInfo = new ArticleInfo(); + + protected HttpServletRequest request; + + private ObjectDao objectDao = null; + + String dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss") + .format(Calendar.getInstance().getTime()); + + public ArticleInfo getModel() { + return articleInfo; + } + + public void setServletRequest(HttpServletRequest request) { + this.request = request; + } + + // Ա¼󣬶µϸѯ + public String admin_articleQueryOne() { + objectDao = new ObjectDao();//ʵ־û + hql = "select author from ArticleInfo group by author";//ѯϸϢhql + List authorList = objectDao.queryListObject(hql);//ִвѯ + request.setAttribute("authorList", authorList); + Integer id = new Integer(request.getParameter("id"));//ȡid + hql = "from ArticleInfo where id = " + id;//idѯϸϢhql + articleInfo = objectDao.queryFrom(hql);//ִвѯ + if (null != request.getParameter("commend")) {//޸µƼ״̬ + if (articleInfo.getCommend().equals("")) { + articleInfo.setCommend(""); + } else { + articleInfo.setCommend(""); + } + objectDao.updateT(articleInfo);//޸µƼ״̬ + } + articleInfo = objectDao.queryFrom(hql);//ٴβѯϸϢ + request.setAttribute("articleInfo", articleInfo); + return "admin_articleQueryOne"; + } + + // Ա¼²ѯ + public String admin_articleQuery() { + // Ƕµȫѯ + hql = "from ArticleInfo";//öȫѯHQL + String account = request.getParameter("account");//ҳеaccount + + + if (null != account) {//жaccountǷΪ + try { + account = new String(account.getBytes("ISO8859_1"),"gbk"); + System.out.println("ssssssss "+account); + } catch (UnsupportedEncodingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + hql = "from ArticleInfo where author = '" + account + "'"; + request.setAttribute("account", account); + } + objectDao = new ObjectDao();//־ûobjectDaoʵ + List list = objectDao.queryList(hql);//ִвѯHQL + //Էҳв + int showNumber = 10; + Integer count = 0; + if (null != request.getParameter("count")) { + count = new Integer(request.getParameter("count")); + } + list = objectDao.queryList(hql); + int maxPage = list.size(); + if (maxPage % showNumber == 0) { + maxPage = maxPage / showNumber; + } else { + maxPage = maxPage / showNumber + 1; + } + if (0 == count) { + list = objectDao.queryList(hql, showNumber, count); + } else { + count--; + list = objectDao.queryList(hql, showNumber, count * showNumber); + } + request.setAttribute("count", count); + request.setAttribute("list", list); + request.setAttribute("maxPage", maxPage); + // Ӧķ + hql = "select author from ArticleInfo group by author"; + List authorList = objectDao.queryListObject(hql); + request.setAttribute("authorList", authorList); + return "admin_articleQuery"; + } + + // ǰ̨µϸѯ + public String f_article_query() { + // µϸѯ + Integer id = new Integer(request.getParameter("id"));//ȡid + hql = "from ArticleInfo where id =" + id;//idѯhql + objectDao = new ObjectDao();//ʵ־û + articleInfo = objectDao.queryFrom(hql);//ִвѯ + String account = (String) request.getSession().getAttribute("account");//ȡaccount + if(null==account){// accountΪ + account=articleInfo.getAuthor();//ȡû + hql = "from UserInfo where account = '" + account + "'";//ûѯhql + ObjectDao objectDao1 = new ObjectDao();//ʵ־û + UserInfo userInfo = objectDao1.queryFrom(hql);//ִвѯ + request.getSession().setAttribute("userInfo", userInfo);//ѯSession + } + if (null == request.getParameter("count")) { + if (!articleInfo.getAuthor().equals(account)) { + articleInfo.setVisit(articleInfo.getVisit() + 1); + objectDao.updateT(articleInfo); + } + } + request.setAttribute("articleInfo", articleInfo);//articleInfo + // »ظݵϸѯ + hql = "from ReArticleInfo where re_id=" + id + " order by id desc";//ѯϸݵhql + ObjectDao re_objectDao = new ObjectDao();//ʵ־û + List list = null;//List + // ҳ + int showNumber = 3; + Integer count = 0; + if (null != request.getParameter("count")) { + count = Integer.valueOf(request.getParameter("count")); + } + list = re_objectDao.queryList(hql); + if(list.size()!=0){ + int maxPage = list.size(); + if (maxPage % showNumber == 0) { + maxPage = maxPage / showNumber; + } else { + maxPage = maxPage / showNumber + 1; + } + if (0 == count) { + list = re_objectDao.queryList(hql, showNumber, count); + } else { + count--; + list = re_objectDao.queryList(hql, showNumber, count * showNumber); + } + request.setAttribute("count", count); + request.setAttribute("list", list); + request.setAttribute("maxPage", maxPage); + } + return "f_article_query"; + } + + public String article_forwardUpdate() { + objectDao = new ObjectDao(); + Integer id = new Integer(request.getParameter("id")); + hql = "from ArticleInfo where id =" + id; + articleInfo = objectDao.queryFrom(hql); + request.setAttribute("articleInfo", articleInfo); + return "article_forwardUpdate"; + } + + public void validateArticle_update() { + if (articleInfo.getTitle().equals("")) { + this.addFieldError("title", "±⣡

    "); + } + if (articleInfo.getContent().equals("")) { + this.addFieldError("content", "ݣ"); + } + + } + + // ޸IJ + public String article_update() { + objectDao = new ObjectDao(); + this.articleInfo.setSendTime(this.dateTimeFormat); + String result = "޸³ɹ"; + if (!objectDao.updateT(articleInfo)) { + result = "޸ʧܣ"; + } + request.setAttribute("result", result); + request.setAttribute("sign", "10"); + return "operationArticle"; + + } + + // ɾ + public String article_delete() { + Integer id = new Integer(request.getParameter("id")); + hql = "from ArticleInfo where id =" + id; + objectDao = new ObjectDao(); + articleInfo = objectDao.queryFrom(hql); + String hql1 = "from ReArticleInfo where re_id =" + id + ""; + ObjectDao objectDao1 = new ObjectDao(); + List list = objectDao1.queryList(hql1); + for (ReArticleInfo reArticleInfo : list) { + objectDao1.deleteT(reArticleInfo); + } + boolean flag = objectDao.deleteT(articleInfo); + String result = "ɾ³ɹ"; + if (!flag) { + result = "ɾʧܣ"; + } + request.setAttribute("result", result); + request.setAttribute("sign", "10"); + return "operationArticle"; + } + + // ϸѯ + public String article_queryContent() { + Integer id = new Integer(request.getParameter("id")); + hql = "from ArticleInfo where id =" + id; + objectDao = new ObjectDao(); + articleInfo = objectDao.queryFrom(hql); + request.setAttribute("form", articleInfo); + return SUCCESS; + } + + // ²ѯ + public String article_query() { + String account = (String) request.getSession().getAttribute("account"); + hql = "from ArticleInfo where author='" + account + + "' order by id desc"; + objectDao = new ObjectDao(); + List list = null; + Integer showNumber = 15; + Integer count = 0; + if (null != request.getParameter("count")) { + count = Integer.valueOf(request.getParameter("count")); + } + list = objectDao.queryList(hql); + Integer maxPage = list.size(); + if (maxPage % showNumber == 0) { + maxPage = maxPage / showNumber; + } else { + maxPage = maxPage / showNumber + 1; + } + if (0 == count) { + list = objectDao.queryList(hql, showNumber, count); + } else { + count--; + list = objectDao.queryList(hql, showNumber, count * showNumber); + } + request.setAttribute("count", count); + request.setAttribute("list", list); + request.setAttribute("maxPage", maxPage); + return SUCCESS; + } + + // ±У + public void validateArticle_add() { + if (articleInfo.getTitle().equals("")) { + this.addFieldError("title", "±⣡

    "); + } + if (articleInfo.getContent().equals("")) { + this.addFieldError("content", "ݣ"); + } + + } + + // + public String article_add() { + objectDao = new ObjectDao(); + this.articleInfo.setSendTime(this.dateTimeFormat); + if (objectDao.saveT(articleInfo)) { + request.setAttribute("result", "³ɹ"); + } else { + request.setAttribute("result", "ʧܣ"); + } + return SUCCESS; + } +} diff --git a/03/src/com/mr/webiter/BlogMainAction.java b/03/src/com/mr/webiter/BlogMainAction.java new file mode 100644 index 0000000..cfff10b --- /dev/null +++ b/03/src/com/mr/webiter/BlogMainAction.java @@ -0,0 +1,69 @@ +package com.mr.webiter; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts2.interceptor.ServletRequestAware; + +import com.mr.dao.ObjectDao; +import com.mr.model.ArticleInfo; +import com.mr.model.UserInfo; +import com.opensymphony.xwork2.ActionSupport; +/** + * ִҳ + * @author CHUNBIN + * + */ +public class BlogMainAction extends ActionSupport implements +ServletRequestAware { + protected HttpServletRequest request; + private ObjectDao userDao = new ObjectDao(); + private ObjectDao articleDao = new ObjectDao(); + private String hql_user_commend = null; + private String hql_user_vistor = null; + private String hql_article_commend = null; + private String hql_article_vistor = null; + + public BlogMainAction() { + hql_user_commend = "from UserInfo where commend='' and freeze='ⶳ'"; + hql_user_vistor = "from UserInfo where freeze='ⶳ' order by vistor desc"; + hql_article_commend = "from ArticleInfo where commend='' and author in (select account from UserInfo where freeze='ⶳ')"; + hql_article_vistor = "from ArticleInfo where author in (select account from UserInfo where freeze='ⶳ') order by visit desc"; + } + + public String BlogMain() { + // жϲƼ + List userCommned = userDao.queryList(hql_user_commend); + if (userCommned.size() > 5) { + userCommned = userCommned.subList(0, 5); + } + request.setAttribute("userCommned", userCommned); + // Ų + List userVistor = userDao.queryList(hql_user_vistor); + if (userVistor.size() > 5) { + userVistor = userVistor.subList(0, 5); + } + request.setAttribute("userVistor", userVistor); + // Ƽ + List articleCommend = articleDao + .queryListObject(hql_article_commend); + if (articleCommend.size() > 5) { + articleCommend = articleCommend.subList(0, 5); + } + request.setAttribute("articleCommend", articleCommend); + // + List articleVistor = articleDao + .queryListObject(hql_article_vistor); + if (articleVistor.size() > 5) { + articleVistor = articleVistor.subList(0, 5); + } + request.setAttribute("articleVistor", articleVistor); + return "blogMain"; + } + + public void setServletRequest(HttpServletRequest request) { + this.request = request; + + } +} diff --git a/03/src/com/mr/webiter/InfoAction.java b/03/src/com/mr/webiter/InfoAction.java new file mode 100644 index 0000000..26b8b55 --- /dev/null +++ b/03/src/com/mr/webiter/InfoAction.java @@ -0,0 +1,145 @@ +package com.mr.webiter; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts2.interceptor.ServletRequestAware; + +import com.opensymphony.xwork2.ActionSupport; +import com.opensymphony.xwork2.ModelDriven; +import com.mr.dao.ObjectDao; +import com.mr.model.Info; +import com.mr.model.UserInfo; + +public class InfoAction extends ActionSupport + implements + ModelDriven, + ServletRequestAware { + protected HttpServletRequest request; + private Info info = new Info(); + private ObjectDao objectDao = null; + + public Info getModel() { + + return info; + } + + public void setServletRequest(HttpServletRequest request) { + this.request = request; + } + + public String deleteInfo() { + objectDao = new ObjectDao(); + String ids[] = request.getParameterValues("id"); + String result="ʧܣ"; + if (null != ids) { + for (String id : ids) { + String hql_info = "from Info where id = " + new Integer(id); + info = objectDao.queryFrom(hql_info); + objectDao.deleteT(info); + } + result="ɹ"; + } + request.setAttribute("result", result); + request.setAttribute("sign", "17"); + request.setAttribute("sign1", request.getParameter("sign")); + return "f_operInfo"; + } + + public String queryInfo() { + Integer sign = Integer.valueOf(request.getParameter("sign")); + String account = (String) request.getSession().getAttribute("account"); + String hql_info = "from Info where info_sign = " + sign + + " and info_account='" + account + "'"; + objectDao = new ObjectDao(); + List list = null; + + int showNumber = 15; + Integer count = 0; + if (null != request.getParameter("count")) { + count = Integer.valueOf(request.getParameter("count")); + } + list = objectDao.queryList(hql_info); + + int maxPage = list.size(); + if (maxPage % showNumber == 0) { + maxPage = maxPage / showNumber; + } else { + maxPage = maxPage / showNumber + 1; + } + if (0 == count) { + list = objectDao.queryList(hql_info, showNumber, count); + } else { + count--; + list = objectDao + .queryList(hql_info, showNumber, count * showNumber); + } + String result = "Բѯ"; + if (sign == 1) { + result = "Сֽѯ"; + } + + request.setAttribute("result", result); + request.setAttribute("count", count); + request.setAttribute("list", list); + request.setAttribute("maxPage", maxPage); + request.setAttribute("sign", sign); + return "queryInfo"; + } + + // ǰ̨ + public String f_addInfo() { + objectDao = new ObjectDao(); + String result = "ʧܣ"; + if (!info.getInfo_account().equals(info.getInfo_fromAccount())) { + objectDao.saveT(info); + result = "ɹ"; + } + request.setAttribute("result", result); + if (null == request.getParameter("sign")) { + request.setAttribute("sign", "15"); + } else { + request.setAttribute("sign", "16"); + } + + return "f_operInfo"; + } + // ǰ̨鿴 + public String f_queryInfo() { + objectDao = new ObjectDao(); + UserInfo userInfo = (UserInfo) request.getSession().getAttribute( + "userInfo"); + objectDao = new ObjectDao(); + String hql_info = "from Info where info_sign=0 and info_account = '" + + userInfo.getAccount() + "'"; + List list = null; + + Integer showNumber = 15; + Integer count = 0; + if (null != request.getParameter("count")) { + count = Integer.valueOf(request.getParameter("count")); + } + list = objectDao.queryList(hql_info); + Integer maxPage = new Integer(list.size()); + if (maxPage % showNumber == 0) { + maxPage = maxPage / showNumber; + } else { + maxPage = maxPage / showNumber + 1; + } + if (0 == count) { + list = objectDao.queryList(hql_info, showNumber, count); + } else { + count--; + list = objectDao + .queryList(hql_info, showNumber, count * showNumber); + } + + request.setAttribute("count", count); + request.setAttribute("list", list); + request.setAttribute("maxPage", maxPage); + + return "f_queryInfo"; + } + +} diff --git a/03/src/com/mr/webiter/PhotoAction.java b/03/src/com/mr/webiter/PhotoAction.java new file mode 100644 index 0000000..f5a19d9 --- /dev/null +++ b/03/src/com/mr/webiter/PhotoAction.java @@ -0,0 +1,160 @@ +package com.mr.webiter; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts2.ServletActionContext; +import org.apache.struts2.interceptor.ServletRequestAware; + +import com.opensymphony.xwork2.ActionSupport; +import com.opensymphony.xwork2.ModelDriven; +import com.mr.dao.ObjectDao; +import com.mr.model.PhotoInfo; +import com.mr.model.UserInfo; + +public class PhotoAction extends ActionSupport + implements + ModelDriven, + ServletRequestAware { + protected HttpServletRequest request; + private PhotoInfo photoInfo = new PhotoInfo(); + private ObjectDao objectDao = null; + + public PhotoInfo getModel() { + // TODO Զɷ + return photoInfo; + } + + public void setServletRequest(HttpServletRequest request) { + this.request = request; + } + + private static void copy(File src, File dst) { + try { + InputStream in = null; + OutputStream out = null; + try { + in = new BufferedInputStream(new FileInputStream(src)); + out = new BufferedOutputStream(new FileOutputStream(dst)); + byte[] buffer = new byte[1024 * 10]; + while (in.read(buffer) > 0) { + out.write(buffer); + } + } finally { + if (null != in) { + in.close(); + } + if (null != out) { + out.close(); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + public String photo_add() throws Exception { + String address = System.currentTimeMillis() + + photoInfo.getUploadFileName().substring( + photoInfo.getUploadFileName().lastIndexOf(".")); + File imageFile = new File(ServletActionContext.getServletContext() + .getRealPath("/photo") + + "/" + address); + photoInfo.setPhotoAddress("photo/" + address); + objectDao = new ObjectDao(); + String result = "ϴʧܣ"; + if (objectDao.saveT(photoInfo)) { + copy(photoInfo.getUpload(), imageFile); + result = "ϴɹ"; + } + request.setAttribute("result", result); + + return SUCCESS; + } + + public String photo_query() { + String account = (String) request.getSession().getAttribute("account"); + String hql = "from PhotoInfo where author='" + account + "'"; + objectDao = new ObjectDao(); + List list = objectDao.queryList(hql); + request.setAttribute("list", list); + return SUCCESS; + } + + public String photo_delete() { + Integer id = Integer.valueOf(request.getParameter("id")); + String hql = "from PhotoInfo where id=" + id + ""; + objectDao = new ObjectDao(); + photoInfo = objectDao.queryFrom(hql); + if (objectDao.deleteT(photoInfo)) { + String path = request + .getRealPath("/" + photoInfo.getPhotoAddress()); + File file = new File(path); + if (file.exists()) { + file.delete(); + } + } + if (null == request.getParameter("admin")) { + request.setAttribute("sign", "19"); + } else { + request.setAttribute("sign", "20"); + } + return "operPhoto"; + } + + public String fphoto_query() { + UserInfo userInfo = (UserInfo) request.getSession().getAttribute( + "userInfo"); + String hql = "from PhotoInfo where author='" + userInfo.getAccount() + + "'"; + if (null != request.getParameter("photoType")) { + String photoType = request.getParameter("photoType"); + try { + photoType = new String(photoType.getBytes("ISO8859_1"), + "gb2312"); + } catch (Exception e) { + e.printStackTrace(); + } + hql = "from PhotoInfo where author='" + userInfo.getAccount() + + "' and photoType='" + photoType + "'"; + request.setAttribute("info", photoType); + } + objectDao = new ObjectDao(); + List list = objectDao.queryList(hql); + request.setAttribute("list", list); + return "fphoto_query"; + } + + public String admin_photoQuery() { + ObjectDao objectDao1 = new ObjectDao(); + String hql = "from UserInfo"; + + List userInfoList = objectDao1.queryList(hql); + request.setAttribute("userInfoList", userInfoList); + + objectDao = new ObjectDao(); + hql = "from PhotoInfo"; + if (null != request.getParameter("photoType")) { + String photoType = request.getParameter("photoType"); + try { + photoType = new String(photoType.getBytes("ISO8859_1"), + "gb2312"); + } catch (Exception e) { + e.printStackTrace(); + } + hql = "from PhotoInfo where photoType='" + photoType + "'"; + request.setAttribute("info", photoType); + } + request.setAttribute("list", objectDao.queryList(hql)); + return "admin_photoQuery"; + } + +} diff --git a/03/src/com/mr/webiter/ReArticleAction.java b/03/src/com/mr/webiter/ReArticleAction.java new file mode 100644 index 0000000..d625036 --- /dev/null +++ b/03/src/com/mr/webiter/ReArticleAction.java @@ -0,0 +1,75 @@ +package com.mr.webiter; + +import java.text.SimpleDateFormat; +import java.util.Calendar; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts2.interceptor.ServletRequestAware; + +import com.opensymphony.xwork2.ActionSupport; +import com.opensymphony.xwork2.ModelDriven; +import com.mr.dao.ObjectDao; +import com.mr.model.ArticleInfo; +import com.mr.model.ReArticleInfo; + +public class ReArticleAction extends ActionSupport + implements + ModelDriven, + ServletRequestAware { + protected HttpServletRequest request; + private ReArticleInfo reArticleInfo = new ReArticleInfo(); + private ObjectDao reart_objectDao = null; + private ObjectDao art_objectDao = null; + private String dateTimeFormat = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss") + .format(Calendar.getInstance().getTime()); + private String account = null; + private String hql = null; + + public ReArticleInfo getModel() { + return this.reArticleInfo; + } + + public void setServletRequest(HttpServletRequest request) { + this.request = request; + } + + + + //ɾظϢ + public String reArticle_delete(){ + Integer id=Integer.valueOf(request.getParameter("id")); + reart_objectDao = new ObjectDao(); + hql = "from ReArticleInfo where id=" + id + " order by id desc"; + reArticleInfo=reart_objectDao.queryFrom(hql); + reart_objectDao.deleteT(reArticleInfo); + request.setAttribute("sign", "12"); + + request.setAttribute("id", reArticleInfo.getRe_id()); + + return "operReArticle"; + } + + + + // ӻظϢ + public String reArticle_add() { + account = (String) request.getSession().getAttribute("account"); + String result = "ӻظϢʧܣ"; + reart_objectDao = new ObjectDao(); + if (null == account || account.equals("")) { + result="ûе¼"; + } else { + if (!reArticleInfo.getContent().equals("")) { + reArticleInfo.setAccount(account); + reArticleInfo.setRe_time(dateTimeFormat); + reart_objectDao.saveT(reArticleInfo); + result = "ӻظϢɹ"; + } + } + request.setAttribute("result", result); + request.setAttribute("sign", "11"); + return "operReArticle"; + } + +} diff --git a/03/src/com/mr/webiter/UserInfoAction.java b/03/src/com/mr/webiter/UserInfoAction.java new file mode 100644 index 0000000..fb338f8 --- /dev/null +++ b/03/src/com/mr/webiter/UserInfoAction.java @@ -0,0 +1,767 @@ +package com.mr.webiter; + +import java.io.File; +import java.io.UnsupportedEncodingException; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts2.ServletActionContext; +import org.apache.struts2.interceptor.ServletRequestAware; + +import com.mr.dao.ObjectDao; +import com.mr.model.ArticleInfo; +import com.mr.model.Info; +import com.mr.model.PhotoInfo; +import com.mr.model.ReArticleInfo; +import com.mr.model.UserInfo; +import com.opensymphony.xwork2.ActionSupport; +import com.opensymphony.xwork2.ModelDriven; + +public class UserInfoAction extends ActionSupport implements ModelDriven, ServletRequestAware{ + +private static final long serialVersionUID = 3496418228419922282L; + +private UserInfo userInfo = new UserInfo(); + +private String hql = ""; + +private ObjectDao objectDao = null; + +protected HttpServletRequest request; + +public UserInfo getModel() { + return userInfo; +} + +public void setServletRequest(HttpServletRequest request) { + this.request = request; +} + +// ɾϢ +public String friend_delete() { + String friendsTypes[] = request.getParameterValues("friends"); + if (friendsTypes != null) { + String account = (String) request.getSession().getAttribute( + "account"); + hql = "from UserInfo where account = '" + account + "'"; + objectDao = new ObjectDao(); + UserInfo user = objectDao.queryFrom(hql); + String date_types = user.getFriendType(); + for (String type : friendsTypes) { + date_types = com.mr.tools.ValidateExpression.deleteString( + date_types, type); + } + user.setFriendType(date_types); + objectDao.updateT(user); + } + return friend_query(); +} + +// ̨ѯû +public String friend_query() { + String account = ""; +// try { + account = (String) request.getSession().getAttribute("account"); + //account = new String(account.getBytes("ISO8859_1"), "gb2312"); + System.out.println("AAAAAAAAaa "+account); +// } catch (UnsupportedEncodingException e) { +// e.printStackTrace(); +// } + + hql = "from UserInfo where account = '" + account + "'"; + System.out.println("HQL"+hql); + objectDao = new ObjectDao(); + userInfo = objectDao.queryFrom(hql); + String friend = userInfo.getFriendType(); + if (!friend.equals("")) { + request.setAttribute("friends", friend.split(",")); + } + String[] ff = friend.split(","); + System.out.println("FFFFFFFFFFf "+ff.length); + return "friend_query"; +} + +// Ӻ +public String friend_add() { + boolean flag = true; + objectDao = new ObjectDao(); + String account = (String) request.getSession().getAttribute("account"); + UserInfo user = objectDao.queryFrom("from UserInfo where account = '" + + account + "'"); + String friends = user.getFriendType(); + System.out.println("Friends "+friends); + UserInfo userInfo = (UserInfo) request.getSession().getAttribute( + "userInfo"); + String account1 = userInfo.getAccount(); // ȡʲ͵û + if (friends == null || friends.equals("")) { + user.setFriendType(account1); + } else { + String types[] = friends.split(","); + for (String type1 : types) { + if (account1.equals(type1)) { + flag = false; + } + } + user.setFriendType(user.getFriendType() + "," + account1); + } + String result = "úѾڣʧܣ"; + if (flag) { + objectDao = new ObjectDao(); + objectDao.updateT(user); + System.out.println("AFTER "+ userInfo.getFriendType() + "," + account1); + result = "ѳɹ"; + } + request.setAttribute("account1", account1); + request.setAttribute("sign", "18"); + request.setAttribute("result", result); + return "operationUser"; +} + +// ɾ +public String phtType_delete() { + String phtTypes[] = request.getParameterValues("type"); + + if (phtTypes != null) { + String account = (String) request.getSession().getAttribute( + "account"); + hql = "from UserInfo where account = '" + account + "'"; + objectDao = new ObjectDao(); + UserInfo user = objectDao.queryFrom(hql); + String date_phtType = user.getPicType(); + for (String phtType : phtTypes) { + date_phtType = com.mr.tools.ValidateExpression.deleteString( + date_phtType, phtType); + hql = "from PhotoInfo where author = '" + account + + "' and photoType = '" + phtType + "'"; + ObjectDao dao = new ObjectDao(); + List list = dao.queryList(hql); + for (PhotoInfo photoInfo : list) { + dao.deleteT(photoInfo); + String path = request.getRealPath("/"+ photoInfo.getPhotoAddress()); + File file = new File(path); + if (file.exists()) { + file.delete(); + } + } + } + user.setPicType(date_phtType); + objectDao.updateT(user); + } + request.setAttribute("sign", "13"); + return "operationUser"; +} + +// ޸Ƭ +public String phtType_update() { + String oldType = request.getParameter("oldType"); + String newsType = request.getParameter("newsType"); + String account = (String) request.getSession().getAttribute("account"); + hql = "from UserInfo where account = '" + account + "'"; + objectDao = new ObjectDao(); + UserInfo user = objectDao.queryFrom(hql); + String date_phtType = user.getPicType(); + String arrays[] = date_phtType.split(","); + boolean flag = true; + for (String array : arrays) { + if (array.equals(newsType)) { + flag = false; + } + } + if (flag) { + if (!newsType.equals("")) { + date_phtType = com.mr.tools.ValidateExpression.deleteString( + date_phtType, oldType); + date_phtType = date_phtType.trim(); + if (date_phtType.equals("")) { + date_phtType = newsType; + } else { + date_phtType = date_phtType + "," + newsType; + } + user.setPicType(date_phtType); + objectDao.updateT(user); + hql = "from PhotoInfo where author = '" + account + + "' and photoType = '" + oldType + "'"; + ObjectDao dao = new ObjectDao(); + List list = dao.queryList(hql); + for (PhotoInfo photoInfo : list) { + photoInfo.setPhotoType(newsType); + System.out.println(newsType); + dao.updateT(photoInfo); + } + } + } + request.setAttribute("sign", "14"); + return "operationUser"; +} + +// ѯƬϢ +public String phtType_query() { + boolean flag = true; + String account = (String) request.getSession().getAttribute("account"); + hql = "from UserInfo where account = '" + account + "'"; + objectDao = new ObjectDao(); + UserInfo user = objectDao.queryFrom(hql); + String pht_type = user.getPicType(); + // + if (!userInfo.getPicType().equals("")) { + String arrays[] = pht_type.split(","); + for (String array : arrays) { + if (array.equals(userInfo.getPicType())) { + this.addFieldError("pht_type", "ظ룡"); + flag = false; + } + } + if (null == pht_type || pht_type.equals("")) { + user.setPicType(userInfo.getPicType()); + } else { + user + .setPicType(user.getPicType() + "," + + userInfo.getPicType()); + } + if (flag) { + objectDao.updateT(user); + user = objectDao.queryFrom(hql); + pht_type = user.getPicType(); + } + } + // ѯ + pht_type = pht_type.trim(); + if (!pht_type.equals("")) { + String pht_types[] = pht_type.split(","); + request.setAttribute("pht_types", pht_types); + } + return SUCCESS; +} + +// תµҳ棬Ҫµת +public String forwardAddArticle() { + String account = (String) request.getSession().getAttribute("account"); + hql = "from UserInfo where account = '" + account + "'"; + objectDao = new ObjectDao(); + UserInfo userInfo = (UserInfo) objectDao.queryFrom(hql); + String type = userInfo.getArtType(); + String types[] = type.split(","); + request.setAttribute("types", types); + return "forwardAddArticle"; +} + +// ޸ +public String artType_update() { + String oldType = request.getParameter("oldType"); + String newsType = request.getParameter("newsType"); + String account = (String) request.getSession().getAttribute("account"); + hql = "from UserInfo where account = '" + account + "'"; + objectDao = new ObjectDao(); + UserInfo user = objectDao.queryFrom(hql); + String date_artType = user.getArtType(); + String arrays[] = date_artType.split(","); + boolean flag = true; + for (String array : arrays) { + if (array.equals(newsType)) { + flag = false; + } + } + if (flag) { + if (!newsType.equals("")) { + date_artType = com.mr.tools.ValidateExpression.deleteString( + date_artType, oldType); + date_artType = date_artType.trim(); + if (date_artType.equals("")) { + date_artType = newsType; + } else { + date_artType = date_artType + "," + newsType; + } + user.setArtType(date_artType); + objectDao.updateT(user); + hql = "from ArticleInfo where author = '" + account + + "' and typeName = '" + oldType + "'"; + ObjectDao dao = new ObjectDao(); + List list = dao.queryList(hql); + for (ArticleInfo articleInfo : list) { + articleInfo.setTypeName(newsType); + dao.updateT(articleInfo); + } + } + } + request.setAttribute("sign", "9"); + return "operationUser"; +} + +// ɾ +public String artType_delete() { + String artTypes[] = request.getParameterValues("type"); + if (artTypes != null) { + String account = (String) request.getSession().getAttribute("account");//ȡûϢ + hql = "from UserInfo where account = '" + account + "'";//ѯûhql + objectDao = new ObjectDao(); + UserInfo user = objectDao.queryFrom(hql);//ִвѯ + String date_artType = user.getArtType(); + for (String artType : artTypes) {// + date_artType = com.mr.tools.ValidateExpression.deleteString(date_artType, artType); + hql = "from ArticleInfo where author = '" + account+ "' and typeName = '" + artType + "'"; + ObjectDao dao = new ObjectDao(); + List list = dao.queryList(hql); + for (ArticleInfo articleInfo : list) { + dao.deleteT(articleInfo);//ɾ + } + } + user.setArtType(date_artType); + objectDao.updateT(user);//ûϢ + } + request.setAttribute("sign", "8"); + return "operationUser"; +} + +// ѯϢ +public String artType_query() { + boolean flag = true; + String account = (String) request.getSession().getAttribute("account"); + hql = "from UserInfo where account = '" + account + "'"; + objectDao = new ObjectDao(); + UserInfo user = objectDao.queryFrom(hql); + String art_type = user.getArtType(); + // + if (!userInfo.getArtType().equals("")) { + hql = "from UserInfo where account = '" + account + "'"; + objectDao = new ObjectDao(); + user = objectDao.queryFrom(hql); + art_type = user.getArtType(); + String arrays[] = art_type.split(","); + for (String array : arrays) { + if (array.equals(userInfo.getArtType())) { + this.addFieldError("ary_type", "ظ룡"); + flag = false; + } + } + if (null == art_type || art_type.equals("")) { + user.setArtType(userInfo.getArtType()); + } else { + user + .setArtType(user.getArtType() + "," + + userInfo.getArtType()); + } + if (flag) { + objectDao.updateT(user); + user = objectDao.queryFrom(hql); + art_type = user.getArtType(); + } + } + // ѯ + art_type = art_type.trim(); + if (!art_type.equals("")) { + String art_types[] = art_type.split(","); + request.setAttribute("art_types", art_types); + } + return SUCCESS; +} + +// ޸ûУ +public void validateUserPassword_update() { + String oldPassword = request.getParameter("oldPassword"); + if (null == oldPassword || oldPassword.equals("")) { + this.addFieldError("oldPassword", "ԭ룡"); + } + if (userInfo.getPassword().equals("")) { + this.addFieldError("password", "룡"); + } + if (userInfo.getRepassword().equals("")) { + this.addFieldError("repassword", "ȷϣ"); + } + if (!userInfo.getPassword().equals(userInfo.getRepassword())) { + this.addFieldError("repassword", "ȷ벻һ£"); + } + + oldPassword = com.mr.tools.ValidateExpression.encodeMD5(oldPassword); + String account = (String) request.getSession().getAttribute("account"); + objectDao = new ObjectDao(); + hql = "from UserInfo where account = '" + account + "'"; + userInfo = objectDao.queryFrom(hql); + String password = userInfo.getPassword(); + if (!password.equals(oldPassword)) { + this.addFieldError("oldPassword", "ԭ벻ȷ"); + } + +} + +// ޸ûIJ +public String userPassword_update() { + String oldPassword = com.mr.tools.ValidateExpression.encodeMD5(request.getParameter("password")); + userInfo.setPassword(oldPassword); + String result = "޸ʧܣ"; + if (objectDao.updateT(userInfo)) { + result = "޸ɹ"; + } + request.setAttribute("result", result); + return SUCCESS; +} + +// ޸ĸϢУ +public void validateUser_update() { + objectDao = new ObjectDao(); + if (this.userInfo.getRealname().equals("")) { + this.addFieldError("realname", "ûʵΪգ"); + } + if (userInfo.getEmail().equals("")) { + this.addFieldError("email", "䲻Ϊգ"); + } else { + if (!com.mr.tools.ValidateExpression + .checkemail(userInfo.getEmail())) { + this.addFieldError("email", "Emailַʽȷ"); + } + } + if (userInfo.getAddress().equals("")) { + this.addFieldError("address", "ַͥΪգ"); + } + if (null == userInfo.getQq()) { + this.addFieldError("qq", "QQ벻ΪջΪ֣"); + } + if (null == userInfo.getTel()) { + this.addFieldError("tel", "绰ΪջΪ֣"); + } + if (userInfo.getProfession().equals("")) { + this.addFieldError("profession", "ְҵΪգ"); + } + String rand = (String) request.getSession().getAttribute("rand"); + if (!rand.equals(userInfo.getCode())) { + this.addFieldError("code", "У"); + } +} + +// ޸ĸϢ +public String user_update() { + objectDao = new ObjectDao(); + hql = "from UserInfo where account = '" + userInfo.getAccount() + "'"; + UserInfo user = objectDao.queryFrom(hql); + user.setRealname(userInfo.getRealname()); + user.setEmail(userInfo.getEmail()); + user.setQq(userInfo.getQq()); + user.setAddress(userInfo.getAddress()); + user.setSex(userInfo.getSex()); + user.setProfession(userInfo.getProfession()); + user.setTel(userInfo.getTel()); + user.setHeadgif(userInfo.getHeadgif()); + user.setSelf(userInfo.getSelf()); + if (objectDao.updateT(user)) { + return goinUserManager(); + } else { + request.setAttribute("sign", "5"); + return "operationUser"; + } +} + +// ûidѯûϢص޸ҳ +public String userSelectOne() { + String account = ""; + try { + account = (String) request.getParameter("account"); + account = new String(account.getBytes("ISO8859_1"), "gb2312"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + hql = "from UserInfo where account = '" + account + "'"; + objectDao = new ObjectDao(); + UserInfo userInfo = objectDao.queryFrom(hql); + request.setAttribute("userInfo", userInfo); + return "userSelectOne"; +} + +// sessionеĶݽ벩Ϳռ +public String goinUserManager() { + if (null == request.getSession().getAttribute("account")) { + request.setAttribute("sign", "7"); + return "operationUser"; + } else { + String account = (String) request.getSession().getAttribute( + "account"); + objectDao = new ObjectDao(); + hql = "from UserInfo where account = '" + account + "'"; + userInfo = objectDao.queryFrom(hql); + if (!userInfo.getAccount().equals(account) + && null == request.getSession().getAttribute("userInfo")) { + userInfo.setVistor(userInfo.getVistor() + 1); + objectDao.updateT(userInfo); + } + + request.setAttribute("userInfo", userInfo); + return "goinUserManager"; + } +} + +// û벩ͿռIJ +public String goinUser() { + String account = request.getParameter("account"); + try { + account = new String(account.getBytes("ISO8859_1"), "gb2312"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + hql = "from UserInfo where account = '" + account + "'"; + objectDao = new ObjectDao(); + UserInfo userInfo = objectDao.queryFrom(hql); + if (userInfo.getFreeze().equals("")) { + request.setAttribute("sign", "7"); + return "operationUser"; + } else { + objectDao = new ObjectDao(); + if (!userInfo.getAccount().equals(account)) { + userInfo.setVistor(userInfo.getVistor() + 1); + objectDao.updateT(userInfo); + } + request.getSession().setAttribute("userInfo", userInfo); + } + return "goinUser"; +} + +// û¼У +public void validateCheckUser() { + if (userInfo.getAccount().equals("")) { + this.addFieldError("account", "û"); + } + if (userInfo.getPassword().equals("")) { + this.addFieldError("password", "룡"); + } + if (userInfo.getCode().equals("")) { + this.addFieldError("code", "У룡"); + } else { + String rand = (String) request.getSession().getAttribute("rand"); + if (!rand.equals(userInfo.getCode())) { + this.addFieldError("code", "У"); + } + } + objectDao = new ObjectDao(); + hql = "from UserInfo where account = '" + userInfo.getAccount() + "'"; + UserInfo user = objectDao.queryFrom(hql); + if (null == user) { + this.addFieldError("account", "ûڣ"); + } else { + String password = com.mr.tools.ValidateExpression + .encodeMD5(userInfo.getPassword()); + if (!password.equals(user.getPassword())) { + this.addFieldError("password", ""); + } + } +} + +// û¼ +public String checkUser() { + objectDao = new ObjectDao(); + hql = "from UserInfo where account = '" + userInfo.getAccount() + "'"; + UserInfo user = objectDao.queryFrom(hql); + request.setAttribute("sign", "6"); + request.getSession().setAttribute("account", user.getAccount()); + request.getSession().setAttribute("freeze", user.getFreeze()); + return "operationUser"; +} + +// ûƼƼ +public String updateCommendUser() { + objectDao = new ObjectDao();//ʵObjectDao + Integer id = Integer.valueOf(request.getParameter("id"));//ȡid + hql = "from UserInfo where id = " + id;//idֵUser + UserInfo userInfo = objectDao.queryFrom(hql); + if (userInfo.getFreeze().equals("ⶳ")) {//жϸûǷ񱻽ⶳ + if (userInfo.getCommend().equals("")) {//жϸûǷƼ + userInfo.setCommend(""); + } else if (userInfo.getCommend().equals("")) { + userInfo.setCommend(""); + } + } else { + request.setAttribute("result", "ûûбⶳܹƼ"); + } + boolean flag = objectDao.updateT(userInfo);//޸û͵Ƽ״̬ + if (flag) { + Integer pageCounter = Integer.valueOf(request.getParameter("count")); + request.setAttribute("pageCounter", pageCounter); + } + request.setAttribute("sign", "5"); + return "operationUser"; +} + +// ûⶳ +public String updateFreezeUser() { + objectDao = new ObjectDao(); + Integer id = Integer.valueOf(request.getParameter("id")); + hql = "from UserInfo where id = " + id; + UserInfo userInfo = objectDao.queryFrom(hql); + if (userInfo.getFreeze().equals("ⶳ")) { + userInfo.setFreeze(""); + } else if (userInfo.getFreeze().equals("")) { + userInfo.setFreeze("ⶳ"); + } + boolean flag = objectDao.updateT(userInfo); + if (flag) { + Integer pageCounter = Integer + .valueOf(request.getParameter("count")); + request.setAttribute("pageCounter", pageCounter); + } + request.setAttribute("sign", "5"); + return "operationUser"; +} + +// ȫ˳ +public String landOutUser() { + request.getSession().invalidate(); + request.setAttribute("sign", "3"); + return "operationUser"; +} + +// ûѯ +public String queryUser() { + hql = "from UserInfo order by id desc"; + objectDao = new ObjectDao(); + List list = null; + Integer showNumber = 15; + Integer count = 0; + if (null != request.getParameter("count")) { + count = Integer.valueOf(request.getParameter("count")); + } + list = objectDao.queryList(hql); + Integer maxPage = new Integer(list.size()); + if (maxPage % showNumber == 0) { + maxPage = maxPage / showNumber; + } else { + maxPage = maxPage / showNumber + 1; + } + if (0 == count) { + list = objectDao.queryList(hql, showNumber, count); + } else { + count--; + list = objectDao.queryList(hql, showNumber, count * showNumber); + } + request.setAttribute("count", count); + request.setAttribute("list", list); + request.setAttribute("maxPage", maxPage); + return "queryUser"; +} + +// ûעУ +public void validateAddUserInfo() { + objectDao = new ObjectDao(); + if (this.userInfo.getAccount().equals("")) { + this.addFieldError("account", "ûΪգ"); + } else { + objectDao = new ObjectDao(); + hql = "from UserInfo where account= '" + userInfo.getAccount()+ "'"; + if (null != objectDao.queryFrom(hql)) { + this.addFieldError("account", "ûظ룡"); + } + } + + if (this.userInfo.getRealname().equals("")) { + this.addFieldError("realname", "ûʵΪգ"); + } + if (userInfo.getPassword().equals("")) { + this.addFieldError("password", "벻Ϊգ"); + } + if (userInfo.getRepassword().equals("")) { + this.addFieldError("repassword", "ȷϲΪգ"); + } + if (!userInfo.getPassword().equals(userInfo.getRepassword())) { + this.addFieldError("reepassword", "ȷϲһ£룡"); + } + if (userInfo.getEmail().equals("")) { + this.addFieldError("email", "䲻Ϊգ"); + } else { + if (!com.mr.tools.ValidateExpression + .checkemail(userInfo.getEmail())) { + this.addFieldError("email", "Emailַʽȷ"); + } + } + if (userInfo.getAddress().equals("")) { + this.addFieldError("address", "ַͥΪգ"); + } + if (null == userInfo.getQq()) { + this.addFieldError("qq", "QQ벻ΪջΪ֣"); + } + if (null == userInfo.getTel()) { + this.addFieldError("tel", "绰ΪջΪ֣"); + } + if (userInfo.getProfession().equals("")) { + this.addFieldError("profession", "ְҵΪգ"); + } + String rand = (String) request.getSession().getAttribute("rand"); + if (!rand.equals(userInfo.getCode())) { + this.addFieldError("code", "У"); + } + +} + +// ʵûעĹ +public String addUserInfo() { + objectDao = new ObjectDao(); + userInfo.setPassword(com.mr.tools.ValidateExpression.encodeMD5(userInfo + .getPassword())); + userInfo.setHomepage(userInfo.getHomepage() + userInfo.getAccount()); + boolean flag = objectDao.saveT(userInfo); + String result = ""; + if (flag) { + String descPath = ServletActionContext.getRequest().getRealPath("/" + userInfo.getAccount() + ""); + String sourPath = ServletActionContext.getRequest().getRealPath("/templet/index.jsp"); + if (com.mr.tools.FileOperation.buildJSP(sourPath, descPath,userInfo.getAccount())) { + result = "עɹ"; + request.getSession().setAttribute("freeze",userInfo.getFreeze()); + request.getSession().setAttribute("account",userInfo.getAccount()); + } + } + request.setAttribute("result", result); + request.setAttribute("sign", "1"); + return "operationUser"; +} + +// ûɾ +public String admin_deleteUserInfo() { + String accounts[] = request.getParameterValues("account"); + for (String account : accounts) { + // ɾ + ObjectDao objectDao1 = new ObjectDao(); + hql = "from ArticleInfo where author='" + account + "'"; + List articleInfoList = objectDao1.queryList(hql); + for (ArticleInfo articleInfo : articleInfoList) { + // ɾظϢ + ObjectDao objectDao2 = new ObjectDao(); + hql = "from ReArticleInfo where re_id=" + articleInfo.getId(); + List reArticleInfoList = objectDao2 + .queryList(hql); + for (ReArticleInfo reArticleInfo : reArticleInfoList) { + objectDao2.deleteT(reArticleInfo); + } + objectDao1.deleteT(articleInfo); + } + // ɾ + ObjectDao objectDao3 = new ObjectDao(); + hql = "from PhotoInfo where author='" + account + "'"; + List photoInfoList = objectDao3.queryList(hql); + for (PhotoInfo photoInfo : photoInfoList) { + String path1 = request.getRealPath("/" + + photoInfo.getPhotoAddress()); + File file1 = new File(path1); + if (file1.exists()) { + file1.delete(); + } + objectDao3.deleteT(photoInfo); + } + // ɾСֽϢIJ + ObjectDao objectDao4 = new ObjectDao(); + hql = "from Info where info_account='" + account + "'"; + List infoList = objectDao4.queryList(hql); + for (Info info : infoList) { + objectDao4.deleteT(info); + } + // ɾû + objectDao = new ObjectDao(); + hql = "from UserInfo where account='" + account + "'"; + userInfo = objectDao.queryFrom(hql); + objectDao.deleteT(userInfo); + String path2 = request.getRealPath("/" + account); + File file1 = new File(path2); + if (file1.exists()) { + file1.delete(); + } + + } + request.setAttribute("sign", "21"); + return "operationUser"; +} +} + diff --git a/03/src/com/mr/webiter/UserInfoAction.properties b/03/src/com/mr/webiter/UserInfoAction.properties new file mode 100644 index 0000000..c4427ef --- /dev/null +++ b/03/src/com/mr/webiter/UserInfoAction.properties @@ -0,0 +1,3 @@ +invalid.fieldvalue.tel= +invalid.fieldvalue.qq= +invalid.fieldvalue.born= \ No newline at end of file diff --git a/03/src/hibernate.cfg.xml b/03/src/hibernate.cfg.xml new file mode 100644 index 0000000..74a1e91 --- /dev/null +++ b/03/src/hibernate.cfg.xml @@ -0,0 +1,27 @@ + + + + + + + com.mysql.jdbc.Driver + + jdbc:mysql://localhost:3306/db_blog + + root + + 111 + + org.hibernate.dialect.MySQLDialect + + true + + + + + + + + + \ No newline at end of file diff --git a/03/src/struts.properties b/03/src/struts.properties new file mode 100644 index 0000000..9272019 --- /dev/null +++ b/03/src/struts.properties @@ -0,0 +1,7 @@ +struts.ui.theme=simple +struts.i18n.encoding=gb2312 +struts.action.extension=htm +struts.multipart.saveDir=d:/tmp +struts.messages.error.content.type.not.allowed=\u4e0a\u4f20\u7684\u6587\u4ef6\u7c7b\u578b\u53ea\u80fd\u662f\u56fe\u7247\u6587\u4ef6\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01 +struts.messages.error.file.too.large=\u60a8\u8981\u4e0a\u4f20\u7684\u6587\u4ef6\u592a\u5927\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01 +struts.messages.error.uploading=\u60a8\u8981\u4e0a\u4f20\u7684\u5185\u5bb9\u5931\u8d25\uff01 diff --git a/03/src/struts.xml b/03/src/struts.xml new file mode 100644 index 0000000..c92b129 --- /dev/null +++ b/03/src/struts.xml @@ -0,0 +1,59 @@ + + + + + + /blog_main.jsp + + + /blog/userManager/{1}.jsp + /blog/userManager/{1}.jsp + /admin/user/user_query.jsp + /dealwith.jsp + /blog/blog.jsp + /blog/userManager/user_query.jsp + /blog/userManager/user_update.jsp + /blog/userManager/article_add.jsp + /blog/userManager/friends_query.jsp + + + /admin/admin/{1}.jsp + /admin/admin/{1}.jsp + /dealwith.jsp + + + /blog/userManager/{1}.jsp + /blog/userManager/{1}.jsp + /blog/userManager/article_update.jsp + /dealwith.jsp + /blog/blog_articleInfo.jsp + /admin/article/article_query.jsp + /admin/article/article_queryOne.jsp + + + /dealwith.jsp + + + /photo + + image/bmp,image/png,image/gif,image/pjpeg + 1024000 + + + /blog/userManager/{1}.jsp + /blog/userManager/{1}.jsp + /dealwith.jsp + /blog/photo_query.jsp + /admin/photo/photo_query.jsp + + + /dealwith.jsp + /blog/info_query.jsp + /blog/userManager/info_query.jsp + + + + + diff --git a/03/src/template/simple/actionerror.ftl b/03/src/template/simple/actionerror.ftl new file mode 100644 index 0000000..ca34904 --- /dev/null +++ b/03/src/template/simple/actionerror.ftl @@ -0,0 +1,5 @@ +<#if (actionErrors?exists && actionErrors?size > 0)> +<#list actionErrors as error> +${error} + + \ No newline at end of file diff --git a/03/src/template/simple/fielderror.ftl b/03/src/template/simple/fielderror.ftl new file mode 100644 index 0000000..9d23ca1 --- /dev/null +++ b/03/src/template/simple/fielderror.ftl @@ -0,0 +1,52 @@ +<#if fieldErrors?exists><#t/> +<#assign eKeys = fieldErrors.keySet()><#t/> +<#assign eKeysSize = eKeys.size()><#t/> +<#assign doneStartUlTag=false><#t/> +<#assign doneEndUlTag=false><#t/> +<#assign haveMatchedErrorField=false><#t/> +<#if (fieldErrorFieldNames?size > 0) ><#t/> + <#list fieldErrorFieldNames as fieldErrorFieldName><#t/> + <#list eKeys as eKey><#t/> + <#if (eKey = fieldErrorFieldName)><#t/> + <#assign haveMatchedErrorField=true><#t/> + <#assign eValue = fieldErrors[fieldErrorFieldName]><#t/> + <#if (haveMatchedErrorField && (!doneStartUlTag))><#t/> + + +<#assign doneStartUlTag=true><#t/> +<#t/> +<#list eValue as eEachValue><#t/> + ${eEachValue} +<#t/> +<#t/> +<#t/> +<#t/> + + + + + + + + + <#if (haveMatchedErrorField && (!doneEndUlTag))><#t/> + <#assign doneEndUlTag=true><#t/> + <#t/> +<#else><#t/> + <#if (eKeysSize > 0)><#t/> + + + + <#list eKeys as eKey><#t/> + <#assign eValue = fieldErrors[eKey]><#t/> + <#list eValue as eEachValue><#t/> + ${eEachValue} + <#t/> + <#t/> + + + + + <#t/> +<#t/> +<#t/> \ No newline at end of file diff --git "a/03/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/03/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..4e33284 Binary files /dev/null and "b/03/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/04/.classpath b/04/.classpath new file mode 100644 index 0000000..b4f62f7 --- /dev/null +++ b/04/.classpath @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/04/.mymetadata b/04/.mymetadata new file mode 100644 index 0000000..bf15521 --- /dev/null +++ b/04/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/04/.project b/04/.project new file mode 100644 index 0000000..ea673a5 --- /dev/null +++ b/04/.project @@ -0,0 +1,50 @@ + + + 04 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/04/.settings/.jsdtscope b/04/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/04/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/04/.settings/org.eclipse.core.resources.prefs b/04/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..23124ea --- /dev/null +++ b/04/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,17 @@ +#Thu Feb 24 13:32:11 CST 2011 +eclipse.preferences.version=1 +encoding//WebRoot/js/articleTypes.js=UTF-8 +encoding//WebRoot/js/article_type.js=UTF-8 +encoding//WebRoot/js/index.js=UTF-8 +encoding//WebRoot/js/register.js=UTF-8 +encoding//WebRoot/js/search.js=UTF-8 +encoding//WebRoot/js/user.js=UTF-8 +encoding//WebRoot/txt/item.txt=UTF-8 +encoding//src/com/hrl/action/ActicleAction.java=UTF-8 +encoding//src/com/hrl/action/ActionConstant.java=UTF-8 +encoding//src/com/hrl/action/ReplyAction.java=UTF-8 +encoding//src/com/hrl/action/UserAction.java=UTF-8 +encoding//src/com/hrl/dao/impl/ArticleDaoImpl.java=UTF-8 +encoding//src/com/hrl/dao/impl/DefaultDaoImpl.java=UTF-8 +encoding//src/com/hrl/dao/impl/ReplyDaoImpl.java=UTF-8 +encoding//src/com/hrl/util/PageUtil.java=UTF-8 diff --git a/04/.settings/org.eclipse.jdt.core.prefs b/04/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..e05d71f --- /dev/null +++ b/04/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Tue Feb 22 10:53:26 CST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/04/.settings/org.eclipse.wst.jsdt.ui.superType.container b/04/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/04/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/04/.settings/org.eclipse.wst.jsdt.ui.superType.name b/04/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/04/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/04/WebRoot/Database/db_database04.sql b/04/WebRoot/Database/db_database04.sql new file mode 100644 index 0000000..64975ad --- /dev/null +++ b/04/WebRoot/Database/db_database04.sql @@ -0,0 +1,192 @@ +-- MySQL Administrator dump 1.4 +-- +-- ------------------------------------------------------ +-- Server version 5.0.67-community-nt + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + + +-- +-- Create schema db_database23 +-- + +CREATE DATABASE IF NOT EXISTS db_database23; +USE db_database23; + +-- +-- Definition of table `tb_article` +-- + +DROP TABLE IF EXISTS `tb_article`; +CREATE TABLE `tb_article` ( + `articleId` int(11) NOT NULL auto_increment, + `title` varchar(255) default NULL, + `content` text, + `emitTime` datetime default NULL, + `lastUpdateTime` datetime default NULL, + `articleTypeName` varchar(255) default NULL, + `userId` int(11) default NULL, + `articleTypeId` int(11) default NULL, + PRIMARY KEY (`articleId`), + KEY `FKD4623425BE94513D` (`articleTypeId`), + KEY `FKD46234256FFA568F` (`userId`), + CONSTRAINT `FKD46234256FFA568F` FOREIGN KEY (`userId`) REFERENCES `tb_user` (`userId`), + CONSTRAINT `FKD4623425BE94513D` FOREIGN KEY (`articleTypeId`) REFERENCES `tb_articletype` (`articleTypeId`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_article` +-- + +/*!40000 ALTER TABLE `tb_article` DISABLE KEYS */; +INSERT INTO `tb_article` (`articleId`,`title`,`content`,`emitTime`,`lastUpdateTime`,`articleTypeName`,`userId`,`articleTypeId`) VALUES + (1,'fdsfdsf','sdfdsf','2010-04-26 11:55:34','2010-04-26 11:55:34','Java',1,1), + (2,'bvnv','vbnvbn','2010-04-26 11:55:34','2010-04-26 11:55:34','Java',1,1), + (3,'sdf','sdfsdf','2011-02-21 08:57:10','2011-02-21 08:57:10','Visual C++',2,7), + (4,'Java ','afsdgf','2011-02-22 10:37:42','2011-02-22 10:37:42','Java',5,1), + (5,'Java ','afsdgf','2011-02-22 10:37:47','2011-02-22 10:37:47','Java',5,1), + (7,'JavaWeb编程词典','JavaWeb 编程词典就要上市啦!!','2011-02-25 09:28:46','2011-02-25 09:28:46','Java web',5,2); +/*!40000 ALTER TABLE `tb_article` ENABLE KEYS */; + + +-- +-- Definition of table `tb_articletype` +-- + +DROP TABLE IF EXISTS `tb_articletype`; +CREATE TABLE `tb_articletype` ( + `articleTypeId` int(11) NOT NULL auto_increment, + `articleTypeName` varchar(255) default NULL, + `articleTypeDesc` varchar(255) default NULL, + PRIMARY KEY (`articleTypeId`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_articletype` +-- + +/*!40000 ALTER TABLE `tb_articletype` DISABLE KEYS */; +INSERT INTO `tb_articletype` (`articleTypeId`,`articleTypeName`,`articleTypeDesc`) VALUES + (1,'Java','Java基础知识讨论'), + (2,'Java Web','Java Web知识讨论'), + (3,'C#','C#知识讨论'), + (4,'ASP.NET','Microsoft提供的WEB应用技术,被广泛的应用于网站开发的语言'), + (5,'ASP','ASP技术讨论'), + (6,'Visual Basic','Visual Basic知识讨论'), + (7,'Visual C++','Visual C++知识讨论'), + (8,'PHP','嵌入HTML文件的一种脚本语言。它的语法大部分是从C,JAVA,PERL语言中借来'); +/*!40000 ALTER TABLE `tb_articletype` ENABLE KEYS */; + + +-- +-- Definition of table `tb_reply` +-- + +DROP TABLE IF EXISTS `tb_reply`; +CREATE TABLE `tb_reply` ( + `replyId` int(11) NOT NULL auto_increment, + `replyTime` datetime default NULL, + `content` text, + `userId` int(11) default NULL, + `articleId` int(11) default NULL, + PRIMARY KEY (`replyId`), + KEY `FKFABD79D9E6D6DC29` (`articleId`), + KEY `FKFABD79D96FFA568F` (`userId`), + CONSTRAINT `FKFABD79D96FFA568F` FOREIGN KEY (`userId`) REFERENCES `tb_user` (`userId`), + CONSTRAINT `FKFABD79D9E6D6DC29` FOREIGN KEY (`articleId`) REFERENCES `tb_article` (`articleId`) +) ENGINE=InnoDB DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_reply` +-- + +/*!40000 ALTER TABLE `tb_reply` DISABLE KEYS */; +/*!40000 ALTER TABLE `tb_reply` ENABLE KEYS */; + + +-- +-- Definition of table `tb_scan` +-- + +DROP TABLE IF EXISTS `tb_scan`; +CREATE TABLE `tb_scan` ( + `scanId` int(11) NOT NULL auto_increment, + `scanTime` datetime default NULL, + `articleId` int(11) default NULL, + PRIMARY KEY (`scanId`), + KEY `FKA4FE45AEE6D6DC29` (`articleId`), + CONSTRAINT `FKA4FE45AEE6D6DC29` FOREIGN KEY (`articleId`) REFERENCES `tb_article` (`articleId`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_scan` +-- + +/*!40000 ALTER TABLE `tb_scan` DISABLE KEYS */; +INSERT INTO `tb_scan` (`scanId`,`scanTime`,`articleId`) VALUES + (1,'2010-04-26 11:55:40',1), + (2,'2011-02-22 10:39:24',4), + (3,'2011-02-22 10:39:26',4), + (4,'2011-02-24 20:19:55',4), + (5,'2011-02-24 20:19:57',4), + (7,'2011-02-25 09:07:57',5), + (9,'2011-02-25 09:28:49',7), + (10,'2011-02-25 10:14:04',7), + (11,'2011-02-25 10:14:15',7), + (12,'2011-02-25 10:14:17',7), + (13,'2011-02-25 10:14:18',7), + (14,'2011-02-25 10:14:29',7), + (15,'2011-02-25 10:14:30',7), + (16,'2011-02-25 10:14:31',7); +/*!40000 ALTER TABLE `tb_scan` ENABLE KEYS */; + + +-- +-- Definition of table `tb_user` +-- + +DROP TABLE IF EXISTS `tb_user`; +CREATE TABLE `tb_user` ( + `userId` int(11) NOT NULL auto_increment, + `userName` varchar(45) default NULL, + `password` varchar(45) default NULL, + `sex` varchar(2) default NULL, + `registerTime` datetime default NULL, + `birthday` varchar(20) default NULL, + `email` varchar(45) default NULL, + `tel` varchar(20) default NULL, + `isAdmin` varchar(255) default NULL, + PRIMARY KEY (`userId`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_user` +-- + +/*!40000 ALTER TABLE `tb_user` DISABLE KEYS */; +INSERT INTO `tb_user` (`userId`,`userName`,`password`,`sex`,`registerTime`,`birthday`,`email`,`tel`,`isAdmin`) VALUES + (1,'admin','111','男','2010-04-26 11:51:55','','','','0'), + (2,'cdd','111111','男','2011-02-21 08:49:47','1984-11-3','1212','1122','0'), + (3,'?????','247934281','??','2011-02-22 09:03:31','19841103','122','123456','0'), + (4,'?????','247934281','??','2011-02-22 09:03:36','19841103','122','123456','0'), + (5,'春意盎然','247934281','男','2011-02-22 10:33:27','19841103','111','112','0'); +/*!40000 ALTER TABLE `tb_user` ENABLE KEYS */; + + + + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/04/WebRoot/META-INF/MANIFEST.MF b/04/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/04/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/04/WebRoot/WEB-INF/classes/applicationContext-action.xml b/04/WebRoot/WEB-INF/classes/applicationContext-action.xml new file mode 100644 index 0000000..7fc95ac --- /dev/null +++ b/04/WebRoot/WEB-INF/classes/applicationContext-action.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + diff --git a/04/WebRoot/WEB-INF/classes/applicationContext-dao.xml b/04/WebRoot/WEB-INF/classes/applicationContext-dao.xml new file mode 100644 index 0000000..a31d151 --- /dev/null +++ b/04/WebRoot/WEB-INF/classes/applicationContext-dao.xml @@ -0,0 +1,55 @@ + + + + + + + classpath:hibernate.cfg.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/action/ActicleAction.class b/04/WebRoot/WEB-INF/classes/com/hrl/action/ActicleAction.class new file mode 100644 index 0000000..1c886d9 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/action/ActicleAction.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/action/ActionConstant.class b/04/WebRoot/WEB-INF/classes/com/hrl/action/ActionConstant.class new file mode 100644 index 0000000..417b319 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/action/ActionConstant.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/action/DefaultAction.class b/04/WebRoot/WEB-INF/classes/com/hrl/action/DefaultAction.class new file mode 100644 index 0000000..04d0a45 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/action/DefaultAction.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/action/HomeAction.class b/04/WebRoot/WEB-INF/classes/com/hrl/action/HomeAction.class new file mode 100644 index 0000000..b4497ae Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/action/HomeAction.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/action/ReplyAction.class b/04/WebRoot/WEB-INF/classes/com/hrl/action/ReplyAction.class new file mode 100644 index 0000000..6e6ffec Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/action/ReplyAction.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/action/UserAction.class b/04/WebRoot/WEB-INF/classes/com/hrl/action/UserAction.class new file mode 100644 index 0000000..9ff00c4 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/action/UserAction.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/dao/IArticleDao.class b/04/WebRoot/WEB-INF/classes/com/hrl/dao/IArticleDao.class new file mode 100644 index 0000000..0c8506c Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/dao/IArticleDao.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/dao/IDefaultDao.class b/04/WebRoot/WEB-INF/classes/com/hrl/dao/IDefaultDao.class new file mode 100644 index 0000000..47e391a Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/dao/IDefaultDao.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/dao/IReplyDao.class b/04/WebRoot/WEB-INF/classes/com/hrl/dao/IReplyDao.class new file mode 100644 index 0000000..6c36c79 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/dao/IReplyDao.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/dao/IUserDao.class b/04/WebRoot/WEB-INF/classes/com/hrl/dao/IUserDao.class new file mode 100644 index 0000000..9f79a87 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/dao/IUserDao.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/ArticleDaoImpl.class b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/ArticleDaoImpl.class new file mode 100644 index 0000000..e0ad23f Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/ArticleDaoImpl.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl$1.class b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl$1.class new file mode 100644 index 0000000..cb8273c Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl$1.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl$2.class b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl$2.class new file mode 100644 index 0000000..0b01eb8 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl$2.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl$3.class b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl$3.class new file mode 100644 index 0000000..9ecd408 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl$3.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl.class b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl.class new file mode 100644 index 0000000..ed2c175 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/DefaultDaoImpl.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/ReplyDaoImpl.class b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/ReplyDaoImpl.class new file mode 100644 index 0000000..700936d Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/ReplyDaoImpl.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/UserDaoImpl.class b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/UserDaoImpl.class new file mode 100644 index 0000000..e61b07f Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/dao/impl/UserDaoImpl.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/model/Article.class b/04/WebRoot/WEB-INF/classes/com/hrl/model/Article.class new file mode 100644 index 0000000..b161a49 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/model/Article.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/model/Article.hbm.xml b/04/WebRoot/WEB-INF/classes/com/hrl/model/Article.hbm.xml new file mode 100644 index 0000000..82bd43a --- /dev/null +++ b/04/WebRoot/WEB-INF/classes/com/hrl/model/Article.hbm.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/model/ArticleType.class b/04/WebRoot/WEB-INF/classes/com/hrl/model/ArticleType.class new file mode 100644 index 0000000..272236c Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/model/ArticleType.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/model/ArticleType.hbm.xml b/04/WebRoot/WEB-INF/classes/com/hrl/model/ArticleType.hbm.xml new file mode 100644 index 0000000..fddf30e --- /dev/null +++ b/04/WebRoot/WEB-INF/classes/com/hrl/model/ArticleType.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/model/Reply.class b/04/WebRoot/WEB-INF/classes/com/hrl/model/Reply.class new file mode 100644 index 0000000..4b75459 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/model/Reply.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/model/Reply.hbm.xml b/04/WebRoot/WEB-INF/classes/com/hrl/model/Reply.hbm.xml new file mode 100644 index 0000000..3519189 --- /dev/null +++ b/04/WebRoot/WEB-INF/classes/com/hrl/model/Reply.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/model/Scan.class b/04/WebRoot/WEB-INF/classes/com/hrl/model/Scan.class new file mode 100644 index 0000000..92747fa Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/model/Scan.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/model/Scan.hbm.xml b/04/WebRoot/WEB-INF/classes/com/hrl/model/Scan.hbm.xml new file mode 100644 index 0000000..3496c46 --- /dev/null +++ b/04/WebRoot/WEB-INF/classes/com/hrl/model/Scan.hbm.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/model/User.class b/04/WebRoot/WEB-INF/classes/com/hrl/model/User.class new file mode 100644 index 0000000..2432311 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/model/User.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/model/User.hbm.xml b/04/WebRoot/WEB-INF/classes/com/hrl/model/User.hbm.xml new file mode 100644 index 0000000..cd56e9c --- /dev/null +++ b/04/WebRoot/WEB-INF/classes/com/hrl/model/User.hbm.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/util/JSONKit.class b/04/WebRoot/WEB-INF/classes/com/hrl/util/JSONKit.class new file mode 100644 index 0000000..e1693bc Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/util/JSONKit.class differ diff --git a/04/WebRoot/WEB-INF/classes/com/hrl/util/PageUtil.class b/04/WebRoot/WEB-INF/classes/com/hrl/util/PageUtil.class new file mode 100644 index 0000000..16a95dd Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/com/hrl/util/PageUtil.class differ diff --git a/04/WebRoot/WEB-INF/classes/hibernate.cfg.xml b/04/WebRoot/WEB-INF/classes/hibernate.cfg.xml new file mode 100644 index 0000000..0d7782c --- /dev/null +++ b/04/WebRoot/WEB-INF/classes/hibernate.cfg.xml @@ -0,0 +1,19 @@ + + + + + com.mysql.jdbc.Driver + 111 + jdbc:mysql://localhost:3306/db_database23 + root + org.hibernate.dialect.MySQLDialect + update + + + + + + + diff --git a/04/WebRoot/WEB-INF/classes/log4j.properties b/04/WebRoot/WEB-INF/classes/log4j.properties new file mode 100644 index 0000000..d072de1 --- /dev/null +++ b/04/WebRoot/WEB-INF/classes/log4j.properties @@ -0,0 +1,47 @@ +### direct log messages to stdout ### +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +### direct messages to file hibernate.log ### +#log4j.appender.file=org.apache.log4j.FileAppender +#log4j.appender.file.File=hibernate.log +#log4j.appender.file.layout=org.apache.log4j.PatternLayout +#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +### set log levels - for more verbose logging change 'info' to 'debug' ### + +log4j.rootLogger=warn, stdout + +#log4j.logger.org.hibernate=info +#log4j.logger.org.hibernate=debug + +### log HQL query parser activity +#log4j.logger.org.hibernate.hql.ast.AST=debug + +### log just the SQL +#log4j.logger.org.hibernate.SQL=debug + +### log JDBC bind parameters ### +#log4j.logger.org.hibernate.type=info +#log4j.logger.org.hibernate.type=debug + +### log schema export/update ### +#log4j.logger.org.hibernate.tool.hbm2ddl=debug + +### log HQL parse trees +#log4j.logger.org.hibernate.hql=debug + +### log cache activity ### +#log4j.logger.org.hibernate.cache=debug + +### log transaction activity +#log4j.logger.org.hibernate.transaction=debug + +### log JDBC resource acquisition +#log4j.logger.org.hibernate.jdbc=debug + +### enable the following line if you want to track down connection ### +### leakages when using DriverManagerConnectionProvider ### +#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace diff --git a/04/WebRoot/WEB-INF/classes/struts.xml b/04/WebRoot/WEB-INF/classes/struts.xml new file mode 100644 index 0000000..61e4039 --- /dev/null +++ b/04/WebRoot/WEB-INF/classes/struts.xml @@ -0,0 +1,37 @@ + + + + + + + + + index.jsp + + + /WEB-INF/jsp/user/register.jsp + /WEB-INF/jsp/user/success.jsp + /WEB-INF/jsp/user/update.jsp + /WEB-INF/jsp/user/login.jsp + /WEB-INF/jsp/user/relogin.jsp + articleAction_forum + homeAction_index + + + /WEB-INF/jsp/article/forum.jsp + /WEB-INF/jsp/article/addArticle.jsp + /WEB-INF/jsp/article/myArticle.jsp + /WEB-INF/jsp/article/singleArticle.jsp + /WEB-INF/jsp/article/updateArticle.jsp + /WEB-INF/jsp/article/searchResult.jsp + /WEB-INF/jsp/article/type_article.jsp + /WEB-INF/jsp/article/searchResult.jsp + + + + + + + diff --git a/04/WebRoot/WEB-INF/classes/test/HibernateUtil.class b/04/WebRoot/WEB-INF/classes/test/HibernateUtil.class new file mode 100644 index 0000000..4062e42 Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/test/HibernateUtil.class differ diff --git a/04/WebRoot/WEB-INF/classes/test/Test.class b/04/WebRoot/WEB-INF/classes/test/Test.class new file mode 100644 index 0000000..b8e07bc Binary files /dev/null and b/04/WebRoot/WEB-INF/classes/test/Test.class differ diff --git a/04/WebRoot/WEB-INF/jsp/article/addArticle.jsp b/04/WebRoot/WEB-INF/jsp/article/addArticle.jsp new file mode 100644 index 0000000..83dfb4c --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/article/addArticle.jsp @@ -0,0 +1,108 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + +明日知道-国内领先的IT技术搜素引擎 + + + + + + + + +
    + + + + + +
    + + + + + +
    添加文章 
    +
    +
    +
    + + + + + + + + + + + + + +
    文章标题:
    所属类型:
    文章内容:
    +

    +
    +
    + + + + +
    + + + + + +
    关于我们 | 广告招商 | 举报中心 | 联系方式 | 客户服务 | 会员注册
    + Powered by mingrisoft.com
    E-mail:mingrisoft@mingrisoft.com +   电话:400-676-1066   吉ICP备07500273号
    + Copyright  ©吉林省明日科技有限公司 1999-2009, All Rights Reserved
    +
    + + + \ No newline at end of file diff --git a/04/WebRoot/WEB-INF/jsp/article/forum.jsp b/04/WebRoot/WEB-INF/jsp/article/forum.jsp new file mode 100644 index 0000000..6fbb2fb --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/article/forum.jsp @@ -0,0 +1,423 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +明日知道-国内领先的IT技术搜素引擎 + + + + + + + + +
    + + + + + +
    + + + + + +
      
    +
    +
    + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    分类问题/回复最后更新
    + + + (今日:)
    +
    / + + +
    +
    + + + + +  
    暂无文章
    +
    +
    +
    + + + + + + + + +
    + + + + +
    + + + + + +
    关于我们 | 广告招商 | 举报中心 | 联系方式 | 客户服务 | 会员注册
    + Powered by mingrisoft.com
    E-mail:mingrisoft@mingrisoft.com +   电话:400-676-1066   吉ICP备07500273号
    + Copyright  ©吉林省明日科技有限公司 1999-2009, All Rights Reserved
    +
    + + + + diff --git a/04/WebRoot/WEB-INF/jsp/article/myArticle.jsp b/04/WebRoot/WEB-INF/jsp/article/myArticle.jsp new file mode 100644 index 0000000..3ed54eb --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/article/myArticle.jsp @@ -0,0 +1,147 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +明日知道-国内领先的IT技术搜素引擎 + + + + + + + + +
    + + + + + +
    + + + + + +
    我的文章列表 
    +
    + + + + + +
    + + + + + + + + + + +
    + + +
    +
    +
    +
    发表日期 +   查看详细>> + +
    +
    +
    + + +
    +
    + + + + + + + + + +
    + + + + + +
    关于我们 | 广告招商 | 举报中心 | 联系方式 | 客户服务 | 会员注册
    + Powered by mingrisoft.com
    E-mail:mingrisoft@mingrisoft.com +   电话:400-676-1066   吉ICP备07500273号
    + Copyright  ©吉林省明日科技有限公司 1999-2009, All Rights Reserved
    +
    + + + + diff --git a/04/WebRoot/WEB-INF/jsp/article/search.jsp b/04/WebRoot/WEB-INF/jsp/article/search.jsp new file mode 100644 index 0000000..dd8008f --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/article/search.jsp @@ -0,0 +1,89 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +明日论坛-国内领先的IT技术搜素引擎 + + + + + + + + + +
              明日软件 + | 明日图书 | 编程词典 | 网络学院 | 明日书店
    +
    + +
    +
    +
    + + + + + + +
    + + + + + + + + + + +
      欢迎您,   退出   登录 | 注册软件 +   |   图书   |   词典   |   学院   |   书店 
    +
    +
    +
    明日论坛
    + + + + + + + + + +
    + + + + +
    + + + + + +       
    +
    您可以注册一个账户,并以此登录,以便参与本站更多活动,与大家交流。
    + + \ No newline at end of file diff --git a/04/WebRoot/WEB-INF/jsp/article/searchResult.jsp b/04/WebRoot/WEB-INF/jsp/article/searchResult.jsp new file mode 100644 index 0000000..d72d087 --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/article/searchResult.jsp @@ -0,0 +1,163 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +明日知道-国内领先的IT技术搜素引擎 + + + + + + + +
    + + + + + +
    + + + + + +
    + 的文章列表 + + 符合条件的文章列表 +  
    +
    + + +
    + + + + + +
    + + + + + + + + + + +
    + + +
    +
    +
    +
    发表日期 +   查看详细>> + +
    +
    +
    + + +
    +
    + + + + + + + + + + + +
    + + + + + +
    关于我们 | 广告招商 | 举报中心 | 联系方式 | 客户服务 | 会员注册
    + Powered by mingrisoft.com
    E-mail:mingrisoft@mingrisoft.com +   电话:400-676-1066   吉ICP备07500273号
    + Copyright  ©吉林省明日科技有限公司 1999-2009, All Rights Reserved
    +
    + + + + diff --git a/04/WebRoot/WEB-INF/jsp/article/singleArticle.jsp b/04/WebRoot/WEB-INF/jsp/article/singleArticle.jsp new file mode 100644 index 0000000..ab3e9f5 --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/article/singleArticle.jsp @@ -0,0 +1,353 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +明日论坛-国内领先的IT技术搜素引擎 + + + + + + + + + + + + + + + +
    + + + + + +
       
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + + + + +
    + + + + + +
    用户:
    + 主题:
    + 回答:
    + 注册:
    +
    + + + + + +
    提出于:
    +

    + + + + +
    +
    +
    +
         + + + + 修改 + + + 删除 +
    +
    +
    + + + + + + +
    + + + + + +
      问题回答 
    +
    + + +
    + + + + +
    回复到:
    +
    +
    +
    + + + + +
    +
    + + + + + + +
    回复主题:
    + +
    + 请在上述文本框中输入回复主题
    +
    +
    +
    +
    + + + + + + + + + + + +
    + + + + + +
    关于我们 | 广告招商 | 举报中心 | 联系方式 | 客户服务 | 会员注册
    + Powered by mingrisoft.com
    E-mail:mingrisoft@mingrisoft.com +   电话:400-676-1066   吉ICP备07500273号
    + Copyright  ©吉林省明日科技有限公司 1999-2009, All Rights Reserved
    +
    + + + + + diff --git a/04/WebRoot/WEB-INF/jsp/article/type_article.jsp b/04/WebRoot/WEB-INF/jsp/article/type_article.jsp new file mode 100644 index 0000000..b153624 --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/article/type_article.jsp @@ -0,0 +1,382 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +明日知道-国内领先的IT技术搜素引擎 + + + + + + + + + + + +
    + + + + + + +
    + + + + + + + + +
    + + + + + +
       
    +
    +
    + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    标题作者回答/查看最后回复
    + + + + + + + +
    +
    / + + + + +
    +
    暂无回复
    +
    +
    +
    +
    +
    +
    + + + + +
    + + + + + +
    关于我们 | 广告招商 | 举报中心 | 联系方式 | 客户服务 | 会员注册
    + Powered by mingrisoft.com
    E-mail:mingrisoft@mingrisoft.com +   电话:400-676-1066   吉ICP备07500273号
    + Copyright  ©吉林省明日科技有限公司 1999-2009, All Rights Reserved
    +
    + + + + diff --git a/04/WebRoot/WEB-INF/jsp/article/updateArticle.jsp b/04/WebRoot/WEB-INF/jsp/article/updateArticle.jsp new file mode 100644 index 0000000..e1483af --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/article/updateArticle.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + +明日知道-国内领先的IT技术搜素引擎 + + + + + + + + +
    + + + + + +
    + + + + + +
    修改文章 
    +
    +
    +
    + + + + + + + + + + + + + +
    文章标题:
    所属类型:
    文章内容:
    +

    +
    +
    + + + + +
    + + + + + +
    关于我们 | 广告招商 | 举报中心 | 联系方式 | 客户服务 | 会员注册
    + Powered by mingrisoft.com
    E-mail:mingrisoft@mingrisoft.com +   电话:400-676-1066   吉ICP备07500273号
    + Copyright  ©吉林省明日科技有限公司 1999-2009, All Rights Reserved
    +
    + + + \ No newline at end of file diff --git a/04/WebRoot/WEB-INF/jsp/article/userArticles.jsp b/04/WebRoot/WEB-INF/jsp/article/userArticles.jsp new file mode 100644 index 0000000..0a096df --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/article/userArticles.jsp @@ -0,0 +1,130 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +明日知道-国内领先的IT技术搜素引擎 + + + + + + + + +
    + + + + + +
    + + + + + +
    的文章 
    +
    + + + + + +
    + + + + + + + + + + +
    '" + target="_blank" class="daohangh">
    +
    +
    +
    发表日期   '" + class="huise">查看详细>>
    +
    +
    + + +
    +
    + + + + +
    + + + + + +
    关于我们 | 广告招商 | 举报中心 | 联系方式 | 客户服务 | 会员注册
    + Powered by mingrisoft.com
    E-mail:mingrisoft@mingrisoft.com +   电话:400-676-1066   吉ICP备07500273号
    + Copyright  ©吉林省明日科技有限公司 1999-2009, All Rights Reserved
    +
    + + diff --git a/04/WebRoot/WEB-INF/jsp/pageUtil.jsp b/04/WebRoot/WEB-INF/jsp/pageUtil.jsp new file mode 100644 index 0000000..9fe6987 --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/pageUtil.jsp @@ -0,0 +1,62 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +明日论坛-国内领先的IT技术搜素引擎 + + + + + +
    每页显示 条  当前页/共 + + + 第一页 + + + + + 第一页 + + + 上一页 + + + + + 上一页 + + + 下一页 + + + + + 下一页 + + + 最后一页 + + + + + 最后一页 +
    + \ No newline at end of file diff --git a/04/WebRoot/WEB-INF/jsp/user/login.jsp b/04/WebRoot/WEB-INF/jsp/user/login.jsp new file mode 100644 index 0000000..29a29cb --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/user/login.jsp @@ -0,0 +1,196 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + +登录―明日论坛 + + + + + + + +
    + + + + +
    + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + +
    + + + + + +
    + + + + +
    + + + + +
    用户名:
    + + + + +
    密 +   码:
    + + + + +
    输入验证码:
    + + + + + +
    验证码:  看不清,换一张
    + + + + +
    + + + + +
    不是会员,立即注册
    +
    +
    +
    +           (C) 1999-2010吉林省明日科技有限公司
    +
     
    +
    +
    + + diff --git a/04/WebRoot/WEB-INF/jsp/user/register.jsp b/04/WebRoot/WEB-INF/jsp/user/register.jsp new file mode 100644 index 0000000..54795e0 --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/user/register.jsp @@ -0,0 +1,171 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +用户注册 + + + + + + + +
    + + + + +
    + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + +
    + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    用户名称:
    +
    + 登录昵称为4-15个字符之间,用来区分注册用户,要求彼此不同
    密码:
    +
    + 密码为6-15个字符之间
    确认密码:
    +
    + 密码为6-15个字符之间,必须与密码一致
    性别: 男
    + 选择“男”或者“女”
    出生年月:
    +
    + 请选择出生年月
    联系电话:
    +
    + 填写联系电话,方便联系你
    电子邮件:
    +
    + 填写电子邮件,方便联系你
    条款:
    +  
    + + + + +
    +
    +
    +
    +           (C) 1999-2010吉林省明日科技有限公司
    +
     
    +
    +
    + + diff --git a/04/WebRoot/WEB-INF/jsp/user/relogin.jsp b/04/WebRoot/WEB-INF/jsp/user/relogin.jsp new file mode 100644 index 0000000..ee1b740 --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/user/relogin.jsp @@ -0,0 +1,203 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + +登录―明日知道 + + + + + + + +
    + + + + +
    + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + +
    + + + + + +
    + + + + +
    + + + + +
     
    + + + + +
    用户名:
    + + + + +
    密 +   码:
    + + + + +
    输入验证码:
    + + + + + +
    验证码:  看不清,换一张
    + + + + +
    + + + + +
    不是会员,立即注册
    +
    +
    +
    +           (C) 1999-2010吉林省明日科技有限公司
    +
     
    +
    +
    + + diff --git a/04/WebRoot/WEB-INF/jsp/user/success.jsp b/04/WebRoot/WEB-INF/jsp/user/success.jsp new file mode 100644 index 0000000..e3cf838 --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/user/success.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +登录―明日论坛 + + + + + + + + + + +
    + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + +
    + + + +
    + 你可以进行以下操作: +
    + 返回首页 +
    + 进入论坛 +
    + 维护个人信息 +
    +
    +
    +
    +           (C) 1999-2010吉林省明日科技有限公司
    +
     
    +
    + + diff --git a/04/WebRoot/WEB-INF/jsp/user/update.jsp b/04/WebRoot/WEB-INF/jsp/user/update.jsp new file mode 100644 index 0000000..e0f02df --- /dev/null +++ b/04/WebRoot/WEB-INF/jsp/user/update.jsp @@ -0,0 +1,164 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +用户注册 + + + + + +
    + + + + +
    + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + +
    + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    用户名称:
    + +
    + 登录昵称为4-15个字符之间,用来区分注册用户,要求彼此不同
    旧密码:
    +
    + 密码为6-15个字符之间
    新密码:
    +
    + 新密码为6-15个字符之间
    确认密码:
    +
    + 密码为6-15个字符之间,必须与密码一致
    联系电话:
    +
    + 填写联系电话,方便联系你
    电子邮件:
    +
    + 填写电子邮件,方便联系你
    + + + + +
    +
    +
    +
    +           (C) 1999-2010吉林省明日科技有限公司
    +
     
    +
    +
    + + diff --git a/04/WebRoot/WEB-INF/lib/antlr-2.7.6.jar b/04/WebRoot/WEB-INF/lib/antlr-2.7.6.jar new file mode 100644 index 0000000..3702b64 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/antlr-2.7.6.jar differ diff --git a/04/WebRoot/WEB-INF/lib/asm-attrs.jar b/04/WebRoot/WEB-INF/lib/asm-attrs.jar new file mode 100644 index 0000000..f07bcb2 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/asm-attrs.jar differ diff --git a/04/WebRoot/WEB-INF/lib/asm.jar b/04/WebRoot/WEB-INF/lib/asm.jar new file mode 100644 index 0000000..ee0c7cc Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/asm.jar differ diff --git a/04/WebRoot/WEB-INF/lib/aspectjrt.jar b/04/WebRoot/WEB-INF/lib/aspectjrt.jar new file mode 100644 index 0000000..6525754 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/aspectjrt.jar differ diff --git a/04/WebRoot/WEB-INF/lib/aspectjweaver.jar b/04/WebRoot/WEB-INF/lib/aspectjweaver.jar new file mode 100644 index 0000000..e0087fb Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/aspectjweaver.jar differ diff --git a/04/WebRoot/WEB-INF/lib/c3p0-0.9.1.2.jar b/04/WebRoot/WEB-INF/lib/c3p0-0.9.1.2.jar new file mode 100644 index 0000000..0f42d60 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/c3p0-0.9.1.2.jar differ diff --git a/04/WebRoot/WEB-INF/lib/cglib-2.1.3.jar b/04/WebRoot/WEB-INF/lib/cglib-2.1.3.jar new file mode 100644 index 0000000..ddfbdb0 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/cglib-2.1.3.jar differ diff --git a/04/WebRoot/WEB-INF/lib/cglib-nodep-2.1_3.jar b/04/WebRoot/WEB-INF/lib/cglib-nodep-2.1_3.jar new file mode 100644 index 0000000..e9b17eb Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/cglib-nodep-2.1_3.jar differ diff --git a/04/WebRoot/WEB-INF/lib/common-annotations.jar b/04/WebRoot/WEB-INF/lib/common-annotations.jar new file mode 100644 index 0000000..c1f29bf Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/common-annotations.jar differ diff --git a/04/WebRoot/WEB-INF/lib/commons-beanutils.jar b/04/WebRoot/WEB-INF/lib/commons-beanutils.jar new file mode 100644 index 0000000..b1b89c9 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/commons-beanutils.jar differ diff --git a/04/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar b/04/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar new file mode 100644 index 0000000..3272f2b Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar differ diff --git a/04/WebRoot/WEB-INF/lib/commons-dbcp.jar b/04/WebRoot/WEB-INF/lib/commons-dbcp.jar new file mode 100644 index 0000000..faea056 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/commons-dbcp.jar differ diff --git a/04/WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar b/04/WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar new file mode 100644 index 0000000..7db423e Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar differ diff --git a/04/WebRoot/WEB-INF/lib/commons-io-1.3.2.jar b/04/WebRoot/WEB-INF/lib/commons-io-1.3.2.jar new file mode 100644 index 0000000..865c9e4 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/commons-io-1.3.2.jar differ diff --git a/04/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar b/04/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar new file mode 100644 index 0000000..b73a80f Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar differ diff --git a/04/WebRoot/WEB-INF/lib/commons-pool.jar b/04/WebRoot/WEB-INF/lib/commons-pool.jar new file mode 100644 index 0000000..e8de327 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/commons-pool.jar differ diff --git a/04/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar b/04/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..c8c4dbb Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/04/WebRoot/WEB-INF/lib/ehcache-1.2.jar b/04/WebRoot/WEB-INF/lib/ehcache-1.2.jar new file mode 100644 index 0000000..99906b0 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/ehcache-1.2.jar differ diff --git a/04/WebRoot/WEB-INF/lib/freemarker-2.3.15.jar b/04/WebRoot/WEB-INF/lib/freemarker-2.3.15.jar new file mode 100644 index 0000000..8b93b17 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/freemarker-2.3.15.jar differ diff --git a/04/WebRoot/WEB-INF/lib/hibernate3.jar b/04/WebRoot/WEB-INF/lib/hibernate3.jar new file mode 100644 index 0000000..861edd0 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/hibernate3.jar differ diff --git a/04/WebRoot/WEB-INF/lib/jaas.jar b/04/WebRoot/WEB-INF/lib/jaas.jar new file mode 100644 index 0000000..92216c0 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/jaas.jar differ diff --git a/04/WebRoot/WEB-INF/lib/javassist.jar b/04/WebRoot/WEB-INF/lib/javassist.jar new file mode 100644 index 0000000..d834b3a Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/javassist.jar differ diff --git a/04/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar b/04/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar new file mode 100644 index 0000000..c773f85 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar differ diff --git a/04/WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar b/04/WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar new file mode 100644 index 0000000..ddafa13 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar differ diff --git a/04/WebRoot/WEB-INF/lib/json-lib-2.1.jar b/04/WebRoot/WEB-INF/lib/json-lib-2.1.jar new file mode 100644 index 0000000..28880c4 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/json-lib-2.1.jar differ diff --git a/04/WebRoot/WEB-INF/lib/jta.jar b/04/WebRoot/WEB-INF/lib/jta.jar new file mode 100644 index 0000000..e0822a9 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/jta.jar differ diff --git a/04/WebRoot/WEB-INF/lib/log4j-1.2.15.jar b/04/WebRoot/WEB-INF/lib/log4j-1.2.15.jar new file mode 100644 index 0000000..c930a6a Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/log4j-1.2.15.jar differ diff --git a/04/WebRoot/WEB-INF/lib/msbase.jar b/04/WebRoot/WEB-INF/lib/msbase.jar new file mode 100644 index 0000000..528cd00 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/msbase.jar differ diff --git a/04/WebRoot/WEB-INF/lib/mssqlserver.jar b/04/WebRoot/WEB-INF/lib/mssqlserver.jar new file mode 100644 index 0000000..532f8ad Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/mssqlserver.jar differ diff --git a/04/WebRoot/WEB-INF/lib/msutil.jar b/04/WebRoot/WEB-INF/lib/msutil.jar new file mode 100644 index 0000000..405f678 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/msutil.jar differ diff --git a/04/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.10-bin.jar b/04/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.10-bin.jar new file mode 100644 index 0000000..33c35c6 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.10-bin.jar differ diff --git a/04/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar b/04/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar new file mode 100644 index 0000000..0539039 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar differ diff --git a/04/WebRoot/WEB-INF/lib/ognl-2.7.3.jar b/04/WebRoot/WEB-INF/lib/ognl-2.7.3.jar new file mode 100644 index 0000000..6517028 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/ognl-2.7.3.jar differ diff --git a/04/WebRoot/WEB-INF/lib/servlet-api.jar b/04/WebRoot/WEB-INF/lib/servlet-api.jar new file mode 100644 index 0000000..2b48572 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/servlet-api.jar differ diff --git a/04/WebRoot/WEB-INF/lib/spring-test-2.5.6.jar b/04/WebRoot/WEB-INF/lib/spring-test-2.5.6.jar new file mode 100644 index 0000000..2589840 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/spring-test-2.5.6.jar differ diff --git a/04/WebRoot/WEB-INF/lib/spring-webmvc-struts.jar b/04/WebRoot/WEB-INF/lib/spring-webmvc-struts.jar new file mode 100644 index 0000000..ed0cb1f Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/spring-webmvc-struts.jar differ diff --git a/04/WebRoot/WEB-INF/lib/spring.jar b/04/WebRoot/WEB-INF/lib/spring.jar new file mode 100644 index 0000000..5273670 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/spring.jar differ diff --git a/04/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar b/04/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar new file mode 100644 index 0000000..1439f17 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar differ diff --git a/04/WebRoot/WEB-INF/lib/struts2-json-plugin-2.1.8.1.jar b/04/WebRoot/WEB-INF/lib/struts2-json-plugin-2.1.8.1.jar new file mode 100644 index 0000000..c4090bc Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/struts2-json-plugin-2.1.8.1.jar differ diff --git a/04/WebRoot/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar b/04/WebRoot/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar new file mode 100644 index 0000000..c09a658 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar differ diff --git a/04/WebRoot/WEB-INF/lib/xerces-2.6.2.jar b/04/WebRoot/WEB-INF/lib/xerces-2.6.2.jar new file mode 100644 index 0000000..14c3162 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/xerces-2.6.2.jar differ diff --git a/04/WebRoot/WEB-INF/lib/xml-apis.jar b/04/WebRoot/WEB-INF/lib/xml-apis.jar new file mode 100644 index 0000000..6ba4ff8 Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/xml-apis.jar differ diff --git a/04/WebRoot/WEB-INF/lib/xwork-core-2.1.6.jar b/04/WebRoot/WEB-INF/lib/xwork-core-2.1.6.jar new file mode 100644 index 0000000..bd5996b Binary files /dev/null and b/04/WebRoot/WEB-INF/lib/xwork-core-2.1.6.jar differ diff --git a/04/WebRoot/WEB-INF/web.xml b/04/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..3669173 --- /dev/null +++ b/04/WebRoot/WEB-INF/web.xml @@ -0,0 +1,36 @@ + + + 04 + + + org.springframework.web.context.ContextLoaderListener + + + contextConfigLocation + classpath:applicationContext-*.xml + + + + openSessionInViewFilter + org.springframework.orm.hibernate3.support.OpenSessionInViewFilter + + + openSessionInViewFilter + /* + + + + struts2 + org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter + + + struts2 + /* + + + index.jsp + + \ No newline at end of file diff --git a/04/WebRoot/css/css.css b/04/WebRoot/css/css.css new file mode 100644 index 0000000..442175d --- /dev/null +++ b/04/WebRoot/css/css.css @@ -0,0 +1,341 @@ +body { + font-family: Arial, Helvetica, sans-serif; +} + +td { + font-family: Arial, Helvetica, sans-serif; +} + +th { + font-family: Arial, Helvetica, sans-serif; +} + +.shenhong :link { + font-size: 12px; + color: #2AAB44; + text-decoration: none; + font-family: ""; + line-height: 23px; +} + +.shenhong :visited { + font-size: 12px; + color: #2AAB44; + text-decoration: none; + font-family: ""; + line-height: 23px; +} + +.shenhong :hover { + font-size: 12px; + color: #2AAB44; + text-decoration: none; + font-family: ""; + line-height: 23px; +} + +.shenhong :active { + font-size: 12px; + color: #2AAB44; + text-decoration: none; + font-family: ""; + line-height: 23px; +} + +.daohangh:link { + font-size: 14px; + color: #006699; + text-decoration: underline; + line-height: 18px; + font-family: Arial, Helvetica, sans-serif; +} + +.daohangh:visited { + font-size: 14px; + color: #006699; + text-decoration: underline; + line-height: 18px; + font-family: Arial, Helvetica, sans-serif; +} + +.daohangh:hover { + font-size: 14px; + color: #006699; + text-decoration: underline; + font-family: ""; + line-height: 18px; +} + +.daohangh :active { + font-size: 14px; + color: #006699; + text-decoration: underline; + font-family: ""; + line-height: 18px; +} + +.cubai :link { + font-size: 12px; + color: #FFFFFF; + text-decoration: none; + line-height: 24px; + font-weight: bold; + font-family: Arial, Helvetica, sans-serif; +} + +.cubai :visited { + font-size: 12px; + color: #FFFFFF; + text-decoration: none; + line-height: 24px; + font-family: Arial, Helvetica, sans-serif; + font-weight: bold; +} + +.cubai :hover { + font-size: 12px; + color: #FFFF00; + text-decoration: none; + font-family: Arial, Helvetica, sans-serif; + line-height: 24px; + font-weight: bold; +} + +.cubai :active { + font-size: 12px; + color: #FFFF00; + text-decoration: none; + font-family: Arial, Helvetica, sans-serif; + line-height: 24px; + font-weight: normal; +} + +.hongcu { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + line-height: 22px; + font-weight: bold; + color: #000000; +} + +.danhuang { + font-family: Arial, Helvetica, sans-serif; + font-size: 14px; + line-height: 22px; + color: #FFFFFF; + font-weight: bold; +} + +.shenlan { + font-family: ""; + font-size: 12px; + line-height: 22px; + color: #1C5785; + border: 1px solid #999999; +} + +.chengse { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + line-height: 22px; + color: #FF6600; +} + +.shenlvcu { + font-family: ""; + font-size: 16px; + line-height: 25px; + font-weight: bold; + color: #006600; + text-decoration: underline; +} + +.huise:link { + font-size: 12px; + color: #383C2B; + text-decoration: underline; + line-height: 24px; + font-family: Arial, Helvetica, sans-serif; +} + +.huise:visited { + font-size: 12px; + color: #383C2B; + text-decoration: none; + line-height: 24px; + font-family: Arial, Helvetica, sans-serif; +} + +.huise:hover { + font-size: 12px; + color: #FF0000; + text-decoration: none; + font-family: Arial, Helvetica, sans-serif; + line-height: 24px; +} + +.huise:active { + font-size: 12px; + color: #383C2B; + text-decoration: none; + font-family: Arial, Helvetica, sans-serif; + line-height: 24px; +} + +.blacklin:link { + font-size: 14px; + color: #666666; + text-decoration: none; + line-height: 20px; + font-family: ""; +} + +.blacklin:visited { + font-size: 14px; + color: #666666; + text-decoration: none; + line-height: 20px; +} + +.blacklin:hover { + font-size: 14px; + color: #FF0000; + text-decoration: none; + font-family: ""; + line-height: 20px; +} + +.blacklin:active { + font-size: 14px; + color: #383C2B; + text-decoration: none; + font-family: Arial, Helvetica, sans-serif; + line-height: 20px; +} + +.hong:link { + font-size: 14px; + color: #527800; + text-decoration: underline; + line-height: 24px; + font-family: Arial, Helvetica, sans-serif; +} + +.hong:visited { + font-size: 14px; + color: #527800; + text-decoration: underline; + line-height: 24px; +} + +.hong:hover { + font-size: 14px; + color: #FF0000; + text-decoration: none; + font-family: Arial, Helvetica, sans-serif; + line-height: 24px; +} + +.hong:active { + font-size: 14px; + color: #FF0000; + text-decoration: none; + font-family: ""; + line-height: 24px; +} + +.black14 { + font-family: Arial, Helvetica, sans-serif; + font-size: 14px; + line-height: 20px; + color: #666666; +} + +.banhui { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + line-height: 24px; + font-weight: normal; + color: #0066CC; +} + +.henhong { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + line-height: 24px; + font-weight: normal; + color: #527800; +} + +.huise1 { + font-size: 12px; + color: #383C2B; + text-decoration: none; + font-family: Arial, Helvetica, sans-serif; + line-height: 24px; + . + biaod + { +} + +.danhuang02 { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + line-height: 24px; + font-weight: bold; + color: #FFFF00; +} + +.baisebiaodan { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + line-height: 20px; + color: #000000; + background-color: #FFFFFF; + border: 1px solid #FF9900; +} + +.danhuang7 { + font-size: 12px; + color: #D7FA8D; + text-decoration: none; + font-family: Arial, Helvetica, sans-serif; + line-height: 24px; + font-weight: normal; +} + +.xiaohei { + font-family: Arial, Helvetica, sans-serif; + font-size: 10px; + line-height: 18px; + color: #999999; +} + +.lvcu:link { + font-size: 14px; + color: #006600; + line-height: 24px; + font-family: Arial, Helvetica, sans-serif; +} + +.lvcu:visited { + font-size: 14px; + color: #006600; + line-height: 24px; +} + +.lvcu:hover { + font-size: 12px; + color: #FF0000; + text-decoration: none; + font-family: Arial, Helvetica, sans-serif; + line-height: 24px; +} + +.lvcu:active { + font-size: 12px; + color: #FF0000; + text-decoration: none; + font-family: ""; + line-height: 24px; +} \ No newline at end of file diff --git a/04/WebRoot/css/style.css b/04/WebRoot/css/style.css new file mode 100644 index 0000000..a05410a --- /dev/null +++ b/04/WebRoot/css/style.css @@ -0,0 +1,725 @@ +BODY { + PADDING-RIGHT: 0px; + PADDING-LEFT: 0px; + FONT-SIZE: 12px; + PADDING-BOTTOM: 0px; + MARGIN: 0px auto; + COLOR: #333333; + PADDING-TOP: 0px; + BACKGROUND-COLOR: #ffffff; + TEXT-ALIGN: center +} + +TR { + PADDING-RIGHT: 0px; + PADDING-LEFT: 0px; + FONT-SIZE: 12px; + PADDING-BOTTOM: 0px; + MARGIN: 0px auto; + COLOR: #666666; + PADDING-TOP: 0px; + TEXT-ALIGN: left +} + +TD { + PADDING-RIGHT: 0px; + PADDING-LEFT: 0px; + FONT-SIZE: 12px; + PADDING-BOTTOM: 0px; + MARGIN: 0px auto; + COLOR: #666666; + PADDING-TOP: 0px; + TEXT-ALIGN: left +} + +DIV { + PADDING-RIGHT: 0px; + PADDING-LEFT: 0px; + FONT-SIZE: 12px; + PADDING-BOTTOM: 0px; + MARGIN: 0px auto; + COLOR: #333333; + PADDING-TOP: 0px; + TEXT-ALIGN: center +} + +UL { + PADDING-RIGHT: 0px; + PADDING-LEFT: 0px; + PADDING-BOTTOM: 0px; + MARGIN: 0px; + PADDING-TOP: 0px; + LIST-STYLE-TYPE: none +} + +LI { + DISPLAY: block +} + +DL { + PADDING-RIGHT: 0px; + PADDING-LEFT: 0px; + PADDING-BOTTOM: 0px; + MARGIN: 0px; + PADDING-TOP: 0px +} + +DD { + PADDING-RIGHT: 0px; + PADDING-LEFT: 0px; + PADDING-BOTTOM: 0px; + MARGIN: 0px; + PADDING-TOP: 0px +} + +DT { + PADDING-RIGHT: 0px; + PADDING-LEFT: 0px; + PADDING-BOTTOM: 0px; + MARGIN: 0px; + PADDING-TOP: 0px +} + +IMG { + BORDER-TOP-WIDTH: 0px; + BORDER-LEFT-WIDTH: 0px; + BORDER-BOTTOM-WIDTH: 0px; + BORDER-RIGHT-WIDTH: 0px +} + +.cell_h { + CLEAR: both; + FONT-SIZE: 0px; + WIDTH: 100%; + LINE-HEIGHT: 0px; + HEIGHT: 10px +} + +.cell_v { + FONT-SIZE: 0px; + FLOAT: left; + WIDTH: 10px; + LINE-HEIGHT: 0px; + HEIGHT: 100% +} + +.input_register_form { + BORDER-RIGHT: #777777 1px solid; + BORDER-TOP: #777777 1px solid; + FONT-SIZE: 12px; + BORDER-LEFT: #777777 1px solid; + BORDER-BOTTOM: #777777 1px solid; + FONT-FAMILY: ?? +} + +.input_login_form { + BORDER-RIGHT: #777777 1px solid; + BORDER-TOP: #777777 1px solid; + FONT-SIZE: 12px; + BORDER-LEFT: #777777 1px solid; + BORDER-BOTTOM: #777777 1px solid; + FONT-FAMILY: ?? +} + +.input_pubtitle_form { + BORDER-RIGHT: #777777 1px solid; + BORDER-TOP: #777777 1px solid; + FONT-SIZE: 12px; + BORDER-LEFT: #777777 1px solid; + BORDER-BOTTOM: #777777 1px solid; + FONT-FAMILY: ?? +} + +SELECT { + BORDER-RIGHT: #777777 1px solid; + BORDER-TOP: #777777 1px solid; + FONT-SIZE: 12px; + BORDER-LEFT: #777777 1px solid; + BORDER-BOTTOM: #777777 1px solid; + FONT-FAMILY: ?? +} + +.input { + BORDER-RIGHT: #777777 1px solid; + BORDER-TOP: #777777 1px solid; + FONT-SIZE: 12px; + BORDER-LEFT: #777777 1px solid; + BORDER-BOTTOM: #777777 1px solid; + FONT-FAMILY: ?? +} + +A:link { + FONT-SIZE: 13px; + COLOR: #333333; + TEXT-DECORATION: none +} + +A:visited { + FONT-SIZE: 13px; + COLOR: #333333; + TEXT-DECORATION: none +} + +A:active { + FONT-SIZE: 13px; + COLOR: #333333; + TEXT-DECORATION: none +} + +A:hover { + FONT-SIZE: 13px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a1:link { + FONT-SIZE: 14px; + COLOR: #333333; + TEXT-DECORATION: none +} + +.a1:visited { + FONT-SIZE: 14px; + COLOR: #333333; + TEXT-DECORATION: none +} + +.a1:active { + FONT-SIZE: 14px; + COLOR: #333333; + TEXT-DECORATION: none +} + +.a1:hover { + FONT-SIZE: 14px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a2:link { + FONT-SIZE: 14px; + COLOR: #ffffff; + TEXT-DECORATION: none +} + +.a2:visited { + FONT-SIZE: 14px; + COLOR: #ffffff; + TEXT-DECORATION: none +} + +.a2:active { + FONT-SIZE: 14px; + COLOR: #ffffff; + TEXT-DECORATION: none +} + +.a2:hover { + FONT-SIZE: 14px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a3:link { + FONT-SIZE: 13px; + COLOR: #333333; + TEXT-DECORATION: none +} + +.a3:visited { + FONT-SIZE: 13px; + COLOR: #333333; + TEXT-DECORATION: none +} + +.a3:active { + FONT-SIZE: 13px; + COLOR: #333333; + TEXT-DECORATION: none +} + +.a3:hover { + FONT-SIZE: 13px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a4:link { + FONT-SIZE: 13px; + COLOR: #05227d; + TEXT-DECORATION: underline +} + +.a4:visited { + FONT-SIZE: 13px; + COLOR: #05227d; + TEXT-DECORATION: underline +} + +.a4:active { + FONT-SIZE: 13px; + COLOR: #05227d; + TEXT-DECORATION: underline +} + +.a4:hover { + FONT-SIZE: 13px; + COLOR: #ff0000; + TEXT-DECORATION: none +} + +.a5:link { + FONT-SIZE: 13px; + COLOR: #ff3300; + TEXT-DECORATION: underline +} + +.a5:visited { + FONT-SIZE: 13px; + COLOR: #ff3300; + TEXT-DECORATION: underline +} + +.a5:active { + FONT-SIZE: 13px; + COLOR: #ff3300; + TEXT-DECORATION: underline +} + +.a5:hover { + FONT-SIZE: 13px; + COLOR: #0000ff; + TEXT-DECORATION: none +} + +.a6:link { + FONT-SIZE: 12px; + COLOR: #ffffff; + TEXT-DECORATION: none +} + +.a6:visited { + FONT-SIZE: 12px; + COLOR: #ffffff; + TEXT-DECORATION: none +} + +.a6:active { + FONT-SIZE: 12px; + COLOR: #ffffff; + TEXT-DECORATION: none +} + +.a6:hover { + FONT-SIZE: 12px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a7:link { + FONT-SIZE: 12px; + COLOR: #000060; + TEXT-DECORATION: none +} + +.a7:visited { + FONT-SIZE: 12px; + COLOR: #000060; + TEXT-DECORATION: none +} + +.a7:active { + FONT-SIZE: 12px; + COLOR: #000060; + TEXT-DECORATION: none +} + +.a7:hover { + FONT-SIZE: 12px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a8:link { + FONT-SIZE: 12px; + COLOR: #000000; + TEXT-DECORATION: none +} + +.a8:visited { + FONT-SIZE: 12px; + COLOR: #000000; + TEXT-DECORATION: none +} + +.a8:active { + FONT-SIZE: 12px; + COLOR: #000000; + TEXT-DECORATION: none +} + +.a8:hover { + FONT-SIZE: 12px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a9:link { + FONT-SIZE: 12px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a9:visited { + FONT-SIZE: 12px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a9:active { + FONT-SIZE: 12px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a9:hover { + FONT-SIZE: 12px; + COLOR: #0000ff; + TEXT-DECORATION: none +} + +.a10:link { + FONT-SIZE: 13px; + COLOR: #feff00; + TEXT-DECORATION: none +} + +.a10:visited { + FONT-SIZE: 13px; + COLOR: #feff00; + TEXT-DECORATION: none +} + +.a10:active { + FONT-SIZE: 13px; + COLOR: #feff00; + TEXT-DECORATION: none +} + +.a10:hover { + FONT-SIZE: 13px; + COLOR: #0000ff; + TEXT-DECORATION: underline +} + +.a11:link { + FONT-SIZE: 13px; + COLOR: #05227d; + TEXT-DECORATION: none +} + +.a11:visited { + FONT-SIZE: 13px; + COLOR: #05227d; + TEXT-DECORATION: none +} + +.a11:active { + FONT-SIZE: 13px; + COLOR: #05227d; + TEXT-DECORATION: none +} + +.a11:hover { + FONT-SIZE: 13px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a12:link { + FONT-SIZE: 13px; + COLOR: #0000ff; + TEXT-DECORATION: underline +} + +.a12:visited { + FONT-SIZE: 13px; + COLOR: #0000ff; + TEXT-DECORATION: underline +} + +.a12:active { + FONT-SIZE: 13px; + COLOR: #0000ff; + TEXT-DECORATION: underline +} + +.a12:hover { + FONT-SIZE: 13px; + COLOR: #ff3300; + TEXT-DECORATION: none +} + +.a13:link { + FONT-SIZE: 13px; + COLOR: #188609; + TEXT-DECORATION: underline +} + +.a13:visited { + FONT-SIZE: 13px; + COLOR: #188609; + TEXT-DECORATION: underline +} + +.a13:active { + FONT-SIZE: 13px; + COLOR: #188609; + TEXT-DECORATION: underline +} + +.a13:hover { + FONT-SIZE: 13px; + COLOR: #ff3300; + TEXT-DECORATION: none +} + +.a14:link { + FONT-SIZE: 13px; + COLOR: #006699; + TEXT-DECORATION: none +} + +.a14:visited { + FONT-SIZE: 13px; + COLOR: #006699; + TEXT-DECORATION: none +} + +.a14:active { + FONT-SIZE: 13px; + COLOR: #006699; + TEXT-DECORATION: none +} + +.a14:hover { + FONT-SIZE: 13px; + COLOR: #006699; + TEXT-DECORATION: underline +} + +.a15:link { + FONT-SIZE: 14px; + COLOR: #05227d; + TEXT-DECORATION: underline +} + +.a15:visited { + FONT-SIZE: 14px; + COLOR: #05227d; + TEXT-DECORATION: underline +} + +.a15:active { + FONT-SIZE: 14px; + COLOR: #05227d; + TEXT-DECORATION: underline +} + +.a15:hover { + FONT-SIZE: 14px; + COLOR: #ff0000; + TEXT-DECORATION: none +} + +.a16:link { + FONT-SIZE: 14px; + COLOR: #0034c5; + TEXT-DECORATION: underline +} + +.a16:visited { + FONT-SIZE: 14px; + COLOR: #0034c5; + TEXT-DECORATION: underline +} + +.a16:active { + FONT-SIZE: 14px; + COLOR: #0034c5; + TEXT-DECORATION: underline +} + +.a16:hover { + FONT-SIZE: 14px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.a17:link { + FONT-SIZE: 13px; + COLOR: #666666; + TEXT-DECORATION: underline +} + +.a17:visited { + FONT-SIZE: 13px; + COLOR: #666666; + TEXT-DECORATION: underline +} + +.a17:active { + FONT-SIZE: 13px; + COLOR: #666666; + TEXT-DECORATION: underline +} + +.a17:hover { + FONT-SIZE: 13px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.ta0:link { + FONT-SIZE: 14px; + COLOR: #000000; + TEXT-DECORATION: none +} + +.ta0:visited { + FONT-SIZE: 14px; + COLOR: #000000; + TEXT-DECORATION: none +} + +.ta0:active { + FONT-SIZE: 14px; + COLOR: #000000; + TEXT-DECORATION: none +} + +.ta0:hover { + FONT-SIZE: 14px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.ta1:link { + FONT-SIZE: 14px; + COLOR: #0000ff; + TEXT-DECORATION: none +} + +.ta1:visited { + FONT-SIZE: 14px; + COLOR: #0000ff; + TEXT-DECORATION: none +} + +.ta1:active { + FONT-SIZE: 14px; + COLOR: #0000ff; + TEXT-DECORATION: none +} + +.ta1:hover { + FONT-SIZE: 14px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.ta2:link { + FONT-SIZE: 14px; + COLOR: #ff0000; + TEXT-DECORATION: none +} + +.ta2:visited { + FONT-SIZE: 14px; + COLOR: #ff0000; + TEXT-DECORATION: none +} + +.ta2:active { + FONT-SIZE: 14px; + COLOR: #ff0000; + TEXT-DECORATION: none +} + +.ta2:hover { + FONT-SIZE: 14px; + COLOR: #0000ff; + TEXT-DECORATION: underline +} + +.ta3:link { + FONT-SIZE: 14px; + COLOR: #00ff00; + TEXT-DECORATION: none +} + +.ta3:visited { + FONT-SIZE: 14px; + COLOR: #00ff00; + TEXT-DECORATION: none +} + +.ta3:active { + FONT-SIZE: 14px; + COLOR: #00ff00; + TEXT-DECORATION: none +} + +.ta3:hover { + FONT-SIZE: 14px; + COLOR: #ff0000; + TEXT-DECORATION: underline +} + +.ab1:link { + FONT-SIZE: 15px; + COLOR: #188609; + TEXT-DECORATION: underline +} + +.ab1:visited { + FONT-SIZE: 15px; + COLOR: #188609; + TEXT-DECORATION: underline +} + +.ab1:active { + FONT-SIZE: 15px; + COLOR: #188609; + TEXT-DECORATION: underline +} + +.ab1:hover { + FONT-SIZE: 15px; + COLOR: #e77900; + TEXT-DECORATION: none +} + +.ab2:link { + FONT-SIZE: 15px; + COLOR: #bd1010; + TEXT-DECORATION: underline +} + +.ab2:visited { + FONT-SIZE: 15px; + COLOR: #bd1010; + TEXT-DECORATION: underline +} + +.ab2:active { + FONT-SIZE: 15px; + COLOR: #bd1010; + TEXT-DECORATION: underline +} + +.ab2:hover { + FONT-SIZE: 15px; + COLOR: #e77900; + TEXT-DECORATION: none +} \ No newline at end of file diff --git a/04/WebRoot/images/bbs_header_nav.gif b/04/WebRoot/images/bbs_header_nav.gif new file mode 100644 index 0000000..fcf0f6d Binary files /dev/null and b/04/WebRoot/images/bbs_header_nav.gif differ diff --git a/04/WebRoot/images/bg.gif b/04/WebRoot/images/bg.gif new file mode 100644 index 0000000..5e92179 Binary files /dev/null and b/04/WebRoot/images/bg.gif differ diff --git a/04/WebRoot/images/btn_register.gif b/04/WebRoot/images/btn_register.gif new file mode 100644 index 0000000..0106155 Binary files /dev/null and b/04/WebRoot/images/btn_register.gif differ diff --git a/04/WebRoot/images/end.gif b/04/WebRoot/images/end.gif new file mode 100644 index 0000000..a4b7e01 Binary files /dev/null and b/04/WebRoot/images/end.gif differ diff --git a/04/WebRoot/images/grxx.gif b/04/WebRoot/images/grxx.gif new file mode 100644 index 0000000..7791912 Binary files /dev/null and b/04/WebRoot/images/grxx.gif differ diff --git a/04/WebRoot/images/hd.gif b/04/WebRoot/images/hd.gif new file mode 100644 index 0000000..0bce103 Binary files /dev/null and b/04/WebRoot/images/hd.gif differ diff --git a/04/WebRoot/images/home32.gif b/04/WebRoot/images/home32.gif new file mode 100644 index 0000000..b988698 Binary files /dev/null and b/04/WebRoot/images/home32.gif differ diff --git a/04/WebRoot/images/ite.gif b/04/WebRoot/images/ite.gif new file mode 100644 index 0000000..9a86c69 Binary files /dev/null and b/04/WebRoot/images/ite.gif differ diff --git a/04/WebRoot/images/left01.gif b/04/WebRoot/images/left01.gif new file mode 100644 index 0000000..04ce10d Binary files /dev/null and b/04/WebRoot/images/left01.gif differ diff --git a/04/WebRoot/images/left011.gif b/04/WebRoot/images/left011.gif new file mode 100644 index 0000000..08f6185 Binary files /dev/null and b/04/WebRoot/images/left011.gif differ diff --git a/04/WebRoot/images/left02.gif b/04/WebRoot/images/left02.gif new file mode 100644 index 0000000..88d6cfd Binary files /dev/null and b/04/WebRoot/images/left02.gif differ diff --git a/04/WebRoot/images/left022.GIF b/04/WebRoot/images/left022.GIF new file mode 100644 index 0000000..6a5fc34 Binary files /dev/null and b/04/WebRoot/images/left022.GIF differ diff --git a/04/WebRoot/images/left03.gif b/04/WebRoot/images/left03.gif new file mode 100644 index 0000000..7eb45c2 Binary files /dev/null and b/04/WebRoot/images/left03.gif differ diff --git a/04/WebRoot/images/left033.gif b/04/WebRoot/images/left033.gif new file mode 100644 index 0000000..6feaeb0 Binary files /dev/null and b/04/WebRoot/images/left033.gif differ diff --git a/04/WebRoot/images/login.gif b/04/WebRoot/images/login.gif new file mode 100644 index 0000000..bd664eb Binary files /dev/null and b/04/WebRoot/images/login.gif differ diff --git a/04/WebRoot/images/login.jpg b/04/WebRoot/images/login.jpg new file mode 100644 index 0000000..bb5ab8d Binary files /dev/null and b/04/WebRoot/images/login.jpg differ diff --git a/04/WebRoot/images/login1_01.gif b/04/WebRoot/images/login1_01.gif new file mode 100644 index 0000000..0eec3bd Binary files /dev/null and b/04/WebRoot/images/login1_01.gif differ diff --git a/04/WebRoot/images/login1_02.gif b/04/WebRoot/images/login1_02.gif new file mode 100644 index 0000000..8711a2e Binary files /dev/null and b/04/WebRoot/images/login1_02.gif differ diff --git a/04/WebRoot/images/login1_03.gif b/04/WebRoot/images/login1_03.gif new file mode 100644 index 0000000..022dba9 Binary files /dev/null and b/04/WebRoot/images/login1_03.gif differ diff --git a/04/WebRoot/images/login1_04.gif b/04/WebRoot/images/login1_04.gif new file mode 100644 index 0000000..1442972 Binary files /dev/null and b/04/WebRoot/images/login1_04.gif differ diff --git a/04/WebRoot/images/loginb.gif b/04/WebRoot/images/loginb.gif new file mode 100644 index 0000000..8d70252 Binary files /dev/null and b/04/WebRoot/images/loginb.gif differ diff --git a/04/WebRoot/images/loginbg.gif b/04/WebRoot/images/loginbg.gif new file mode 100644 index 0000000..63db2c0 Binary files /dev/null and b/04/WebRoot/images/loginbg.gif differ diff --git a/04/WebRoot/images/logo.gif b/04/WebRoot/images/logo.gif new file mode 100644 index 0000000..55e1d39 Binary files /dev/null and b/04/WebRoot/images/logo.gif differ diff --git a/04/WebRoot/images/mark_time.gif b/04/WebRoot/images/mark_time.gif new file mode 100644 index 0000000..77c2e16 Binary files /dev/null and b/04/WebRoot/images/mark_time.gif differ diff --git a/04/WebRoot/images/mark_title_simple.gif b/04/WebRoot/images/mark_title_simple.gif new file mode 100644 index 0000000..d32278e Binary files /dev/null and b/04/WebRoot/images/mark_title_simple.gif differ diff --git a/04/WebRoot/images/mark_ts.gif b/04/WebRoot/images/mark_ts.gif new file mode 100644 index 0000000..b95b94e Binary files /dev/null and b/04/WebRoot/images/mark_ts.gif differ diff --git a/04/WebRoot/images/mark_unsearch.gif b/04/WebRoot/images/mark_unsearch.gif new file mode 100644 index 0000000..0322f0a Binary files /dev/null and b/04/WebRoot/images/mark_unsearch.gif differ diff --git a/04/WebRoot/images/so.GIF b/04/WebRoot/images/so.GIF new file mode 100644 index 0000000..50d3dfc Binary files /dev/null and b/04/WebRoot/images/so.GIF differ diff --git a/04/WebRoot/images/text.gif b/04/WebRoot/images/text.gif new file mode 100644 index 0000000..539c3bd Binary files /dev/null and b/04/WebRoot/images/text.gif differ diff --git a/04/WebRoot/images/top2_01.gif b/04/WebRoot/images/top2_01.gif new file mode 100644 index 0000000..d59a602 Binary files /dev/null and b/04/WebRoot/images/top2_01.gif differ diff --git a/04/WebRoot/images/top2_02.gif b/04/WebRoot/images/top2_02.gif new file mode 100644 index 0000000..5528f92 Binary files /dev/null and b/04/WebRoot/images/top2_02.gif differ diff --git a/04/WebRoot/images/top2_03.gif b/04/WebRoot/images/top2_03.gif new file mode 100644 index 0000000..287654e Binary files /dev/null and b/04/WebRoot/images/top2_03.gif differ diff --git a/04/WebRoot/images/top2_04.gif b/04/WebRoot/images/top2_04.gif new file mode 100644 index 0000000..c3d2b3f Binary files /dev/null and b/04/WebRoot/images/top2_04.gif differ diff --git a/04/WebRoot/images/top2_05.gif b/04/WebRoot/images/top2_05.gif new file mode 100644 index 0000000..78d4af0 Binary files /dev/null and b/04/WebRoot/images/top2_05.gif differ diff --git a/04/WebRoot/images/top2_06.gif b/04/WebRoot/images/top2_06.gif new file mode 100644 index 0000000..605bef1 Binary files /dev/null and b/04/WebRoot/images/top2_06.gif differ diff --git a/04/WebRoot/images/top2_07.gif b/04/WebRoot/images/top2_07.gif new file mode 100644 index 0000000..8f866d9 Binary files /dev/null and b/04/WebRoot/images/top2_07.gif differ diff --git a/04/WebRoot/images/top2_08.gif b/04/WebRoot/images/top2_08.gif new file mode 100644 index 0000000..93a0815 Binary files /dev/null and b/04/WebRoot/images/top2_08.gif differ diff --git a/04/WebRoot/images/top2_09.gif b/04/WebRoot/images/top2_09.gif new file mode 100644 index 0000000..b864277 Binary files /dev/null and b/04/WebRoot/images/top2_09.gif differ diff --git a/04/WebRoot/images/top2_10.gif b/04/WebRoot/images/top2_10.gif new file mode 100644 index 0000000..31da568 Binary files /dev/null and b/04/WebRoot/images/top2_10.gif differ diff --git a/04/WebRoot/images/top_01.gif b/04/WebRoot/images/top_01.gif new file mode 100644 index 0000000..d59a602 Binary files /dev/null and b/04/WebRoot/images/top_01.gif differ diff --git a/04/WebRoot/images/top_02.gif b/04/WebRoot/images/top_02.gif new file mode 100644 index 0000000..d1ec45f Binary files /dev/null and b/04/WebRoot/images/top_02.gif differ diff --git a/04/WebRoot/images/top_03.gif b/04/WebRoot/images/top_03.gif new file mode 100644 index 0000000..6775a3c Binary files /dev/null and b/04/WebRoot/images/top_03.gif differ diff --git a/04/WebRoot/images/top_04.gif b/04/WebRoot/images/top_04.gif new file mode 100644 index 0000000..21a540a Binary files /dev/null and b/04/WebRoot/images/top_04.gif differ diff --git a/04/WebRoot/images/top_05.gif b/04/WebRoot/images/top_05.gif new file mode 100644 index 0000000..f5bd037 Binary files /dev/null and b/04/WebRoot/images/top_05.gif differ diff --git a/04/WebRoot/images/top_06.gif b/04/WebRoot/images/top_06.gif new file mode 100644 index 0000000..21c0418 Binary files /dev/null and b/04/WebRoot/images/top_06.gif differ diff --git a/04/WebRoot/images/top_07.gif b/04/WebRoot/images/top_07.gif new file mode 100644 index 0000000..446a5ab Binary files /dev/null and b/04/WebRoot/images/top_07.gif differ diff --git a/04/WebRoot/images/top_08.gif b/04/WebRoot/images/top_08.gif new file mode 100644 index 0000000..ef4b63a Binary files /dev/null and b/04/WebRoot/images/top_08.gif differ diff --git a/04/WebRoot/images/top_09.gif b/04/WebRoot/images/top_09.gif new file mode 100644 index 0000000..e66de3b Binary files /dev/null and b/04/WebRoot/images/top_09.gif differ diff --git a/04/WebRoot/images/top_10.gif b/04/WebRoot/images/top_10.gif new file mode 100644 index 0000000..31da568 Binary files /dev/null and b/04/WebRoot/images/top_10.gif differ diff --git a/04/WebRoot/images/topic_permit.gif b/04/WebRoot/images/topic_permit.gif new file mode 100644 index 0000000..38f9aaf Binary files /dev/null and b/04/WebRoot/images/topic_permit.gif differ diff --git a/04/WebRoot/images/tw.gif b/04/WebRoot/images/tw.gif new file mode 100644 index 0000000..df7a2d3 Binary files /dev/null and b/04/WebRoot/images/tw.gif differ diff --git a/04/WebRoot/images/unface.gif b/04/WebRoot/images/unface.gif new file mode 100644 index 0000000..aa095d5 Binary files /dev/null and b/04/WebRoot/images/unface.gif differ diff --git a/04/WebRoot/images/wh.gif b/04/WebRoot/images/wh.gif new file mode 100644 index 0000000..b35208d Binary files /dev/null and b/04/WebRoot/images/wh.gif differ diff --git a/04/WebRoot/images/wz.gif b/04/WebRoot/images/wz.gif new file mode 100644 index 0000000..8f5ee99 Binary files /dev/null and b/04/WebRoot/images/wz.gif differ diff --git a/04/WebRoot/images/zhuce.gif b/04/WebRoot/images/zhuce.gif new file mode 100644 index 0000000..c5e11b3 Binary files /dev/null and b/04/WebRoot/images/zhuce.gif differ diff --git a/04/WebRoot/images/zhuce.jpg b/04/WebRoot/images/zhuce.jpg new file mode 100644 index 0000000..29700bc Binary files /dev/null and b/04/WebRoot/images/zhuce.jpg differ diff --git a/04/WebRoot/index.jsp b/04/WebRoot/index.jsp new file mode 100644 index 0000000..baec2e3 --- /dev/null +++ b/04/WebRoot/index.jsp @@ -0,0 +1,130 @@ +<%@ page language="java" pageEncoding="utf-8"%> +<%@ taglib uri="/struts-tags" prefix="s"%> + + + + +明日论坛-国内领先的IT技术搜素引擎 + + + + + + + + + + + + +
    + + + + +
    欢迎您,
    + 进入论坛
    +
    + + + + +
    登录 | 注册
    + 进入论坛
    +
    + + + + + + + + + + +
    + + + + + + + +
    + + + + + + +
    +
    + + + + + + +
    + + + + +
    +
    + + + + + +
    明日论坛热门搜索: c# +    java编程词典 +    java + web    java    java从入门到精通  
    +
    +
    +


    +
    + 明日图书
    | 明日软件 + | 编程词典

    +

    技术服务热线:400-675-1066 传真:0431-84939777 + 企业邮箱:mingrisoft@mingrisoft.com
    + 公司地址:吉林省长春市二道区东盛大街89号亚泰广场C座 吉ICP备07500273号
    + Copyright©www.mingribook.com All Rights Reserved!

    +
    +
    +
    + + diff --git a/04/WebRoot/js/articleTypes.js b/04/WebRoot/js/articleTypes.js new file mode 100644 index 0000000..43c6f6f --- /dev/null +++ b/04/WebRoot/js/articleTypes.js @@ -0,0 +1,67 @@ +var articleTypes = { + 'Java' : // 名称 + { + id : 'Java',// id + style : 'cursor:hand;',// 样式, + src : 'images/top_02.gif',// 图片 + activeSrc : 'images/top2_02.gif',// 被激活时的图片 + width : 98, + height : 35 + }, + 'Java web' : { + id : 'Java web', + style : 'cursor:hand;', + src : 'images/top_03.gif', + activeSrc : 'images/top2_03.gif', + width : 98, + height : 35 + }, + 'C#' : { + id : 'C#', + style : 'cursor:hand;', + src : 'images/top_04.gif', + activeSrc : 'images/top2_04.gif', + width : 65, + height : 35 + }, + 'ASP.NET' : { + id : 'ASP.NET', + style : 'cursor:hand;', + src : 'images/top_05.gif', + activeSrc : 'images/top2_05.gif', + width : 98, + height : 35 + }, + 'Visual Basic' : { + id : 'Visual Basic', + style : 'cursor:hand;', + src : 'images/top_06.gif', + activeSrc : 'images/top2_06.gif', + width : 113, + height : 35 + }, + 'Visual C++' : { + id : 'Visual C++', + style : 'cursor:hand;', + src : 'images/top_07.gif', + activeSrc : 'images/top2_07.gif', + width : 113, + height : 35 + }, + 'PHP' : { + id : 'PHP', + style : 'cursor:hand;', + src : 'images/top_08.gif', + activeSrc : 'images/top2_08.gif', + width : 65, + height : 35 + }, + 'ASP' : { + id : 'ASP', + style : 'cursor:hand;', + src : 'images/top_09.gif', + activeSrc : 'images/top2_09.gif', + width : 65, + height : 35 + } +}; \ No newline at end of file diff --git a/04/WebRoot/js/article_type.js b/04/WebRoot/js/article_type.js new file mode 100644 index 0000000..edf81e8 --- /dev/null +++ b/04/WebRoot/js/article_type.js @@ -0,0 +1,75 @@ +function MM_preloadImages() { // v3.0 + var d = document; + if (d.images) { + if (!d.MM_p) + d.MM_p = new Array(); + var i, j = d.MM_p.length, a = MM_preloadImages.arguments; + for (i = 0; i < a.length; i++) + if (a[i].indexOf("#") != 0) { + d.MM_p[j] = new Image; + d.MM_p[j++].src = a[i]; + } + } +} +// 打开关闭右侧导航 +function openCloseRightNav() { + if ($("#rightNav").css("display") == "none") { + $("#openCloseRightNavBtn").attr("src", + "/known/public_html/img/wait_close.gif"); + $("#openCloseRightNavAlert").html("关闭右导航"); + $("#rightNav").slideDown( + "normal", + function() { + $("#openCloseRightNavBtn").attr("src", + "/known/public_html/img/bbs_btn_close1.gif"); + }); + } else { + $("#openCloseRightNavBtn").attr("src", + "/known/public_html/img/wait_open.gif"); + $("#openCloseRightNavAlert").html("展开右导航"); + $("#rightNav").slideUp( + "normal", + function() { + $("#openCloseRightNavBtn").attr("src", + "/known/public_html/img/bbs_btn_open1.gif"); + }); + } +} +// 更改行背景色 +function changeRowColor(x, y) { + if (y == 0) { + $("#" + x).css("background-color", "#FFFFFF"); + } else { + $("#" + x).css("background-color", "#fbfff4"); + } +} +// 更改验证码的值 +function changeValidateCode() { + $("#vcodeImg").attr( + "src", + "/known/public_html/common/vcode/w/60/h/22/f/1/rand/" + + Math.random() + ""); +} +// 更改主题选项卡 +function changeTitleTab(x, y, z) { + $("#" + x).css("border-bottom", "1px solid #FFFFFF"); + $("#" + x).css("background-color", "#FFFFFF"); + $("#" + x + "_content").css("display", "block"); + + $("#" + y).css("border-bottom", "1px solid #9DB3C5"); + $("#" + y).css("background-color", "#fbfff4"); + $("#" + y + "_content").css("display", "none"); + + $("#" + z).css("border-bottom", "1px solid #9DB3C5"); + $("#" + z).css("background-color", "#fbfff4"); + $("#" + z + "_content").css("display", "none"); +} +// 显示或隐藏子类 +function showHidden(x) { + $("#" + x).slideToggle("fast"); + if ($.trim($("#btn_" + x).html()) == "-") { + $("#btn_" + x).html("+"); + } else { + $("#btn_" + x).html("-"); + } +} diff --git a/04/WebRoot/js/index.js b/04/WebRoot/js/index.js new file mode 100644 index 0000000..26e96bf --- /dev/null +++ b/04/WebRoot/js/index.js @@ -0,0 +1,73 @@ +/** + * 加载文章类型title + */ +var activeId = '';//选中的文章类型 +$(function() { + var div = $('#articleTypeDiv'); + for ( var type in articleTypes) { + var articleType = articleTypes[type]; + var img = $(''); + img.attr('src', articleType.src); + img.attr('activeSrc', articleType.activeSrc); + img.attr('height', articleType.height); + img.attr('width', articleType.width); + img.attr('id', articleType.id); + img.attr('style', articleType.style); + img.attr('border', "0"); + img.attr('alt', ""); + img.bind('mouseover', function() { + var o = $(this); + if (o.attr('id') != activeId) { + o.attr('src', articleTypes[o.attr('id')].activeSrc); + } + }); + img.bind('click', function() { + var o = $(this); + o.attr('src', articleTypes[o.attr('id')].activeSrc);// 激活 + if (activeId != '') { + if (o.attr('id') == activeId) { + o.attr('src', articleTypes[o.attr('id')].src); + activeId = ''; + return; + } else { + document.getElementById(activeId).src = articleTypes[activeId].src; + } + } + activeId = o.attr('id'); + }); + img.bind('mouseout', function() { + var o = $(this); + if (o.attr('id') != activeId) { + o.attr('src', articleTypes[o.attr('id')].src); + } + }); + div.append(img); + } + doSearchForm.reset(); +}); +/** + * 搜索文章 + * @return + */ +function doSearch() { + var searchText = $.trim($('#searchStr').val()); + if (!searchText) { + alert('请输入要搜素的内容'); + return; + } + if (searchText.length > 255) { + alert('输入内容不能超过255个字符'); + return; + } + $('#articleTypeName').val(activeId); + doSearchForm.submit(); +} +/** + * 热门搜索 + * @param content + * @return + */ +function seartchHot(content) { + $('#searchStr').val(content); + doSearchForm.submit(); +} diff --git a/04/WebRoot/js/jquery.js b/04/WebRoot/js/jquery.js new file mode 100644 index 0000000..9263574 --- /dev/null +++ b/04/WebRoot/js/jquery.js @@ -0,0 +1,4376 @@ +/*! + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){ + +var + // Will speed up references to window, and allows munging its name. + window = this, + // Will speed up references to undefined, and allows munging its name. + undefined, + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + // Map over the $ in case of overwrite + _$ = window.$, + + jQuery = window.jQuery = window.$ = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); + }, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, + // Is it a simple selector + isSimple = /^.[^:#\[\.,]*$/; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + this.context = selector; + return this; + } + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem && elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + var ret = jQuery( elem || [] ); + ret.context = document; + ret.selector = selector; + return ret; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return jQuery( document ).ready( selector ); + + // Make sure that old selector state is passed along + if ( selector.selector && selector.context ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return this.setArray(jQuery.isArray( selector ) ? + selector : + jQuery.makeArray(selector)); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.3.2", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num === undefined ? + + // Return a 'clean' array + Array.prototype.slice.call( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) + ret.selector = this.selector + (this.selector ? " " : "") + selector; + else if ( name ) + ret.selector = this.selector + "." + name + "(" + selector + ")"; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem && elem.jquery ? elem[0] : elem + , this ); + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( typeof name === "string" ) + if ( value === undefined ) + return this[0] && jQuery[ type || "attr" ]( this[0], name ); + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text !== "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).clone(); + + if ( this[0].parentNode ) + wrap.insertBefore( this[0] ); + + wrap.map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }).append(this); + } + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: [].push, + sort: [].sort, + splice: [].splice, + + find: function( selector ) { + if ( this.length === 1 ) { + var ret = this.pushStack( [], "find", selector ); + ret.length = 0; + jQuery.find( selector, this[0], ret ); + return ret; + } else { + return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + })), "find", selector ); + } + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var html = this.outerHTML; + if ( !html ) { + var div = this.ownerDocument.createElement("div"); + div.appendChild( this.cloneNode(true) ); + html = div.innerHTML; + } + + return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; + } else + return this.cloneNode(true); + }); + + // Copy the events from the original to the clone + if ( events === true ) { + var orig = this.find("*").andSelf(), i = 0; + + ret.find("*").andSelf().each(function(){ + if ( this.nodeName !== orig[i].nodeName ) + return; + + var events = jQuery.data( orig[i], "events" ); + + for ( var type in events ) { + for ( var handler in events[ type ] ) { + jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); + } + } + + i++; + }); + } + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ + return elem.nodeType === 1; + }) ), "filter", selector ); + }, + + closest: function( selector ) { + var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, + closer = 0; + + return this.map(function(){ + var cur = this; + while ( cur && cur.ownerDocument ) { + if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { + jQuery.data(cur, "closest", closer); + return cur; + } + cur = cur.parentNode; + closer++; + } + }); + }, + + not: function( selector ) { + if ( typeof selector === "string" ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return this.pushStack( jQuery.unique( jQuery.merge( + this.get(), + typeof selector === "string" ? + jQuery( selector ) : + jQuery.makeArray( selector ) + ))); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return !!selector && this.is( "." + selector ); + }, + + val: function( value ) { + if ( value === undefined ) { + var elem = this[0]; + + if ( elem ) { + if( jQuery.nodeName( elem, 'option' ) ) + return (elem.attributes.value || {}).specified ? elem.value : elem.text; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + } + + // Everything else, we just grab the value + return (elem.value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + if ( typeof value === "number" ) + value += ''; + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(value); + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value === undefined ? + (this[0] ? + this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, +i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ), + "slice", Array.prototype.slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + domManip: function( args, table, callback ) { + if ( this[0] ) { + var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), + scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), + first = fragment.firstChild; + + if ( first ) + for ( var i = 0, l = this.length; i < l; i++ ) + callback.call( root(this[i], first), this.length > 1 || i > 0 ? + fragment.cloneNode(true) : fragment ); + + if ( scripts ) + jQuery.each( scripts, evalScript ); + } + + return this; + + function root( elem, cur ) { + return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? + (elem.getElementsByTagName("tbody")[0] || + elem.appendChild(elem.ownerDocument.createElement("tbody"))) : + elem; + } + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy === "object" && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, + // Never move original objects, clone them + src || ( copy.length != null ? [ ] : { } ) + , copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +// exclude the following css properties to add px +var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + // cache defaultView + defaultView = document.defaultView || {}, + toString = Object.prototype.toString; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return toString.call(obj) === "[object Function]"; + }, + + isArray: function( obj ) { + return toString.call(obj) === "[object Array]"; + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || + !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + if ( data && /\S/.test(data) ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.support.scriptEval ) + script.appendChild( document.createTextNode( data ) ); + else + script.text = data; + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, length = object.length; + + if ( args ) { + if ( length === undefined ) { + for ( name in object ) + if ( callback.apply( object[ name ], args ) === false ) + break; + } else + for ( ; i < length; ) + if ( callback.apply( object[ i++ ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( length === undefined ) { + for ( name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames !== undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use hasClass("class") + has: function( elem, className ) { + return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force, extra ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + + if ( extra === "border" ) + return; + + jQuery.each( which, function() { + if ( !extra ) + val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + if ( extra === "margin" ) + val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; + else + val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + } + + if ( elem.offsetWidth !== 0 ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, Math.round(val)); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style; + + // We need to handle opacity special in IE + if ( name == "opacity" && !jQuery.support.opacity ) { + ret = jQuery.attr( style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && style && style[ name ] ) + ret = style[ name ]; + + else if ( defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var computedStyle = defaultView.getComputedStyle( elem, null ); + + if ( computedStyle ) + ret = computedStyle.getPropertyValue( name ); + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var left = style.left, rsLeft = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + style.left = ret || 0; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + clean: function( elems, context, fragment ) { + context = context || document; + + // !context.createElement fails in IE with an error but returns typeof 'object' + if ( typeof context.createElement === "undefined" ) + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { + var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); + if ( match ) + return [ context.createElement( match[1] ) ]; + } + + var ret = [], scripts = [], div = context.createElement("div"); + + jQuery.each(elems, function(i, elem){ + if ( typeof elem === "number" ) + elem += ''; + + if ( !elem ) + return; + + // Convert html string into DOM nodes + if ( typeof elem === "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); + + var wrap = + // option or optgroup + !tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "", "
    " ] || + + !tags.indexOf("", "" ] || + + // matched above + (!tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + // IE can't serialize and + + +

    更新成功!

    +
    本窗口将在3秒后自动关闭
    + + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/admin/product/category_add.jsp b/05/Shop/WebRoot/WEB-INF/pages/admin/product/category_add.jsp new file mode 100644 index 0000000..c28359c --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/admin/product/category_add.jsp @@ -0,0 +1,31 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@include file="/WEB-INF/pages/common/common_admin.jsp"%> + + + + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/admin/product/category_edit.jsp b/05/Shop/WebRoot/WEB-INF/pages/admin/product/category_edit.jsp new file mode 100644 index 0000000..ce675e0 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/admin/product/category_edit.jsp @@ -0,0 +1,27 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@include file="/WEB-INF/pages/common/common_admin.jsp"%> + + + + + + + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/admin/product/category_list.jsp b/05/Shop/WebRoot/WEB-INF/pages/admin/product/category_list.jsp new file mode 100644 index 0000000..24fab25 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/admin/product/category_list.jsp @@ -0,0 +1,91 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +<%@include file="/WEB-INF/pages/common/common_admin.jsp" %> + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/admin/product/product_add.jsp b/05/Shop/WebRoot/WEB-INF/pages/admin/product/product_add.jsp new file mode 100644 index 0000000..17c1856 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/admin/product/product_add.jsp @@ -0,0 +1,62 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@include file="/WEB-INF/pages/common/common_admin.jsp"%> + + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/admin/product/product_edit.jsp b/05/Shop/WebRoot/WEB-INF/pages/admin/product/product_edit.jsp new file mode 100644 index 0000000..dccbc43 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/admin/product/product_edit.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@include file="/WEB-INF/pages/common/common_admin.jsp" %> + + + + + + + + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/admin/product/product_list.jsp b/05/Shop/WebRoot/WEB-INF/pages/admin/product/product_list.jsp new file mode 100644 index 0000000..a35db1e --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/admin/product/product_list.jsp @@ -0,0 +1,64 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@include file="/WEB-INF/pages/common/common_admin.jsp"%> + diff --git a/05/Shop/WebRoot/WEB-INF/pages/admin/right.jsp b/05/Shop/WebRoot/WEB-INF/pages/admin/right.jsp new file mode 100644 index 0000000..dba3f0b --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/admin/right.jsp @@ -0,0 +1,40 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@include file="/WEB-INF/pages/common/common_admin.jsp" %> + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/admin/top.jsp b/05/Shop/WebRoot/WEB-INF/pages/admin/top.jsp new file mode 100644 index 0000000..be65c9e --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/admin/top.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@include file="/WEB-INF/pages/common/common_admin.jsp"%> +
    +
    + + 您好, !  + + + +
    +
    \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/admin/user/user_login.jsp b/05/Shop/WebRoot/WEB-INF/pages/admin/user/user_login.jsp new file mode 100644 index 0000000..bb647c7 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/admin/user/user_login.jsp @@ -0,0 +1,43 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + + +管理员登录 + + + + + +
    + + + + + + + + + + + + + + + +
    管理员:
    密 码:
    +
    +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/cart/cart_list.jsp b/05/Shop/WebRoot/WEB-INF/pages/cart/cart_list.jsp new file mode 100644 index 0000000..d1877d9 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/cart/cart_list.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +我的购物车 + + +<%@ include file="/WEB-INF/pages/common/head.jsp"%> + +
    +
    +
    我的购物车
    +
    我的订单
    +
    +
    +
     > 我的购物车
    +
    + + + + + + + + + + + + + + + + +
    + 总价:元  
    + + + + + + + +
    商品名称市场价价格数量删除
    + + + + + + + + + +
    + ¥ +
    + 为您节省:¥
    + + + + +
    +
    + + +    + +   +    + + + +
    +
    +
    + + +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/common/common.jsp b/05/Shop/WebRoot/WEB-INF/pages/common/common.jsp new file mode 100644 index 0000000..4addd5e --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/common/common.jsp @@ -0,0 +1,4 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/common/common_admin.jsp b/05/Shop/WebRoot/WEB-INF/pages/common/common_admin.jsp new file mode 100644 index 0000000..cb31323 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/common/common_admin.jsp @@ -0,0 +1,11 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/common/head.jsp b/05/Shop/WebRoot/WEB-INF/pages/common/head.jsp new file mode 100644 index 0000000..f483131 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/common/head.jsp @@ -0,0 +1,60 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + +
    +
    + 我的购物车 | 我的订单  + + 欢迎    + 退出 + +
    + + +
    + diff --git a/05/Shop/WebRoot/WEB-INF/pages/common/page.jsp b/05/Shop/WebRoot/WEB-INF/pages/common/page.jsp new file mode 100644 index 0000000..7651c0e --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/common/page.jsp @@ -0,0 +1,20 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> +
    + + 首页 上一页 + + + 首页 上一页 + + +  []  + + + 下一页 尾页 + + + 下一页 尾页 + +
    \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/common/show_error.jsp b/05/Shop/WebRoot/WEB-INF/pages/common/show_error.jsp new file mode 100644 index 0000000..ba2db90 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/common/show_error.jsp @@ -0,0 +1,20 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + +错误 + + + 访问页面错误! +
    +
    +

    + +

    + 返回主页 + + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/index.jsp b/05/Shop/WebRoot/WEB-INF/pages/index.jsp new file mode 100644 index 0000000..a7f457f --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/index.jsp @@ -0,0 +1,126 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +首页 + + + + +<%@include file="/WEB-INF/pages/common/head.jsp"%> +
    +
    +
    +
    +
    + + +
    +
    + + + + + +
    + + +
    + + + +
    +   + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/order/order_add.jsp b/05/Shop/WebRoot/WEB-INF/pages/order/order_add.jsp new file mode 100644 index 0000000..37df1bf --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/order/order_add.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + +添加订单 + + +<%@ include file="/WEB-INF/pages/common/head.jsp"%> +
    +
    +
    我的购物车
    +
    我的订单
    +
    + +
    +
     > 我的订单
    +
    + + + + + + +
    收货人姓名: + +
    +
    +
    + + + + + +
    收货人地址: + +
    +
    +
    + + + + + +
    收货人电话: + +
    +
    +
    + + + + + +
    支付方式: +

    + 网上银行 +

    +

    + 支付宝 +

    +

    + 货到付款 +

    +

    + 邮局汇款 + 收款人地址:吉林省长春市xxx大厦xxx室 收款人姓名:xxx 收款人邮编:xxxx +

    +
    +
    +
    + + + + +
    + +
    + +
    +
    +
    + +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/order/order_confirm.jsp b/05/Shop/WebRoot/WEB-INF/pages/order/order_confirm.jsp new file mode 100644 index 0000000..46409b2 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/order/order_confirm.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +订单确认 + + +<%@ include file="/WEB-INF/pages/common/head.jsp"%> +
    +
    +
    我的购物车
    +
    我的订单
    +
    +
    +
     > 订单确认
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    商品名称市场价价格数量
    + + + + + + + +
    + ¥ +
    + 为您节省:¥
    +
    + 总价:元  
    我的信息
    + + + + + + + + + + + + + + + + + +
    收货人姓名:
    收货人地址:
    收货人电话:
    货款支付方式:
    +
    + +
    +
    +
    +
    + +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/order/order_error.jsp b/05/Shop/WebRoot/WEB-INF/pages/order/order_error.jsp new file mode 100644 index 0000000..f391ca6 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/order/order_error.jsp @@ -0,0 +1,40 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + +我的订单 + + +<%@ include file="/WEB-INF/pages/common/head.jsp"%> +
    +
    +
    我的购物车
    +
    我的订单
    +
    +
    +
     > 我的订单
    +
    +
    +

    对不起,订单中并无任何商品购买信息!

    +
    +
    + + + + + + + + + + + + + + +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/order/order_list.jsp b/05/Shop/WebRoot/WEB-INF/pages/order/order_list.jsp new file mode 100644 index 0000000..87a1699 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/order/order_list.jsp @@ -0,0 +1,71 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + +我的订单 + + +<%@ include file="/WEB-INF/pages/common/head.jsp"%> +
    +
    +
    我的购物车
    +
    我的订单
    +
    +
    +
     > 我的订单
    +
    + + + + + + + + + +
    + + + + + + + + + +
    订单号码订单总金额收货人收货地址支付方式创建时间订单状态
    + + + + + + + + + + +

    +
    +
    +
    +
    + + + + + + + + + + + + + + +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/order/order_success.jsp b/05/Shop/WebRoot/WEB-INF/pages/order/order_success.jsp new file mode 100644 index 0000000..74993e2 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/order/order_success.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + +付款完成 + + + +付款完成,请等待商家发货! +

    + 由于在线支付需要提供银行卡号,与银行的接口相连接,此处模拟支付完成。 +

    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/product/order_success.jsp b/05/Shop/WebRoot/WEB-INF/pages/product/order_success.jsp new file mode 100644 index 0000000..74993e2 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/product/order_success.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + +付款完成 + + + +付款完成,请等待商家发货! +

    + 由于在线支付需要提供银行卡号,与银行的接口相连接,此处模拟支付完成。 +

    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/product/product_click_list.jsp b/05/Shop/WebRoot/WEB-INF/pages/product/product_click_list.jsp new file mode 100644 index 0000000..aab3ae2 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/product/product_click_list.jsp @@ -0,0 +1,18 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + + + + +
    + + + + (人气:) + +
    \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/product/product_find_list.jsp b/05/Shop/WebRoot/WEB-INF/pages/product/product_find_list.jsp new file mode 100644 index 0000000..1b42bb2 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/product/product_find_list.jsp @@ -0,0 +1,16 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + +
    + +
    + + + /upload/"> +

    +
    +
    +
    +
    \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/product/product_list.jsp b/05/Shop/WebRoot/WEB-INF/pages/product/product_list.jsp new file mode 100644 index 0000000..0c4d1ae --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/product/product_list.jsp @@ -0,0 +1,158 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +商品信息列表 + + + +<%@ include file="/WEB-INF/pages/common/head.jsp"%> +
    + + +
    +
    +
    + + +
      +
    • + + + + + + + + + + + + + + + + + + + +
      + + + /upload/"> + +
      商品名称: + + + + +
      市场价格: + + + +
      天下淘价格: + + +  节省 + +
      + + + + +
      +
    • +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + +

    对不起,还没有添加商品信息。

    + 返回主页 +
    +
    +
    +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/product/product_select.jsp b/05/Shop/WebRoot/WEB-INF/pages/product/product_select.jsp new file mode 100644 index 0000000..9995d3a --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/product/product_select.jsp @@ -0,0 +1,152 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +商品信息列表 + + + +<%@ include file="/WEB-INF/pages/common/head.jsp"%> +
    + + +
    +
    +
    + +
      +
    • + + + + + + + + + + + + + + + + + + + +
      + + + /upload/"> + +
      商品名称: + + + + +
      市场价格: + + + +
      天下淘价格: + + +  节省 + +
      + + + + +

      + + [ 配送说明 ]    + + [ 付款方式 ] + +

      +
      +
    • +
    +
      +
    • +
      +
    • +
    +
      +
    • +
      + +
      +

      + +

      +
    • +
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/user/customer_login.jsp b/05/Shop/WebRoot/WEB-INF/pages/user/customer_login.jsp new file mode 100644 index 0000000..499d01f --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/user/customer_login.jsp @@ -0,0 +1,44 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +用户登录 + + +<%@ include file="/WEB-INF/pages/common/head.jsp"%> +
    +
    +
    + + + + + + + + + + + + + + +
    会员名: + +
    密 码: + +
    +    + + + +
    +
    +
    +
    + +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/pages/user/customer_reg.jsp b/05/Shop/WebRoot/WEB-INF/pages/user/customer_reg.jsp new file mode 100644 index 0000000..1b14194 --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/pages/user/customer_reg.jsp @@ -0,0 +1,69 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +用户注册 + + +<%@ include file="/WEB-INF/pages/common/head.jsp"%> +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    用 户 名: + * +
    密 码: + * +
    确认密码: + * +
    邮箱地址: + * +
    住 址: + +
    手 机: + +
    + +
    +
    +
    +
    + +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/WEB-INF/web.xml b/05/Shop/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..a01cb8a --- /dev/null +++ b/05/Shop/WebRoot/WEB-INF/web.xml @@ -0,0 +1,37 @@ + + + Shop + + + org.springframework.web.context.ContextLoaderListener + + + contextConfigLocation + classpath:applicationContext-*.xml + + + + openSessionInViewFilter + org.springframework.orm.hibernate3.support.OpenSessionInViewFilter + + + openSessionInViewFilter + /* + + + + struts2 + org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter + + + struts2 + /* + + + + index.jsp + + \ No newline at end of file diff --git a/05/Shop/WebRoot/css/images/01.gif b/05/Shop/WebRoot/css/images/01.gif new file mode 100644 index 0000000..202b6e8 Binary files /dev/null and b/05/Shop/WebRoot/css/images/01.gif differ diff --git a/05/Shop/WebRoot/css/images/02.gif b/05/Shop/WebRoot/css/images/02.gif new file mode 100644 index 0000000..747b65e Binary files /dev/null and b/05/Shop/WebRoot/css/images/02.gif differ diff --git a/05/Shop/WebRoot/css/images/03.gif b/05/Shop/WebRoot/css/images/03.gif new file mode 100644 index 0000000..0205807 Binary files /dev/null and b/05/Shop/WebRoot/css/images/03.gif differ diff --git a/05/Shop/WebRoot/css/images/04.gif b/05/Shop/WebRoot/css/images/04.gif new file mode 100644 index 0000000..7235927 Binary files /dev/null and b/05/Shop/WebRoot/css/images/04.gif differ diff --git a/05/Shop/WebRoot/css/images/05.gif b/05/Shop/WebRoot/css/images/05.gif new file mode 100644 index 0000000..fa8390b Binary files /dev/null and b/05/Shop/WebRoot/css/images/05.gif differ diff --git a/05/Shop/WebRoot/css/images/06.gif b/05/Shop/WebRoot/css/images/06.gif new file mode 100644 index 0000000..3215865 Binary files /dev/null and b/05/Shop/WebRoot/css/images/06.gif differ diff --git a/05/Shop/WebRoot/css/images/07.gif b/05/Shop/WebRoot/css/images/07.gif new file mode 100644 index 0000000..d09fbf3 Binary files /dev/null and b/05/Shop/WebRoot/css/images/07.gif differ diff --git a/05/Shop/WebRoot/css/images/08.gif b/05/Shop/WebRoot/css/images/08.gif new file mode 100644 index 0000000..3dd0a33 Binary files /dev/null and b/05/Shop/WebRoot/css/images/08.gif differ diff --git a/05/Shop/WebRoot/css/images/an_06.gif b/05/Shop/WebRoot/css/images/an_06.gif new file mode 100644 index 0000000..7a5e61a Binary files /dev/null and b/05/Shop/WebRoot/css/images/an_06.gif differ diff --git a/05/Shop/WebRoot/css/images/an_08.gif b/05/Shop/WebRoot/css/images/an_08.gif new file mode 100644 index 0000000..5dd195b Binary files /dev/null and b/05/Shop/WebRoot/css/images/an_08.gif differ diff --git a/05/Shop/WebRoot/css/images/bg_03.gif b/05/Shop/WebRoot/css/images/bg_03.gif new file mode 100644 index 0000000..2f05ea4 Binary files /dev/null and b/05/Shop/WebRoot/css/images/bg_03.gif differ diff --git a/05/Shop/WebRoot/css/images/blue.gif b/05/Shop/WebRoot/css/images/blue.gif new file mode 100644 index 0000000..7e0e66e Binary files /dev/null and b/05/Shop/WebRoot/css/images/blue.gif differ diff --git a/05/Shop/WebRoot/css/images/cp01_03.gif b/05/Shop/WebRoot/css/images/cp01_03.gif new file mode 100644 index 0000000..6845c48 Binary files /dev/null and b/05/Shop/WebRoot/css/images/cp01_03.gif differ diff --git a/05/Shop/WebRoot/css/images/cp_06.gif b/05/Shop/WebRoot/css/images/cp_06.gif new file mode 100644 index 0000000..34d346a Binary files /dev/null and b/05/Shop/WebRoot/css/images/cp_06.gif differ diff --git a/05/Shop/WebRoot/css/images/cp_11.gif b/05/Shop/WebRoot/css/images/cp_11.gif new file mode 100644 index 0000000..314696e Binary files /dev/null and b/05/Shop/WebRoot/css/images/cp_11.gif differ diff --git a/05/Shop/WebRoot/css/images/dl_03.gif b/05/Shop/WebRoot/css/images/dl_03.gif new file mode 100644 index 0000000..9ab4fcb Binary files /dev/null and b/05/Shop/WebRoot/css/images/dl_03.gif differ diff --git a/05/Shop/WebRoot/css/images/dl_06.gif b/05/Shop/WebRoot/css/images/dl_06.gif new file mode 100644 index 0000000..7a5e61a Binary files /dev/null and b/05/Shop/WebRoot/css/images/dl_06.gif differ diff --git a/05/Shop/WebRoot/css/images/dl_08.gif b/05/Shop/WebRoot/css/images/dl_08.gif new file mode 100644 index 0000000..1412ba0 Binary files /dev/null and b/05/Shop/WebRoot/css/images/dl_08.gif differ diff --git a/05/Shop/WebRoot/css/images/flower.gif b/05/Shop/WebRoot/css/images/flower.gif new file mode 100644 index 0000000..8f69953 Binary files /dev/null and b/05/Shop/WebRoot/css/images/flower.gif differ diff --git a/05/Shop/WebRoot/css/images/gm_06.gif b/05/Shop/WebRoot/css/images/gm_06.gif new file mode 100644 index 0000000..3e8fe61 Binary files /dev/null and b/05/Shop/WebRoot/css/images/gm_06.gif differ diff --git a/05/Shop/WebRoot/css/images/h_32.gif b/05/Shop/WebRoot/css/images/h_32.gif new file mode 100644 index 0000000..43088e8 Binary files /dev/null and b/05/Shop/WebRoot/css/images/h_32.gif differ diff --git a/05/Shop/WebRoot/css/images/ht_02_01.gif b/05/Shop/WebRoot/css/images/ht_02_01.gif new file mode 100644 index 0000000..c109bde Binary files /dev/null and b/05/Shop/WebRoot/css/images/ht_02_01.gif differ diff --git a/05/Shop/WebRoot/css/images/ht_02_02.gif b/05/Shop/WebRoot/css/images/ht_02_02.gif new file mode 100644 index 0000000..e3cd696 Binary files /dev/null and b/05/Shop/WebRoot/css/images/ht_02_02.gif differ diff --git a/05/Shop/WebRoot/css/images/ht_02_03.gif b/05/Shop/WebRoot/css/images/ht_02_03.gif new file mode 100644 index 0000000..068deee Binary files /dev/null and b/05/Shop/WebRoot/css/images/ht_02_03.gif differ diff --git a/05/Shop/WebRoot/css/images/ht_02_06.gif b/05/Shop/WebRoot/css/images/ht_02_06.gif new file mode 100644 index 0000000..92bfef2 Binary files /dev/null and b/05/Shop/WebRoot/css/images/ht_02_06.gif differ diff --git a/05/Shop/WebRoot/css/images/ht_02_10.gif b/05/Shop/WebRoot/css/images/ht_02_10.gif new file mode 100644 index 0000000..63e6a7b Binary files /dev/null and b/05/Shop/WebRoot/css/images/ht_02_10.gif differ diff --git a/05/Shop/WebRoot/css/images/ht_02_13.gif b/05/Shop/WebRoot/css/images/ht_02_13.gif new file mode 100644 index 0000000..cfbe57f Binary files /dev/null and b/05/Shop/WebRoot/css/images/ht_02_13.gif differ diff --git a/05/Shop/WebRoot/css/images/ht_02_15.gif b/05/Shop/WebRoot/css/images/ht_02_15.gif new file mode 100644 index 0000000..e388e91 Binary files /dev/null and b/05/Shop/WebRoot/css/images/ht_02_15.gif differ diff --git a/05/Shop/WebRoot/css/images/ht_02_18.gif b/05/Shop/WebRoot/css/images/ht_02_18.gif new file mode 100644 index 0000000..04d7f6a Binary files /dev/null and b/05/Shop/WebRoot/css/images/ht_02_18.gif differ diff --git a/05/Shop/WebRoot/css/images/ht_02_21.gif b/05/Shop/WebRoot/css/images/ht_02_21.gif new file mode 100644 index 0000000..4a1668b Binary files /dev/null and b/05/Shop/WebRoot/css/images/ht_02_21.gif differ diff --git a/05/Shop/WebRoot/css/images/index_03.gif b/05/Shop/WebRoot/css/images/index_03.gif new file mode 100644 index 0000000..24acb62 Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_03.gif differ diff --git a/05/Shop/WebRoot/css/images/index_06.gif b/05/Shop/WebRoot/css/images/index_06.gif new file mode 100644 index 0000000..cca5585 Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_06.gif differ diff --git a/05/Shop/WebRoot/css/images/index_09.gif b/05/Shop/WebRoot/css/images/index_09.gif new file mode 100644 index 0000000..ccb540c Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_09.gif differ diff --git a/05/Shop/WebRoot/css/images/index_12.gif b/05/Shop/WebRoot/css/images/index_12.gif new file mode 100644 index 0000000..edc23ee Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_12.gif differ diff --git a/05/Shop/WebRoot/css/images/index_13.gif b/05/Shop/WebRoot/css/images/index_13.gif new file mode 100644 index 0000000..faeec97 Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_13.gif differ diff --git a/05/Shop/WebRoot/css/images/index_14.gif b/05/Shop/WebRoot/css/images/index_14.gif new file mode 100644 index 0000000..0a646cb Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_14.gif differ diff --git a/05/Shop/WebRoot/css/images/index_15.gif b/05/Shop/WebRoot/css/images/index_15.gif new file mode 100644 index 0000000..9ee5c8b Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_15.gif differ diff --git a/05/Shop/WebRoot/css/images/index_16.gif b/05/Shop/WebRoot/css/images/index_16.gif new file mode 100644 index 0000000..42196b1 Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_16.gif differ diff --git a/05/Shop/WebRoot/css/images/index_17.gif b/05/Shop/WebRoot/css/images/index_17.gif new file mode 100644 index 0000000..71adc35 Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_17.gif differ diff --git a/05/Shop/WebRoot/css/images/index_19.gif b/05/Shop/WebRoot/css/images/index_19.gif new file mode 100644 index 0000000..5a2e7fe Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_19.gif differ diff --git a/05/Shop/WebRoot/css/images/index_23.gif b/05/Shop/WebRoot/css/images/index_23.gif new file mode 100644 index 0000000..ff3c7c8 Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_23.gif differ diff --git a/05/Shop/WebRoot/css/images/index_25.gif b/05/Shop/WebRoot/css/images/index_25.gif new file mode 100644 index 0000000..62b73db Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_25.gif differ diff --git a/05/Shop/WebRoot/css/images/index_26.gif b/05/Shop/WebRoot/css/images/index_26.gif new file mode 100644 index 0000000..ae4e0d0 Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_26.gif differ diff --git a/05/Shop/WebRoot/css/images/index_27.gif b/05/Shop/WebRoot/css/images/index_27.gif new file mode 100644 index 0000000..0908a15 Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_27.gif differ diff --git a/05/Shop/WebRoot/css/images/index_28.gif b/05/Shop/WebRoot/css/images/index_28.gif new file mode 100644 index 0000000..d2f2f5b Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_28.gif differ diff --git a/05/Shop/WebRoot/css/images/index_39.gif b/05/Shop/WebRoot/css/images/index_39.gif new file mode 100644 index 0000000..577fa04 Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_39.gif differ diff --git a/05/Shop/WebRoot/css/images/index_42.gif b/05/Shop/WebRoot/css/images/index_42.gif new file mode 100644 index 0000000..e199d32 Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_42.gif differ diff --git a/05/Shop/WebRoot/css/images/index_47.gif b/05/Shop/WebRoot/css/images/index_47.gif new file mode 100644 index 0000000..7b4d9e8 Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_47.gif differ diff --git a/05/Shop/WebRoot/css/images/index_49.gif b/05/Shop/WebRoot/css/images/index_49.gif new file mode 100644 index 0000000..1a7eb8f Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_49.gif differ diff --git a/05/Shop/WebRoot/css/images/index_51.gif b/05/Shop/WebRoot/css/images/index_51.gif new file mode 100644 index 0000000..a60414f Binary files /dev/null and b/05/Shop/WebRoot/css/images/index_51.gif differ diff --git a/05/Shop/WebRoot/css/images/load.gif b/05/Shop/WebRoot/css/images/load.gif new file mode 100644 index 0000000..f0019a8 Binary files /dev/null and b/05/Shop/WebRoot/css/images/load.gif differ diff --git a/05/Shop/WebRoot/css/images/rz_15.gif b/05/Shop/WebRoot/css/images/rz_15.gif new file mode 100644 index 0000000..682f70c Binary files /dev/null and b/05/Shop/WebRoot/css/images/rz_15.gif differ diff --git a/05/Shop/WebRoot/css/images/rz_17.gif b/05/Shop/WebRoot/css/images/rz_17.gif new file mode 100644 index 0000000..3255241 Binary files /dev/null and b/05/Shop/WebRoot/css/images/rz_17.gif differ diff --git a/05/Shop/WebRoot/css/images/tu_50.gif b/05/Shop/WebRoot/css/images/tu_50.gif new file mode 100644 index 0000000..36eb059 Binary files /dev/null and b/05/Shop/WebRoot/css/images/tu_50.gif differ diff --git a/05/Shop/WebRoot/css/images/zc_03.gif b/05/Shop/WebRoot/css/images/zc_03.gif new file mode 100644 index 0000000..d5fbae0 Binary files /dev/null and b/05/Shop/WebRoot/css/images/zc_03.gif differ diff --git a/05/Shop/WebRoot/css/images/zh01_03.gif b/05/Shop/WebRoot/css/images/zh01_03.gif new file mode 100644 index 0000000..fec1492 Binary files /dev/null and b/05/Shop/WebRoot/css/images/zh01_03.gif differ diff --git a/05/Shop/WebRoot/css/images/zh01_07.gif b/05/Shop/WebRoot/css/images/zh01_07.gif new file mode 100644 index 0000000..bb8b6ec Binary files /dev/null and b/05/Shop/WebRoot/css/images/zh01_07.gif differ diff --git a/05/Shop/WebRoot/css/images/zh03_03.gif b/05/Shop/WebRoot/css/images/zh03_03.gif new file mode 100644 index 0000000..4b2d2f7 Binary files /dev/null and b/05/Shop/WebRoot/css/images/zh03_03.gif differ diff --git a/05/Shop/WebRoot/css/images/zh03_07.gif b/05/Shop/WebRoot/css/images/zh03_07.gif new file mode 100644 index 0000000..051ea40 Binary files /dev/null and b/05/Shop/WebRoot/css/images/zh03_07.gif differ diff --git a/05/Shop/WebRoot/css/images/zh03_09.gif b/05/Shop/WebRoot/css/images/zh03_09.gif new file mode 100644 index 0000000..afc907f Binary files /dev/null and b/05/Shop/WebRoot/css/images/zh03_09.gif differ diff --git a/05/Shop/WebRoot/css/images/zh03_11.gif b/05/Shop/WebRoot/css/images/zh03_11.gif new file mode 100644 index 0000000..c3732ad Binary files /dev/null and b/05/Shop/WebRoot/css/images/zh03_11.gif differ diff --git a/05/Shop/WebRoot/css/images/zh_03.gif b/05/Shop/WebRoot/css/images/zh_03.gif new file mode 100644 index 0000000..0db592e Binary files /dev/null and b/05/Shop/WebRoot/css/images/zh_03.gif differ diff --git a/05/Shop/WebRoot/css/style_ht.css b/05/Shop/WebRoot/css/style_ht.css new file mode 100644 index 0000000..ce4be7d --- /dev/null +++ b/05/Shop/WebRoot/css/style_ht.css @@ -0,0 +1,153 @@ +* { + margin: 0px; + padding: 0px; + border: 0px; +} +#box { + height: auto; + width: 900px; + margin-right: auto; + margin-left: auto; + font-family: ""; + font-size: 12px; + color: #000000; +} +#top { + background-image: url(images/ht_02_01.gif); + background-repeat: no-repeat; + float: left; + height: 71px; + width: 900px; + margin-bottom: 5px; +} +#toptiao { + height: 40px; + width: 400px; + margin-top: 20px; + text-align: right; + margin-left: 470px; +} +#bottom { + background-image: url(images/ht_02_21.gif); + background-repeat: no-repeat; + height: 27px; + width: 900px; + float: left; + margin-top: 5px; +} +#mid { + float: left; + height: auto; + width: 900px; +} +#left { + float: left; + height: 500px; + width: 192px; + background-image: url(images/ht_02_15.gif); + background-repeat: repeat-y; +} +#right { + float: left; + height: 490px; + width: 698px; + margin-bottom: 5px; + margin-left: 5px; +} +#left_top { + float: left; + height: 43px; + width: 192px; + background-image: url(images/ht_02_03.gif); + background-repeat: no-repeat; +} + +#left_mid { + float: left; + height: 450px; + width: 179px; + margin-left: 6px; + border-bottom-width: 7px; + border-bottom-style: solid; + border-bottom-color: #5393db; +} +#right_top { + background-image: url(images/ht_02_06.gif); + background-repeat: no-repeat; + float: left; + height: 20px; + width: 700px; + padding-top: 9px; +} +#right_top01 { + background-image: url(images/ht_02_06.gif); + background-repeat: no-repeat; + float: left; + height: 29px; + width: 700px; + +} +#right_mid { + float: left; + height: auto; + width: 700px; +} +#tiao { + padding: 3px; + float: left; + height: 24px; + width: 692px; + border: 1px solid #c6e8ff; + margin-top: 5px; +} +#tiao input { + color: #666666; + border: 1px solid #CCCCCC; +} +.word01 { + font-family: ""; + font-size: 12px; + font-weight: bold; + color: #006699; +} +#right_foot { + height: 29px; + width: 700px; + text-align: center; + margin-top: 5px; + float: left; +} +#right_foot01 { + float: left; + height: 20px; + width: 688px; + border: 1px solid #5896dc; + margin-top: 5px; + background-color: #c6e8ff; + line-height: 20px; + text-align: right; + padding-right: 5px; + padding-left: 5px; +} +#boxdl { + height: 105px; + width: 232px; + margin-top: 180px; + margin-right: auto; + margin-left: auto; + background-image: url(images/bg_03.gif); + background-repeat: no-repeat; + padding-top: 147px; + padding-right: 47px; + padding-bottom: 53px; + padding-left: 224px; + font-family: ""; + font-size: 12px; + color: #000000; +} +#boxdl input { + font-family: ""; + font-size: 12px; + color: #0099CC; + border: 1px solid #CCCCCC; +} diff --git a/05/Shop/WebRoot/css/style_index.css b/05/Shop/WebRoot/css/style_index.css new file mode 100644 index 0000000..309974e --- /dev/null +++ b/05/Shop/WebRoot/css/style_index.css @@ -0,0 +1,383 @@ +* { + margin: 0px; + padding: 0px; + border: 0px; +} +#box { + height: auto; + width: 900px; + margin-right: auto; + margin-left: auto; + font-family: ""; + font-size: 12px; + color: #000000; + line-height: 18px; +} +#dark { + background-color: #f1f1f1; + height: 21px; + width: 870px; + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #d5d5d5; + text-align: right; + padding-right: 30px; + float: left; + padding-top: 2px; +} +.red { + font-family: ""; + font-size: 12px; + color: #FF0000; +} +#logo { + float: left; + height: 43px; + width: 604px; + padding-left: 296px; + padding-top: 25px; + padding-bottom: 25px; + background-image: url(images/index_06.gif); + background-repeat: no-repeat; + background-position: left; +} +#sou { + height: 30px; + width: 343px; + background-color: #f1f1f1; + padding-top: 6px; + padding-bottom: 6px; + padding-left: 6px; + float: left; +} +#sou input { + height: 28px; + border: 1px solid #e49800; + width: 343px; + font-family: ""; + font-size: 14px; + color: #CC9900; +} +#sou_zi { + width: 78px; + background-color: #f1f1f1; + float: left; + height: 30px; + padding-top: 6px; + padding-bottom: 6px; +} +#sou_zi01 { + width: 100px; + float: left; + height: 40px; + margin-left: 20px; + padding-top: 2px; +} +#menu { + background-image: url(images/index_17.gif); + background-repeat: repeat-x; + float: left; + height: 33px; + width: 900px; +} +#z300 { + margin-left: 200px; +} +#foot { + background-image: url(images/index_51.gif); + background-repeat: no-repeat; + float: left; + height: 195px; + width: 900px; +} +#mid { + float: left; + height: auto; + width: 900px; +} +#left { + float: left; + height: auto; + width: 678px; + margin-top: 5px; + margin-bottom: 5px; +} +#right_sp { + float: left; + height: 767px; + width: 676px; + margin-top: 5px; + margin-bottom: 5px; + margin-left: 5px; + border: 1px solid #999999; +} +#right { + float: left; + height: auto; + width: 206px; + margin-top: 5px; + margin-left: 5px; +} +#right01 { + float: left; + height: auto; + width: 206px; + margin-top: 5px; + +} +#left_s01 { + float: left; + height: 245px; + width: 182px; +} +#left_s02 { + float: left; + height: 245px; + width: 494px; +} +#left_x { + float: left; + height: auto; + width: 678px; +} +.imgx5 { + margin-bottom: 5px; +} +.imgz5 { + margin-left: 5px; +} +#left122 { + float: left; + height: 115px; + width: 676px; + border: 1px solid #666666; + background-color: #f5e8ba; + margin-top: 5px; +} +#left122_z { + width: 28px; + float: left; + height: 80px; + padding-top: 35px; + padding-left: 10px; +} +.word14 { + font-family: ""; + font-size: 14px; + font-weight: bold; + color: #7c6000; +} +#left122_y { + float: left; + width: 631px; + height: 103px; + margin-top: 5px; + margin-bottom: 5px; + border: 1px solid #999999; + background-color: #FFFFFF; +} +#rqpgb { + height: 133px; + width: 194px; + border: 1px solid #999999; + padding: 5px; + float: left; +} +#xpss { + height: auto; + width: 194px; + border: 1px solid #999999; + padding: 5px; + float: left; + margin-top: 5px; +} +#rxsp { + height: auto; + width: 194px; + border: 1px solid #999999; + padding: 5px; + float: left; + margin-top: 5px; +} +#sckf { + height: 244px; + width: 194px; + border: 1px solid #999999; + padding: 5px; + float: left; + margin-top: 5px; + margin-bottom:5px; + background-image: url(images/tu_50.gif); + background-repeat: no-repeat; +} +.bian { + border: 1px solid #999999; + font-family: ""; + font-size: 12px; + color: #000000; +} +#zitiao { + float: left; + height: 31px; + width: 676px; +} +#xshangpin { + float: left; + height: 110px; + width: 654px; + margin-top: 10px; + padding-bottom: 5px; + margin-left: 10px; + border-bottom-width: 1px; + border-bottom-style: dashed; + border-bottom-color: #999999; +} +#dshangpin { + float: left; + height: 258px; + width: 654px; + margin-top: 10px; + padding-bottom: 5px; + margin-left: 10px; + +} +#shuoming { + float: left; + height: 450px; + width: 654px; + margin-top: 10px; + margin-left: 10px; +} +#denglu { + height: 94px; + width: 211px; + margin-top: 30px; + margin-right: auto; + margin-left: auto; + margin-bottom: 120px; + background-image: url(images/dl_03.gif); + background-repeat: no-repeat; + padding-right: 34px; + padding-left: 108px; + padding-top: 66px; + padding-bottom: 26px; +} +#zhuce { + height: 370px; + width: 485px; + margin-top: 30px; + margin-right: auto; + margin-left: auto; + margin-bottom: 30px; + background-image: url(images/zc_03.gif); + background-repeat: no-repeat; + background-color: #ffffe1; + background-position: top; + border: 1px solid #999999; + padding-top: 110px; + padding-right: 10px; + padding-bottom: 10px; + padding-left: 10px; +} +#wdzh_left { + float: left; + height: 415px; + width: 193px; + border: 1px solid #999999; + background-image: url(images/zh_03.gif); + background-repeat: no-repeat; + background-position: top; + margin: 5px; + padding-top: 55px; + background-color: #e7f3c3; +} +#left_list { + background-image: url(images/zh01_07.gif); + background-repeat: no-repeat; + background-position: center; + float: left; + height: 31px; + width: 150px; + margin-bottom: 5px; + margin-left: 4px; + padding-left: 34px; + line-height: 31px; +} +#wdzh_right { + float: left; + height: 470px; + width: 688px; + margin-top: 5px; + border: 1px solid #999999; +} +#right_tiao { + float: left; + height: 40px; + width: 688px; + border-bottom-width: 2px; + border-bottom-style: dashed; + border-bottom-color: #728800; + font-family: ""; + font-size: 14px; + line-height: 40px; + font-weight: bold; + color: #728800; + margin-bottom: 10px; +} +#biaodan { + float: left; + height: auto; + width: 688px; +} +#biaodan01,#biaodan02,#biaodan03,#biaodan04 { + float: left; + height: auto; + width: 688px; + margin-bottom: 10px; + border-bottom-width: 1px; + border-bottom-style: dashed; + border-bottom-color: #999999; +} +#biaodan05 { + float: left; + height: auto; + width: 688px; + margin-bottom: 10px; + +} + +.green { + font-family: ""; + font-size: 12px; + font-weight: bold; + color: #728800; +} + +.yellow { + font-family: ""; + font-size: 12px; + font-weight: bold; + color: #746a00; +} +#xiaotiao { + float: left; + height: 60px; + width: 688px; + margin-top: 10px; + border-bottom-width: 1px; + border-bottom-style: dashed; + border-bottom-color: #999999; +} +#bd_xt { + font-family: ""; + font-size: 12px; + font-weight: bold; + color: #000000; + height: 22px; + width: 678px; + border-bottom-width: 3px; + border-bottom-style: solid; + border-bottom-color: #99CC00; + line-height: 22px; + padding-left: 10px; +} diff --git a/05/Shop/WebRoot/database/db_database05.sql b/05/Shop/WebRoot/database/db_database05.sql new file mode 100644 index 0000000..b8337a0 --- /dev/null +++ b/05/Shop/WebRoot/database/db_database05.sql @@ -0,0 +1,579 @@ +-- MySQL Administrator dump 1.4 +-- +-- ------------------------------------------------------ +-- Server version 5.1.40-community + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + + +-- +-- Create schema db_database24 +-- + +CREATE DATABASE IF NOT EXISTS db_database24; +USE db_database24; + +-- +-- Definition of table `tb_customer` +-- + +DROP TABLE IF EXISTS `tb_customer`; +CREATE TABLE `tb_customer` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(50) NOT NULL, + `password` varchar(50) NOT NULL, + `realname` varchar(20) DEFAULT NULL, + `address` varchar(200) DEFAULT NULL, + `email` varchar(50) DEFAULT NULL, + `mobile` varchar(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_customer` +-- + +/*!40000 ALTER TABLE `tb_customer` DISABLE KEYS */; +INSERT INTO `tb_customer` (`id`,`username`,`password`,`realname`,`address`,`email`,`mobile`) VALUES + (1,'mrsoft','mrsoft',NULL,'吉林省长春市二道区xxx号xxx小区xxx门','mrsoft@mrsoft.com','139xxxx8888'); +/*!40000 ALTER TABLE `tb_customer` ENABLE KEYS */; + + +-- +-- Definition of table `tb_order` +-- + +DROP TABLE IF EXISTS `tb_order`; +CREATE TABLE `tb_order` ( + `orderId` varchar(30) NOT NULL, + `name` varchar(50) NOT NULL, + `address` varchar(200) NOT NULL, + `mobile` varchar(11) NOT NULL, + `totalPrice` float DEFAULT NULL, + `createTime` datetime DEFAULT NULL, + `paymentWay` varchar(15) DEFAULT NULL, + `orderState` varchar(10) DEFAULT NULL, + `customerId` int(11) DEFAULT NULL, + PRIMARY KEY (`orderId`), + KEY `FKFA98EE3DD0EDC05E` (`customerId`), + CONSTRAINT `FKFA98EE3DD0EDC05E` FOREIGN KEY (`customerId`) REFERENCES `tb_customer` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_order` +-- + +/*!40000 ALTER TABLE `tb_order` DISABLE KEYS */; +INSERT INTO `tb_order` (`orderId`,`name`,`address`,`mobile`,`totalPrice`,`createTime`,`paymentWay`,`orderState`,`customerId`) VALUES + ('201004201352400389678','mrsoft','吉林省长春市二道区xxx号xxx小区xxx门','139xxxx8888',120,'2010-04-20 13:52:40','POSTOFFICE_PAY','DELIVERED',1), + ('201004220944580771720','mrsoft','吉林省长春市二道区xxx号xxx小区xxx门','139xxxx8888',120,'2010-04-22 09:44:58','POSTOFFICE_PAY','DELIVERED',1), + ('201004220957520484473','mrsoft','吉林省长春市二道区xxx号xxx小区xxx门','139xxxx8888',0,'2010-04-22 09:57:52','POSTOFFICE_PAY','DELIVERED',1); +/*!40000 ALTER TABLE `tb_order` ENABLE KEYS */; + + +-- +-- Definition of table `tb_orderitem` +-- + +DROP TABLE IF EXISTS `tb_orderitem`; +CREATE TABLE `tb_orderitem` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `productId` int(11) NOT NULL, + `productName` varchar(200) NOT NULL, + `productPrice` float NOT NULL, + `amount` int(11) DEFAULT NULL, + `orderId` varchar(30) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FKBF076F042FE3E9B` (`orderId`), + CONSTRAINT `FKBF076F042FE3E9B` FOREIGN KEY (`orderId`) REFERENCES `tb_order` (`orderId`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_orderitem` +-- + +/*!40000 ALTER TABLE `tb_orderitem` DISABLE KEYS */; +INSERT INTO `tb_orderitem` (`id`,`productId`,`productName`,`productPrice`,`amount`,`orderId`) VALUES + (1,1,'Java 编程词典',120,1,NULL), + (2,1,'Java 编程词典',120,1,NULL); +/*!40000 ALTER TABLE `tb_orderitem` ENABLE KEYS */; + + +-- +-- Definition of table `tb_productcategory` +-- + +DROP TABLE IF EXISTS `tb_productcategory`; +CREATE TABLE `tb_productcategory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `level` int(11) DEFAULT NULL, + `pid` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FKB405573CFB37BC9D` (`pid`), + CONSTRAINT `FKB405573CFB37BC9D` FOREIGN KEY (`pid`) REFERENCES `tb_productcategory` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=350 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_productcategory` +-- + +/*!40000 ALTER TABLE `tb_productcategory` DISABLE KEYS */; +INSERT INTO `tb_productcategory` (`id`,`name`,`level`,`pid`) VALUES + (1,'服装',1,NULL), + (2,'品质男装',2,1), + (3,'衬衫',3,2), + (4,'男鞋',3,2), + (5,'男裤',3,2), + (6,'西服',3,2), + (7,'女鞋',2,1), + (8,'帆布',3,7), + (9,'高帮',3,7), + (10,'单鞋',3,7), + (11,'凉鞋',3,7), + (12,'鱼嘴',3,7), + (13,'内衣',2,1), + (14,'睡衣',3,13), + (15,'男内裤',3,13), + (16,'文胸',3,13), + (17,'袜',3,13), + (18,'内裤',3,13), + (19,'运动服',2,1), + (20,'夹克',3,19), + (21,'卫衣',3,19), + (22,'裤',3,19), + (23,'棉衣',3,19), + (24,'T恤',3,19), + (25,'童装',2,1), + (26,'鞋',3,25), + (27,'裤',3,25), + (28,'套装',3,25), + (29,'T恤',3,25), + (30,'孕妇装',3,25), + (31,'连衣裙',2,1), + (32,'裤',3,31), + (33,'半裙',3,31), + (34,'雪纺裙',3,31), + (35,'蕾丝裙',3,31), + (36,'运动鞋',2,1), + (37,'Nike',3,36), + (38,'李宁',3,36), + (39,'Adidas',3,36), + (40,'匡威',3,36), + (41,'休闲男装',2,1), + (42,'牛仔',3,41), + (43,'T恤',3,41), + (44,'夹克',3,41), + (45,'卫衣',3,41), + (46,'女装',2,1), + (47,'针织衫',3,46), + (48,'T恤',3,46), + (49,'短外套',3,46), + (50,'衬衫',3,46), + (51,'配饰',1,NULL), + (52,'眼镜',2,51), + (53,'烟具',3,52), + (54,'眼镜架',3,52), + (55,'太阳镜',3,52), + (56,'Zippo',3,52), + (57,'手表',2,51), + (58,'天梭',3,57), + (59,'Casio',3,57), + (60,'欧米茄',3,57), + (61,'浪琴',3,57), + (62,'服饰配件',2,51), + (63,'皮带',3,62), + (64,'颈环',3,62), + (65,'帽子',3,62), + (66,'围巾',3,62), + (67,'饰品',2,51), + (68,'戒指',3,67), + (69,'手链',3,67), + (70,'项链',3,67), + (71,'耳饰',3,67), + (72,'发饰',3,67), + (73,'珠宝',2,51), + (74,'翡翠',3,73), + (75,'婚钻',3,73), + (76,'千足金',3,73), + (77,'施华洛',3,73), + (78,'男女箱包',2,51), + (79,'男包',3,78), + (80,'肩包',3,78), + (81,'旅行',3,78), + (82,'钱包',3,78), + (83,'家居',1,NULL), + (84,'日用超市',2,83), + (85,'收纳',3,84), + (86,'伞',3,84), + (87,'礼品',3,84), + (88,'钟表',3,84), + (89,'家饰',2,83), + (90,'窗帘',3,89), + (91,'十字绣',3,89), + (92,'照片墙',3,89), + (93,'地毯',3,89), + (94,'家纺',2,83), + (95,'四件套',3,94), + (96,'靠垫',3,94), + (97,'蚊帐',3,94), + (98,'蚕丝被',3,94), + (99,'日化',2,83), + (100,'洗发',3,99), + (101,'香薰',3,99), + (102,'沐浴',3,99), + (103,'卫生巾',3,99), + (104,'家具',2,83), + (105,'床',3,104), + (106,'柜子',3,104), + (107,'茶几',3,104), + (108,'沙发',3,104), + (109,'宜家',3,104), + (110,'厨房',2,83), + (111,'茶具',3,110), + (112,'健康筷子',3,110), + (113,'餐具',3,110), + (114,'锅具',3,110), + (115,'杯',3,110), + (116,'装潢建材',2,83), + (117,'灯饰',3,116), + (118,'浴霸',3,116), + (119,'卫浴',3,116), + (120,'地板',3,116), + (121,'洁具',2,83), + (122,'晒衣',3,121), + (123,'拖把',3,121), + (124,'牙刷',3,121), + (125,'擦地拖',3,121), + (126,'母婴',1,NULL), + (127,'奶粉',2,126), + (128,'辅食',3,127), + (129,'营养',3,127), + (130,'妈妈保健',3,127), + (131,'益智',2,126), + (132,'家具',3,131), + (133,'户外',3,131), + (134,'早教',3,131), + (135,'推车',3,131), + (136,'车',3,131), + (137,'用品',2,126), + (138,'湿巾',3,137), + (139,'喂哺',3,137), + (140,'洗护',3,137), + (141,'睡袋',3,137), + (142,'尿片',3,137), + (143,'食品',1,NULL), + (144,'保健',2,143), + (145,'燕窝',3,144), + (146,'螺旋藻',3,144), + (147,'安利',3,144), + (148,'蜂蜜',3,144), + (149,'零食',2,143), + (150,'牛肉干',3,149), + (151,'春茶',3,149), + (152,'枣类',3,149), + (153,'巧克力',3,149), + (154,'民生',2,143), + (155,'水果',3,154), + (156,'私房菜',3,154), + (157,'膳食',3,154), + (158,'干货',3,154), + (159,'美容',1,NULL), + (160,'护肤',2,159), + (161,'精华',3,160), + (162,'面膜',3,160), + (163,'精油',3,160), + (164,'爽肤水',3,160), + (165,'彩妆',2,159), + (166,'粉饼',3,165), + (167,'腮红',3,165), + (168,'粉底',3,165), + (169,'眼影',3,165), + (170,'香水',3,165), + (171,'国货',2,159), + (172,'芳草集',3,171), + (173,'牛尔',3,171), + (174,'相宜',3,171), + (175,'佰草集',3,171), + (176,'数码',1,NULL), + (177,'配件',2,176), + (178,'摄像头',3,177), + (179,'3G上网',3,177), + (180,'USB',3,177), + (181,'蓝牙',3,177), + (182,'大家电',2,176), + (183,'空调',3,182), + (184,'液晶',3,182), + (185,'油烟机',3,182), + (186,'冰箱',3,182), + (187,'办公',2,176), + (188,'辞典',3,187), + (189,'投影',3,187), + (190,'打印',3,187), + (191,'墨盒',3,187), + (192,'手机',2,176), + (193,'三星',3,192), + (194,'索爱',3,192), + (195,'Nokia',3,192), + (196,'Dopod',3,192), + (197,'电脑',2,176), + (198,'整机',3,197), + (199,'硬件',3,197), + (200,'周边',3,197), + (201,'LCD',3,197), + (202,'网络',3,197), + (203,'小家电',2,176), + (204,'风扇',3,203), + (205,'榨汁',3,203), + (206,'耳机',3,203), + (207,'加湿',3,203), + (208,'笔记本',2,176), + (209,'苹果',3,208), + (210,'联想',3,208), + (211,'上网本',3,208), + (212,'IBM',3,208), + (213,'相机',2,176), + (214,'富士',3,213), + (215,'索尼',3,213), + (216,'摄像机',3,213), + (217,'单反',3,213), + (218,'国货手机',2,176), + (219,'智能',3,218), + (220,'双卡双待',3,218), + (221,'炒股',3,218), + (222,'个人护理',2,176), + (223,'按摩',3,222), + (224,'剃须刀',3,222), + (225,'足浴器',3,222), + (226,'电玩',2,176), + (227,'U盘',3,226), + (228,'移动硬盘',3,226), + (229,'内存卡',3,226), + (230,'PSP',3,226), + (231,'MP4',2,176), + (232,'索尼',3,231), + (233,'iPod',3,231), + (234,'艾诺',3,231), + (235,'蓝魔',3,231), + (236,'文体',1,NULL), + (237,'宠物',2,236), + (238,'鱼',3,237), + (239,'零食',3,237), + (240,'服饰',3,237), + (241,'猫粮',3,237), + (242,'狗粮',3,237), + (243,'音像',2,236), + (244,'胎教',3,243), + (245,'吉他',3,243), + (246,'电影',3,243), + (247,'唱片',3,243), + (248,'电视',3,243), + (249,'书籍',2,236), + (250,'外语',3,249), + (251,'养生',3,249), + (252,'小说',3,249), + (253,'育儿',3,249), + (254,'考试',3,249), + (255,'文具',2,236), + (256,'书包',3,255), + (257,'日韩',3,255), + (258,'本册',3,255), + (259,'台历',3,255), + (260,'笔',3,255), + (261,'收藏',2,236), + (262,'邮品',3,261), + (263,'古玩街',3,261), + (264,'和田玉',3,261), + (265,'钱币',3,261), + (266,'汽车',2,236), + (267,'坐垫',3,266), + (268,'GPS',3,266), + (269,'外饰',3,266), + (270,'保养',3,266), + (271,'美容',3,266), + (272,'运动',2,236), + (273,'羽拍',3,272), + (274,'游泳',3,272), + (275,'瑜伽',3,272), + (276,'舞',3,272), + (277,'器械',3,272), + (278,'玩具',2,236), + (279,'机器人',3,278), + (280,'毛绒',3,278), + (281,'模型',3,278), + (282,'娃娃',3,278), + (283,'户外',2,236), + (284,'垂钓',3,283), + (285,'登山鞋',3,283), + (286,'背包',3,283), + (287,'冲锋衣',3,283), + (288,'虚拟',1,NULL), + (289,'机票',2,288), + (290,'特色客栈',3,289), + (291,'酒店',3,289), + (292,'旅游',3,289), + (293,'门票',3,289), + (294,'IP卡',2,288), + (295,'网络电话',3,294), + (296,'skype',3,294), + (297,'手机号码',3,294), + (298,'充值卡',2,288), + (299,'电信',3,298), + (300,'联通',3,298), + (301,'移动',3,298), + (302,'网游',2,288), + (303,'永恒之塔',3,302), + (304,'问道',3,302), + (305,'DNF',3,302), + (306,'诛仙2',3,302), + (307,'点卡',2,288), + (308,'蜀门',3,307), + (309,'QQ',3,307), + (310,'魔兽',3,307), + (311,'完美国际',3,307), + (312,'彩票',2,288), + (313,'大乐透',3,312), + (314,'排三',3,312), + (315,'足彩',3,312), + (316,'双色球',3,312), + (317,'服务',1,NULL), + (318,'吃喝玩乐',2,317), + (319,'同城活动',3,318), + (320,'省钱',3,318), + (321,'外卖',3,318), + (322,'保姆',2,317), + (323,'婚嫁',3,322), + (324,'装修',3,322), + (325,'培训班',3,322), + (326,'招工',3,322), + (327,'网络服务',2,317), + (328,'网店装修',3,327), + (329,'物流',3,327), + (330,'软件',3,327), + (331,'房产',2,317), + (332,'租房',3,331), + (333,'急售',3,331), + (334,'合租',3,331), + (335,'二手房',3,331), + (336,'创意站',2,317), + (337,'礼物',3,336), + (338,'定制',3,336), + (339,'品牌设计',3,336), + (340,'折扣券',2,317), + (341,'超市卡',3,340), + (342,'蛋糕券',3,340), + (343,'电影票',3,340), + (344,'生活',2,317), + (345,'摄影',3,344), + (346,'益智',3,344), + (347,'鲜花',3,344), + (348,'翻译',3,344), + (349,'园艺',3,344); +/*!40000 ALTER TABLE `tb_productcategory` ENABLE KEYS */; + + +-- +-- Definition of table `tb_productinfo` +-- + +DROP TABLE IF EXISTS `tb_productinfo`; +CREATE TABLE `tb_productinfo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` text, + `createTime` datetime DEFAULT NULL, + `baseprice` float DEFAULT NULL, + `marketprice` float DEFAULT NULL, + `sellprice` float DEFAULT NULL, + `sexrequest` varchar(5) DEFAULT NULL, + `commend` bit(1) DEFAULT NULL, + `clickcount` int(11) DEFAULT NULL, + `sellCount` int(11) DEFAULT NULL, + `categoryId` int(11) DEFAULT NULL, + `uploadFile` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uploadFile` (`uploadFile`), + KEY `FK28A6CDEC487D8DAB` (`categoryId`), + KEY `FK28A6CDEC3E1DFEF5` (`uploadFile`), + CONSTRAINT `FK28A6CDEC3E1DFEF5` FOREIGN KEY (`uploadFile`) REFERENCES `tb_uploadfile` (`id`), + CONSTRAINT `FK28A6CDEC487D8DAB` FOREIGN KEY (`categoryId`) REFERENCES `tb_productcategory` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_productinfo` +-- + +/*!40000 ALTER TABLE `tb_productinfo` DISABLE KEYS */; +INSERT INTO `tb_productinfo` (`id`,`name`,`description`,`createTime`,`baseprice`,`marketprice`,`sellprice`,`sexrequest`,`commend`,`clickcount`,`sellCount`,`categoryId`,`uploadFile`) VALUES + (1,'Java 编程词典','JAVA编程词典 全能版 u 初学者快速入门(入门模式):\r\n\r\nJava编程入门技能学习与训练(29课,乐趣学习模式)及该部分内容全程技术支持。\r\n\r\nu 视频讲堂(视频中心):19小时入门学习录像,18小时项目开发录像 \r\n\r\nu 典型实例(实例中心):408个典型实例\r\n\r\nu 实用项目(项目中心):10个实用项目\r\n\r\n','2010-04-20 13:40:25',98,150,120,'BOY',0x01,17369,2,330,1), + (2,'C# 编程词典','C#编程词典 全能版 u 初学者快速入门:\r\n\r\nC#编程入门技能学习与训练(28课,乐趣学习模式)及该部分内容全程技术支持。\r\n\r\nu 视频讲堂(视频中心):14小时入门学习录像,16小时项目开发录像\r\n\r\nu 典型实例(实例中心):134个典型实例,C#程序开发范例参考\r\n\r\nu 实用项目(项目中心):10个行业项目\r\n\r\n','2010-04-20 13:42:26',98,150,120,'BOY',0x01,12239,0,330,2), + (3,'.NET编程词典','ASP.NET编程词典 企业版 u 初学者快速入门:\r\n\r\nAsp.net编程技能入门学习与训练(20课,乐趣学习模式)及该部分内容全程技术支持\r\n\r\nAsp.net编程技能拓展学习专题训练(20课,实践学习模式)及该部分内容全程技术支持(升级)\r\n\r\nAsp.net编程技能专题训练(12课,专题开发模式)及该部分内容全程技术支持(升级)\r\n\r\nu 视频讲堂(视频中心):73小时录像(入门学习,典型模块、范例、项目)\r\n\r\nu 开发技术全解:Asp.net核心技术参考、Asp.net数据库开发参考、网络编程、从基础到项目实战、\r\n\r\n全能速查手册、网络编程标准教程\r\n\r\nu 典型实例应用:程序开发范例(1版+2版新增):473个典型实例; 范例:126个范例\r\n\r\nu 系统开发方案:128个系统开发方案\r\n\r\nu 实用项目:34个项目,27个典型模块\r\n\r\n','2010-04-20 14:05:07',98,150,120,'BOY',0x01,1247,0,330,3), + (4,'VB 编程词典','Visual Basic 编程词典 企业版 u 两种数据库:所有项目均提供二种数据库实现方法(SQL Access \r\nu 初学者快速入门:\r\n\r\nVisual Basic编程技能入门学习与训练(25课,乐趣学习模式)及该部分内容全程技术支持\r\n\r\nVisual Basic编程技能拓展学习专题训练(20课,实践学习模式)及该部分内容全程技术支持(升级)\r\n\r\nVisual Basic编程技能专题训练(12课,专题开发模式)及该部分内容全程技术支持(升级)\r\n\r\nu 视频讲堂(视频中心):110.5小时录像(从零起步学习、程序设计入门、开发应用实战、范例全程、项目开发、打包发行)\r\n\r\nu 开发技术全解:Visual Basic函数开发参考、Visual Basic语句开发参考、控件开发参考、程序设计入门参考、程序设计进阶参考、数据库开发参考、数据库开发实例参考、应用开发参考、程序开发实战参考、核心开发参考、VB2005入门参考\r\n\r\nu 典型实例应用:827个典型实例+104个关键技术+1266个经验技巧\r\n\r\nu 系统开发方案:305个系统开发方案\r\n\r\n','2010-04-20 14:02:33',98,150,120,'BOY',0x01,12366,0,330,4), + (5,'VC++编程词典','Visual c++编程词典 企业版 u 初学者快速入门:\r\n\r\nVisual C++编程技能入门学习与训练(24课,乐趣学习模式)及该部分内容全程技术支持\r\n\r\nVisual C++编程技能拓展学习专题训练(20课,实践学习模式)及该部分内容全程技术支持(升级)\r\n\r\nVisual C++编程技能专题训练(12课,专题开发模式)及该部分内容全程技术支持(升级)\r\n\r\nu 编程视频讲堂:****小时\r\n\r\nu 开发技术全解:Visual C++编程速成指南(一),Visual C++核心技术参考\r\n\r\nVisual C++编程速成指南(二), Visual C++程序开发技术\r\n\r\n','2010-04-20 14:04:41',98,150,120,'BOY',0x01,4563,0,330,5); +/*!40000 ALTER TABLE `tb_productinfo` ENABLE KEYS */; + + +-- +-- Definition of table `tb_uploadfile` +-- + +DROP TABLE IF EXISTS `tb_uploadfile`; +CREATE TABLE `tb_uploadfile` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `path` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_uploadfile` +-- + +/*!40000 ALTER TABLE `tb_uploadfile` DISABLE KEYS */; +INSERT INTO `tb_uploadfile` (`id`,`path`) VALUES + (1,'201004201340260341.jpg'), + (2,'201004201342270110.jpg'), + (3,'201004201359330922.jpg'), + (4,'201004201400560420.jpg'), + (5,'201004201401400092.jpg'); +/*!40000 ALTER TABLE `tb_uploadfile` ENABLE KEYS */; + + +-- +-- Definition of table `tb_user` +-- + +DROP TABLE IF EXISTS `tb_user`; +CREATE TABLE `tb_user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(50) NOT NULL, + `password` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_user` +-- + +/*!40000 ALTER TABLE `tb_user` DISABLE KEYS */; +INSERT INTO `tb_user` (`id`,`username`,`password`) VALUES + (1,'admin','admin'); +/*!40000 ALTER TABLE `tb_user` ENABLE KEYS */; + + + + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/05/Shop/WebRoot/index.jsp b/05/Shop/WebRoot/index.jsp new file mode 100644 index 0000000..4172609 --- /dev/null +++ b/05/Shop/WebRoot/index.jsp @@ -0,0 +1,15 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + +
    +
    +

    页面加载中......

    +
    + + \ No newline at end of file diff --git a/05/Shop/WebRoot/js/jquery.js b/05/Shop/WebRoot/js/jquery.js new file mode 100644 index 0000000..94e9c17 --- /dev/null +++ b/05/Shop/WebRoot/js/jquery.js @@ -0,0 +1,4241 @@ +/*! + * jQuery JavaScript Library v1.3.1 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-01-21 20:42:16 -0500 (Wed, 21 Jan 2009) + * Revision: 6158 + */ +(function(){ + +var + // Will speed up references to window, and allows munging its name. + window = this, + // Will speed up references to undefined, and allows munging its name. + undefined, + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + // Map over the $ in case of overwrite + _$ = window.$, + + jQuery = window.jQuery = window.$ = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); + }, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, + // Is it a simple selector + isSimple = /^.[^:#\[\.,]*$/; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + this.context = selector; + return this; + } + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem && elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + var ret = jQuery( elem || [] ); + ret.context = document; + ret.selector = selector; + return ret; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return jQuery( document ).ready( selector ); + + // Make sure that old selector state is passed along + if ( selector.selector && selector.context ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return this.setArray(jQuery.makeArray(selector)); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.3.1", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num === undefined ? + + // Return a 'clean' array + jQuery.makeArray( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) + ret.selector = this.selector + (this.selector ? " " : "") + selector; + else if ( name ) + ret.selector = this.selector + "." + name + "(" + selector + ")"; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem && elem.jquery ? elem[0] : elem + , this ); + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( typeof name === "string" ) + if ( value === undefined ) + return this[0] && jQuery[ type || "attr" ]( this[0], name ); + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text !== "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).clone(); + + if ( this[0].parentNode ) + wrap.insertBefore( this[0] ); + + wrap.map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }).append(this); + } + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + // For internal use only. + // Behaves like an Array's .push method, not like a jQuery method. + push: [].push, + + find: function( selector ) { + if ( this.length === 1 && !/,/.test(selector) ) { + var ret = this.pushStack( [], "find", selector ); + ret.length = 0; + jQuery.find( selector, this[0], ret ); + return ret; + } else { + var elems = jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + }); + + return this.pushStack( /[^+>] [^+>]/.test( selector ) ? + jQuery.unique( elems ) : + elems, "find", selector ); + } + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var clone = this.cloneNode(true), + container = document.createElement("div"); + container.appendChild(clone); + return jQuery.clean([container.innerHTML])[0]; + } else + return this.cloneNode(true); + }); + + // Need to set the expando to null on the cloned set if it exists + // removeData doesn't work here, IE removes it from the original as well + // this is primarily for IE but the data expando shouldn't be copied over in any browser + var clone = ret.find("*").andSelf().each(function(){ + if ( this[ expando ] !== undefined ) + this[ expando ] = null; + }); + + // Copy the events from the original to the clone + if ( events === true ) + this.find("*").andSelf().each(function(i){ + if (this.nodeType == 3) + return; + var events = jQuery.data( this, "events" ); + + for ( var type in events ) + for ( var handler in events[ type ] ) + jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); + }); + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ + return elem.nodeType === 1; + }) ), "filter", selector ); + }, + + closest: function( selector ) { + var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null; + + return this.map(function(){ + var cur = this; + while ( cur && cur.ownerDocument ) { + if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) + return cur; + cur = cur.parentNode; + } + }); + }, + + not: function( selector ) { + if ( typeof selector === "string" ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return this.pushStack( jQuery.unique( jQuery.merge( + this.get(), + typeof selector === "string" ? + jQuery( selector ) : + jQuery.makeArray( selector ) + ))); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return !!selector && this.is( "." + selector ); + }, + + val: function( value ) { + if ( value === undefined ) { + var elem = this[0]; + + if ( elem ) { + if( jQuery.nodeName( elem, 'option' ) ) + return (elem.attributes.value || {}).specified ? elem.value : elem.text; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + } + + // Everything else, we just grab the value + return (elem.value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + if ( typeof value === "number" ) + value += ''; + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(value); + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value === undefined ? + (this[0] ? + this[0].innerHTML : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, +i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ), + "slice", Array.prototype.slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + domManip: function( args, table, callback ) { + if ( this[0] ) { + var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), + scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), + first = fragment.firstChild, + extra = this.length > 1 ? fragment.cloneNode(true) : fragment; + + if ( first ) + for ( var i = 0, l = this.length; i < l; i++ ) + callback.call( root(this[i], first), i > 0 ? extra.cloneNode(true) : fragment ); + + if ( scripts ) + jQuery.each( scripts, evalScript ); + } + + return this; + + function root( elem, cur ) { + return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? + (elem.getElementsByTagName("tbody")[0] || + elem.appendChild(elem.ownerDocument.createElement("tbody"))) : + elem; + } + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy === "object" && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, + // Never move original objects, clone them + src || ( copy.length != null ? [ ] : { } ) + , copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +// exclude the following css properties to add px +var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + // cache defaultView + defaultView = document.defaultView || {}, + toString = Object.prototype.toString; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return toString.call(obj) === "[object Function]"; + }, + + isArray: function( obj ) { + return toString.call(obj) === "[object Array]"; + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || + !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + data = jQuery.trim( data ); + + if ( data ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.support.scriptEval ) + script.appendChild( document.createTextNode( data ) ); + else + script.text = data; + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, length = object.length; + + if ( args ) { + if ( length === undefined ) { + for ( name in object ) + if ( callback.apply( object[ name ], args ) === false ) + break; + } else + for ( ; i < length; ) + if ( callback.apply( object[ i++ ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( length === undefined ) { + for ( name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames !== undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use hasClass("class") + has: function( elem, className ) { + return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + var padding = 0, border = 0; + jQuery.each( which, function() { + padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + val -= Math.round(padding + border); + } + + if ( jQuery(elem).is(":visible") ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, val); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style; + + // We need to handle opacity special in IE + if ( name == "opacity" && !jQuery.support.opacity ) { + ret = jQuery.attr( style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && style && style[ name ] ) + ret = style[ name ]; + + else if ( defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var computedStyle = defaultView.getComputedStyle( elem, null ); + + if ( computedStyle ) + ret = computedStyle.getPropertyValue( name ); + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var left = style.left, rsLeft = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + style.left = ret || 0; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + clean: function( elems, context, fragment ) { + context = context || document; + + // !context.createElement fails in IE with an error but returns typeof 'object' + if ( typeof context.createElement === "undefined" ) + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { + var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); + if ( match ) + return [ context.createElement( match[1] ) ]; + } + + var ret = [], scripts = [], div = context.createElement("div"); + + jQuery.each(elems, function(i, elem){ + if ( typeof elem === "number" ) + elem += ''; + + if ( !elem ) + return; + + // Convert html string into DOM nodes + if ( typeof elem === "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = jQuery.trim( elem ).toLowerCase(); + + var wrap = + // option or optgroup + !tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "", "
    " ] || + + !tags.indexOf("", "" ] || + + // matched above + (!tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + // IE can't serialize and + + \ No newline at end of file diff --git a/06/WebRoot/default.jsp b/06/WebRoot/default.jsp new file mode 100644 index 0000000..23d9b96 --- /dev/null +++ b/06/WebRoot/default.jsp @@ -0,0 +1,30 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + + + +߿ + + + + + + + + + + + + + + +
     
     
    + + + + + + + + diff --git a/06/WebRoot/error.jsp b/06/WebRoot/error.jsp new file mode 100644 index 0000000..de7c261 --- /dev/null +++ b/06/WebRoot/error.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +ʾ + + + + + + + + +
    + + + +
      ʾϢ ${error}
    +
    +
    +
    +
    + + diff --git a/06/WebRoot/examRule.jsp b/06/WebRoot/examRule.jsp new file mode 100644 index 0000000..cac7727 --- /dev/null +++ b/06/WebRoot/examRule.jsp @@ -0,0 +1,61 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%if(session.getAttribute("student")==null){ + response.sendRedirect("../index.jsp"); +}%> + + +߿ + + + + + + + + + +
     
    + + + + +
    + + + + + + +
    + + + + +
      ǰλã ߿ Թ >>> + ҳ 
    + + + + + + + + + + + + + + + +
    Թ
         ߿ϵͳҳˢ¡˵ȲԸڹ涨ĿʱûнϵͳԶύԾÿλͬһγֻܿһΣϵͳἰʱ֪ͨԵľʱ䣻뿼עԿγԼʱ䣡
    +    ֻͬϹſԽпԡδҵصĿԿγ̣Աϵ
     
      
    +
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/index.jsp b/06/WebRoot/index.jsp new file mode 100644 index 0000000..662b9fd --- /dev/null +++ b/06/WebRoot/index.jsp @@ -0,0 +1,75 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + + +߿ + + + + + + + + +
     
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     ׼֤ţ +  
         룺 
      +   + + +   +  
     ̨ 
    +
    + + + + +
     
    + + diff --git a/06/WebRoot/logout.jsp b/06/WebRoot/logout.jsp new file mode 100644 index 0000000..27fe4b1 --- /dev/null +++ b/06/WebRoot/logout.jsp @@ -0,0 +1,18 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + + +Untitled Document + + + + +<% +session.invalidate(); +out.println(""); +%> + + + + diff --git a/06/WebRoot/manage/copyright.jsp b/06/WebRoot/manage/copyright.jsp new file mode 100644 index 0000000..e34c78c --- /dev/null +++ b/06/WebRoot/manage/copyright.jsp @@ -0,0 +1,22 @@ +<%@ page contentType="text/html; charset=gb2312"%> + + + + + + + + + + + + + + + + + + + + +
      CopyRight © 2011 www.mrbccd.com ʡ****Ƽ޹˾ 
     վʹIE6.0ϰ汾 1024768ΪʾЧ 
    diff --git a/06/WebRoot/manage/error.jsp b/06/WebRoot/manage/error.jsp new file mode 100644 index 0000000..fa19e15 --- /dev/null +++ b/06/WebRoot/manage/error.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +ʾ + + + + + + + + +
    + + + +
      ʾϢ ${error}
    +
    +
    +
    +
    + + diff --git a/06/WebRoot/manage/left.jsp b/06/WebRoot/manage/left.jsp new file mode 100644 index 0000000..a02e678 --- /dev/null +++ b/06/WebRoot/manage/left.jsp @@ -0,0 +1,53 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + + + + + + +
     վ̨
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +  ԱϢ
    +  Ϣ
    +  ɼѯ
    +  γϢ
    +  Ϣ
    +  Ŀ
    +  ˳̨
      
    diff --git a/06/WebRoot/manage/lesson.jsp b/06/WebRoot/manage/lesson.jsp new file mode 100644 index 0000000..152383b --- /dev/null +++ b/06/WebRoot/manage/lesson.jsp @@ -0,0 +1,97 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +߿ԡ̨ + + + + + +<%@ include file="top.jsp"%> + + + + + +
    <%@ include file="left.jsp"%> + + + + + + +
    + + + + +
     ǰλãγϢ >>> ǰԱ<%=session.getAttribute("manager")%> 
    + + + + + +
     ӿγ
    + + + + + + + + + + + + + + + + +
    IDγʱѡ
    + + + + + + + + +
      + [ȫѡ/ѡ] [ɾ] +
    + +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/manage/lesson_add.jsp b/06/WebRoot/manage/lesson_add.jsp new file mode 100644 index 0000000..24e4d99 --- /dev/null +++ b/06/WebRoot/manage/lesson_add.jsp @@ -0,0 +1,65 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + +ӿγ + + + + + + + + + +
    + + + + + + + + + + + + + + + +
      + + + +
    ӿγ
     
      + + + +
    + + + + + + + + + + +
    γƣ +
      +  +
    +
     
       
    + + diff --git a/06/WebRoot/manage/lesson_ok.jsp b/06/WebRoot/manage/lesson_ok.jsp new file mode 100644 index 0000000..98ef2b9 --- /dev/null +++ b/06/WebRoot/manage/lesson_ok.jsp @@ -0,0 +1,29 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/06/WebRoot/manage/login.jsp b/06/WebRoot/manage/login.jsp new file mode 100644 index 0000000..040a95c --- /dev/null +++ b/06/WebRoot/manage/login.jsp @@ -0,0 +1,55 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> + + + +߿ԡ̨¼ + + + + + + + + +
    + + + + + + + + +
      
      + + + + + + + + + + + + + +
    Աƣ +
    Ա룺
    +   +   +
    +
    +
    + + diff --git a/06/WebRoot/manage/logout.jsp b/06/WebRoot/manage/logout.jsp new file mode 100644 index 0000000..014207e --- /dev/null +++ b/06/WebRoot/manage/logout.jsp @@ -0,0 +1,18 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + + +Untitled Document + + + + +<% +session.invalidate(); +out.println(""); +%> + + + + diff --git a/06/WebRoot/manage/main.jsp b/06/WebRoot/manage/main.jsp new file mode 100644 index 0000000..e5c72b5 --- /dev/null +++ b/06/WebRoot/manage/main.jsp @@ -0,0 +1,67 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +߿ԡ̨ + + + +<%@ include file="top.jsp"%> + + + + + +
    <%@ include file="left.jsp"%> + + + + + + + +
    + + + + +
     ǰλãɼѯ >>> ǰԱ<%=session.getAttribute("manager")%> 
    + + + + + + +
     ѯ + + ׼֤ + Կγ + ʱ + +  ؼ֣ +    +
    + + + + + + + + + + + + + + + + + + + + +
    ׼֤γʱѡѡϼƷ
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/manage/manager.jsp b/06/WebRoot/manage/manager.jsp new file mode 100644 index 0000000..8b27938 --- /dev/null +++ b/06/WebRoot/manage/manager.jsp @@ -0,0 +1,57 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +߿ԡ̨ + + + +<%@ include file="top.jsp"%> + + + + + +
    <%@ include file="left.jsp"%> + + + + + + +
    + + + + +
     ǰλãԱϢ >>> ǰԱ<%=session.getAttribute("manager")%> 
    + + + + + +
     ӹԱϢ
    + + + + + + + + + + + + + +
    Ա޸ɾ
      + + ޸ + +   + + ɾ + +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/manage/manager_add.jsp b/06/WebRoot/manage/manager_add.jsp new file mode 100644 index 0000000..bae7be2 --- /dev/null +++ b/06/WebRoot/manage/manager_add.jsp @@ -0,0 +1,82 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + +ӹԱϢ + + + + + + + + + +
    + + + + + + + + + + + + + + + +
      + + + +
    ӹԱ
     
      + + + +
    + + + + + + + + + + + + + + + + + + +
    Աƣ +
    Ա룺
    ȷ  룺
      +  +
    +
     
       
    + + diff --git a/06/WebRoot/manage/manager_ok.jsp b/06/WebRoot/manage/manager_ok.jsp new file mode 100644 index 0000000..51fc783 --- /dev/null +++ b/06/WebRoot/manage/manager_ok.jsp @@ -0,0 +1,29 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/06/WebRoot/manage/pwd_Modify.jsp b/06/WebRoot/manage/pwd_Modify.jsp new file mode 100644 index 0000000..c4f6b32 --- /dev/null +++ b/06/WebRoot/manage/pwd_Modify.jsp @@ -0,0 +1,96 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + +߿ԡ̨ + + + + +<%@ include file="top.jsp"%> + + + + + +
    <%@ include file="left.jsp"%> + + + + + + +
    + + + + +
     ǰλãԱϢ > ޸ĹԱ >>> <%=session.getAttribute("manager")%> 
    + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Աƣ +
    ԭ룺 +
    ȷ룺
      +   + +   + +
    +
    +
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/manage/pwd_ok.jsp b/06/WebRoot/manage/pwd_ok.jsp new file mode 100644 index 0000000..4ef3e68 --- /dev/null +++ b/06/WebRoot/manage/pwd_ok.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + + + + \ No newline at end of file diff --git a/06/WebRoot/manage/questions.jsp b/06/WebRoot/manage/questions.jsp new file mode 100644 index 0000000..0269a1e --- /dev/null +++ b/06/WebRoot/manage/questions.jsp @@ -0,0 +1,105 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + +߿ԡ̨ + + + + + +<%@ include file="top.jsp"%> + + + + + +
    <%@ include file="left.jsp"%> + + + + + + +
    + + + + +
     ǰλãĿ >>> ǰԱ<%=session.getAttribute("manager")%> 
    + + + + + +
     ӿĿ
    + + + + + + + + + + + + + + + + + + + + + + +
    γĿ޸ѡ
    <%=lesson.getLesson(lessonID)%><%=taoTi.getTaoTi(taoTiID)%>޸
    + + + + + + + + +
      + [ȫѡ/ѡ] [ɾ] +
    + +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/manage/questions_Add.jsp b/06/WebRoot/manage/questions_Add.jsp new file mode 100644 index 0000000..12fc3ca --- /dev/null +++ b/06/WebRoot/manage/questions_Add.jsp @@ -0,0 +1,155 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + +߿ԡ̨ + + + + + +<%@ include file="top.jsp"%> + + + + + +
    <%@ include file="left.jsp"%> + + + + + + +
    + + + + +
     ǰλãĿ > ӿĿ >>> ǰԱ<%=session.getAttribute("manager")%> 
    + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    γ̣ + + + +
    +
    Ŀ + * +
    ͣ + + ѡ + ѡ + +
    ѡA + * +
    ѡB + * +
    ѡC + * +
    ѡD + * +
    ȷ𰸣 + + A + B + C + D + +
    ע + +
      +   + +   +
    +
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/manage/questions_Modify.jsp b/06/WebRoot/manage/questions_Modify.jsp new file mode 100644 index 0000000..5972356 --- /dev/null +++ b/06/WebRoot/manage/questions_Modify.jsp @@ -0,0 +1,139 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + + + +߿ԡ̨ + + + + +<%@ include file="top.jsp"%> + + + + + +
    <%@ include file="left.jsp"%> + + + + + + +
    + + + + +
     ǰλãĿ > ޸ĿĿ >>> ǰԱ<%=session.getAttribute("manager")%> 
    + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    γ̣<%=lesson.getLesson(lessonID)%>
    <%=taoTi.getTaoTi(taoTiID)%>
    Ŀ + + *
    ͣ + ѡ + ѡ +
    ѡA + *
    ѡB + *
    ѡC + *
    ѡD + *
    ȷ𰸣 + A + B + C + D +
    ע
      +   + +   +
    + +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/manage/questions_ok.jsp b/06/WebRoot/manage/questions_ok.jsp new file mode 100644 index 0000000..9ef5a62 --- /dev/null +++ b/06/WebRoot/manage/questions_ok.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/06/WebRoot/manage/selTaoTi.jsp b/06/WebRoot/manage/selTaoTi.jsp new file mode 100644 index 0000000..1be7579 --- /dev/null +++ b/06/WebRoot/manage/selTaoTi.jsp @@ -0,0 +1,5 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + + \ No newline at end of file diff --git a/06/WebRoot/manage/student.jsp b/06/WebRoot/manage/student.jsp new file mode 100644 index 0000000..afe589a --- /dev/null +++ b/06/WebRoot/manage/student.jsp @@ -0,0 +1,97 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +߿ԡ̨ + + + + + +<%@ include file="top.jsp"%> + + + + + +
    <%@ include file="left.jsp"%> + + + + + + +
    + + + + +
     ǰλãϢ >>> ǰԱ<%=session.getAttribute("manager")%> 
    + +  + + + + + + + + + + + + + + + + + + + + + +
    ׼֤Աʱ֤ѡ
    + + + + + + + +
      + [ȫѡ/ѡ] [ɾ] +
    + +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/manage/student_ok.jsp b/06/WebRoot/manage/student_ok.jsp new file mode 100644 index 0000000..5c49d6f --- /dev/null +++ b/06/WebRoot/manage/student_ok.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + + + + \ No newline at end of file diff --git a/06/WebRoot/manage/taoTi.jsp b/06/WebRoot/manage/taoTi.jsp new file mode 100644 index 0000000..c32d09c --- /dev/null +++ b/06/WebRoot/manage/taoTi.jsp @@ -0,0 +1,101 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +߿ԡ̨ + + + + + +<%@ include file="top.jsp"%> + + + + + +
    <%@ include file="left.jsp"%> + + + + + + +
    + + + + +
     ǰλãϢ >>> ǰԱ<%=session.getAttribute("manager")%> 
    + + + + + +
     
    + + + + + + + + + + + + + + + + + + + +
    γʱ޸ѡ
    <%=lesson.getLesson(lessonID)%>޸
    + + + + + + + + +
      + [ȫѡ/ѡ] [ɾ] +
    + +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/manage/taoTi_Add.jsp b/06/WebRoot/manage/taoTi_Add.jsp new file mode 100644 index 0000000..d00a279 --- /dev/null +++ b/06/WebRoot/manage/taoTi_Add.jsp @@ -0,0 +1,71 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + +߿ԡ̨ + + + + +<%@ include file="top.jsp"%> + + + + + +
    <%@ include file="left.jsp"%> + + + + + + +
    + + + + +
     ǰλãϢ > Ϣ >>> ǰԱ<%=session.getAttribute("manager")%> 
    + + + + +
     
    + + + + + + + + + + + + + +
    ƣ + +
    γ̣ + + + +
      +   + +   +
    +
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/manage/taoTi_Modify.jsp b/06/WebRoot/manage/taoTi_Modify.jsp new file mode 100644 index 0000000..f959140 --- /dev/null +++ b/06/WebRoot/manage/taoTi_Modify.jsp @@ -0,0 +1,72 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + +߿ԡ̨ + + + + +<%@ include file="top.jsp"%> + + + + + +
    <%@ include file="left.jsp"%> + + + + + + +
    + + + + +
     ǰλãϢ > ޸Ϣ >>> ǰԱ<%=session.getAttribute("manager")%> 
    + + + + +
     
    + + + + + + + + + + + + + +
    ƣ + + +
    γ̣ + + + +
      +   + +   +
    +
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/manage/taoTi_ok.jsp b/06/WebRoot/manage/taoTi_ok.jsp new file mode 100644 index 0000000..0857919 --- /dev/null +++ b/06/WebRoot/manage/taoTi_ok.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/06/WebRoot/manage/top.jsp b/06/WebRoot/manage/top.jsp new file mode 100644 index 0000000..49a3ba6 --- /dev/null +++ b/06/WebRoot/manage/top.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> +<% +//֤ûǷ¼ +if (session.getAttribute("manager")==null || "".equals(session.getAttribute("manager"))){ + response.sendRedirect("login.jsp"); + return; +} +%> + + + + +
     
    \ No newline at end of file diff --git a/06/WebRoot/noenLesson.jsp b/06/WebRoot/noenLesson.jsp new file mode 100644 index 0000000..a27de2c --- /dev/null +++ b/06/WebRoot/noenLesson.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + + + + \ No newline at end of file diff --git a/06/WebRoot/prompt.jsp b/06/WebRoot/prompt.jsp new file mode 100644 index 0000000..8c4ab6c --- /dev/null +++ b/06/WebRoot/prompt.jsp @@ -0,0 +1,59 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + + +߿ + + + + + + + + + +
     
    + + + + +
    + + + + + + +
    + + + + +
      ǰλã ߿ ѡγ >>> + ҳ 
    + + + + + + + + + + + + + + + +
     
     ׼𣿿ʼԡťϵͳ¼οԲǼǿԳɼ 
      +  
    +
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/ready.jsp b/06/WebRoot/ready.jsp new file mode 100644 index 0000000..426a466 --- /dev/null +++ b/06/WebRoot/ready.jsp @@ -0,0 +1,57 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%if(session.getAttribute("student")==null){ + response.sendRedirect("../index.jsp"); +}%> + + +߿ + + + + + + + + + +
     
    + + + + +
    + + + + + + +
    + + + + +
      ǰλã ߿ ׼ >>> + ҳ 
    + + + + + + + + + + + + + + +
     
     ׼

    ʼԡťϵͳ¼οԲǼǿԳɼ
     
      +  
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/register.jsp b/06/WebRoot/register.jsp new file mode 100644 index 0000000..f482708 --- /dev/null +++ b/06/WebRoot/register.jsp @@ -0,0 +1,121 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + +߿ + + + + + + + + + +
     
    + + + + +
    + + + + + + +
    + + + + +
      ǰλã ע >>> ҳ 
    + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + *
        룺620λֻĸɣ *
    ȷ룺 + *
         + + + Ů +
    ʾ⣺ + ҵգ *
    𰸣 + 717գ*
    ר    ҵ +
    ֤ţ + *
      +   + +   +
    +
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/seekPwd.jsp b/06/WebRoot/seekPwd.jsp new file mode 100644 index 0000000..edcb347 --- /dev/null +++ b/06/WebRoot/seekPwd.jsp @@ -0,0 +1,76 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + +߿ + + + + + + + + + +
     
    + + + + +
    + + + + + + + + + +
    + + + + +
      ǰλã һ >>> ҳ 
    + + + + +
     
    + + + + + + +
    ׼֤
    + + + + + + + + + +
    ׼֤ţ + *
      +   + +   +
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/seekPwd1.jsp b/06/WebRoot/seekPwd1.jsp new file mode 100644 index 0000000..248ed85 --- /dev/null +++ b/06/WebRoot/seekPwd1.jsp @@ -0,0 +1,81 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + +߿ + + + + + + + + + +
     
    + + + + +
    + + + + + + + + + +
    + + + + +
      ǰλã һ >>> ҳ 
    + + + + +
     
    + + + + + + +
    ʾ
    + + + + + + + + + + + + + +
    ʾ⣺ + + ֻ
    ʾ𰸣 + *
      +   + +   +
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/seekPwd2.jsp b/06/WebRoot/seekPwd2.jsp new file mode 100644 index 0000000..9c09768 --- /dev/null +++ b/06/WebRoot/seekPwd2.jsp @@ -0,0 +1,67 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + +߿ + + + + + + + + +
     
    + + + + +
    + + + + + + + + + +
    + + + + +
      ǰλã һ >>> ҳ 
    + + + + +
     
    + + + + + +
    ɹһ
    + + + + + + + + + + + + + +
    ׼֤ţ + ֻ
        룺 + ֻ
       + '"/>
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/selectLesson.jsp b/06/WebRoot/selectLesson.jsp new file mode 100644 index 0000000..f9d0bfb --- /dev/null +++ b/06/WebRoot/selectLesson.jsp @@ -0,0 +1,64 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%if(session.getAttribute("student")==null){ + response.sendRedirect("../index.jsp"); +}%> + + +߿ + + + + + + + + + +
     
    + + + + +
    + + + + + + +
    + + + + +
      ǰλã ߿ ѡԿγ >>> + ҳ 
    + + + + + + + + + + + + + + + +
     
     ѡԿγ̣ + + +  
      +  
    +
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/showRemainTime.jsp b/06/WebRoot/showRemainTime.jsp new file mode 100644 index 0000000..e061486 --- /dev/null +++ b/06/WebRoot/showRemainTime.jsp @@ -0,0 +1 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %>${showRemainTime} \ No newline at end of file diff --git a/06/WebRoot/showStartTime.jsp b/06/WebRoot/showStartTime.jsp new file mode 100644 index 0000000..cb318af --- /dev/null +++ b/06/WebRoot/showStartTime.jsp @@ -0,0 +1,2 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +${showStartTime} \ No newline at end of file diff --git a/06/WebRoot/startExam.jsp b/06/WebRoot/startExam.jsp new file mode 100644 index 0000000..2b4b0ba --- /dev/null +++ b/06/WebRoot/startExam.jsp @@ -0,0 +1,225 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.util.*" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + +<% +int lessonID=Integer.parseInt((String)session.getAttribute("lessonID")); +List list_s=(List)request.getAttribute("singleQue"); +int s=40/list_s.size(); +List list_m=(List)request.getAttribute("moreQue"); +int m=60/list_m.size(); +%> + + + + +߿ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       + + + + + + + + +
    ʱ䣺20 ʱ
    00:00:00
    +
    ʣʱ䣺
    +
      
      
    + + + + + + + + +
    <%=lesson.getLesson(lessonID)%>   Ծ +
      100   ѡ40   ѡ60
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    һѡ⣨ÿ<%=s %>֣÷
    + + + + + + +
    [ ${ind+1} ]  + +
    +
     A.
     B.
     C.
     D.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ѡ⣨ÿ<%=m%>֣÷
    + + + + + + +
    [ ${ind+1} ]  + +
    +
     A.
     B.
     C.
     D.
    +
    +
    +
       
    + + diff --git a/06/WebRoot/stuResultQuery.jsp b/06/WebRoot/stuResultQuery.jsp new file mode 100644 index 0000000..a521e62 --- /dev/null +++ b/06/WebRoot/stuResultQuery.jsp @@ -0,0 +1,66 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + + +߿ + + + + + + + + + +
     
    + + + + +
    + + + + + + +
    + + + + +
      ǰλã ɼѯ >>> + ҳ 
    + + + + +
     
    + + + + + + + + + + + + + + + + + + + +
    ׼֤γʱѡѡϼƷ
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/studentM_ok.jsp b/06/WebRoot/studentM_ok.jsp new file mode 100644 index 0000000..d223179 --- /dev/null +++ b/06/WebRoot/studentM_ok.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + + + + \ No newline at end of file diff --git a/06/WebRoot/student_Modify.jsp b/06/WebRoot/student_Modify.jsp new file mode 100644 index 0000000..b52b38e --- /dev/null +++ b/06/WebRoot/student_Modify.jsp @@ -0,0 +1,139 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> + + +߿ + + + + + + + + + + +
     
    + + + + +
    + + + + + + +
    + + + + +
      ǰλã ޸ĸ >>> ҳ 
    + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + *
    ԭ  룺 * +
      룺620λֻĸɣ *
    ȷ룺 + *
         + + + Ů +
    ʾ⣺ + ҵգ *
    𰸣 + 717գ*
    ר    ҵ +
    ֤ţ + *
      +   + +  + +
    +
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/06/WebRoot/student_ok.jsp b/06/WebRoot/student_ok.jsp new file mode 100644 index 0000000..e3beaf7 --- /dev/null +++ b/06/WebRoot/student_ok.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + + + + \ No newline at end of file diff --git a/06/WebRoot/submitTestPaperok.jsp b/06/WebRoot/submitTestPaperok.jsp new file mode 100644 index 0000000..6751801 --- /dev/null +++ b/06/WebRoot/submitTestPaperok.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + + + + \ No newline at end of file diff --git a/06/WebRoot/top.jsp b/06/WebRoot/top.jsp new file mode 100644 index 0000000..5298c0b --- /dev/null +++ b/06/WebRoot/top.jsp @@ -0,0 +1,7 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%if(session.getAttribute("student")==null){ + response.sendRedirect("../index.jsp"); +}%> \ No newline at end of file diff --git a/06/src/com/connDB.properties b/06/src/com/connDB.properties new file mode 100644 index 0000000..d572f91 --- /dev/null +++ b/06/src/com/connDB.properties @@ -0,0 +1,6 @@ +DB_CLASS_NAME=com.microsoft.sqlserver.jdbc.SQLServerDriver +DB_URL=jdbc:sqlserver://localhost:1433;DatabaseName=db_netExam +#DB_USER=û +DB_USER=sa +#DB_PWDû룩= +DB_PWD= diff --git a/06/src/com/wgh/action/Lesson.java b/06/src/com/wgh/action/Lesson.java new file mode 100644 index 0000000..17812fe --- /dev/null +++ b/06/src/com/wgh/action/Lesson.java @@ -0,0 +1,96 @@ +package com.wgh.action; + +import java.util.List; + +import javax.servlet.http.*; + +import org.apache.struts.action.*; +import com.wgh.actionForm.LessonForm; +import com.wgh.dao.LessonDAO; + +public class Lesson extends Action { + private LessonDAO lessonDAO = null; + + public Lesson() { + this.lessonDAO = new LessonDAO(); + } + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + String action = request.getParameter("action"); + System.out.println("ȡIJѯַ" + action); + if (action == null || "".equals(action)) { + return mapping.findForward("error"); + } else if ("lessonQuery".equals(action)) { + return lessonQuery(mapping, form, request, response); + + } else if ("lessonAdd".equals(action)) { + return lessonAdd(mapping, form, request, response); + } else if ("lessonDel".equals(action)) { + return lessonDel(mapping, form, request, response); + }else if("selectLesson".equals(action)){ + return selectLesson(mapping, form, request, response); + }else if("ready".equals(action)){ + return ready(mapping, form, request, response); + } + request.setAttribute("error", "ʧܣ"); + return mapping.findForward("error"); + } + + // ѯγϢ + private ActionForward lessonQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + request.setAttribute("lessonQuery", lessonDAO.query(0)); + return mapping.findForward("lessonQuery"); + } + + // ӿγ + private ActionForward lessonAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + LessonForm lessonForm = (LessonForm) form; + int ret = lessonDAO.insert(lessonForm); + System.out.println("ֵret" + ret); + if (ret == 1) { + return mapping.findForward("lessonAdd"); + } else if (ret == 2) { + request.setAttribute("error", "ÿγѾӣ"); + return mapping.findForward("error"); + } else { + request.setAttribute("error", "ӿγʧܣ"); + return mapping.findForward("error"); + } + } + // ɾγ + private ActionForward lessonDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + LessonForm lessonForm = (LessonForm) form; + int ret = lessonDAO.delete(lessonForm); + if (ret == 0) { + request.setAttribute("error", "ɾγʧܣ"); + return mapping.findForward("error"); + } else { + return mapping.findForward("lessonDel"); + } + } + //߿ʱѡγ + private ActionForward selectLesson(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + HttpSession session = request.getSession(); + String stu=session.getAttribute("student").toString(); //ȡ׼֤ + List list=lessonDAO.query(stu); //ѯĿĿγбѾĿĿ + if(list.size()<1){ + return mapping.findForward("noenLesson"); + }else{ + request.setAttribute("lessonList",list); + return mapping.findForward("selectLesson"); + } + } + //׼ + private ActionForward ready(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + LessonForm lessonForm = (LessonForm) form; + System.out.println("γID"+lessonForm.getID()+lessonForm.getName()); + HttpSession session = request.getSession(); + session.setAttribute("lessonID",String.valueOf(lessonForm.getID())); //ѯѡĿγID + return mapping.findForward("ready"); + } +} \ No newline at end of file diff --git a/06/src/com/wgh/action/Manager.java b/06/src/com/wgh/action/Manager.java new file mode 100644 index 0000000..13827b2 --- /dev/null +++ b/06/src/com/wgh/action/Manager.java @@ -0,0 +1,114 @@ +package com.wgh.action; + +import javax.servlet.http.*; +import org.apache.struts.action.*; +import com.wgh.actionForm.ManagerForm; +import com.wgh.dao.ManagerDAO; + +public class Manager extends Action { + private ManagerDAO managerDAO = null; + + public Manager() { + this.managerDAO = new ManagerDAO(); + } + + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + String action = request.getParameter("action"); + System.out.println("ȡIJѯַ" + action); + if (action == null || "".equals(action)) { + return mapping.findForward("error"); + } else if ("login".equals(action)) { + return managerLogin(mapping, form, request, response); + + } else if ("managerQuery".equals(action)) { + return managerQuery(mapping, form, request, response); + + } else if ("managerAdd".equals(action)) { + return managerAdd(mapping, form, request, response); + } else if ("managerDel".equals(action)) { + return managerDel(mapping, form, request, response); + } else if ("queryPWD".equals(action)) { + return pwdQuery(mapping, form, request, response); + } else if ("modifypwd".equals(action)) { + return modifypwd(mapping, form, request, response); + } + request.setAttribute("error", "ʧܣ"); + return mapping.findForward("error"); + } + + // Ա֤ + public ActionForward managerLogin(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + ManagerForm managerForm = (ManagerForm) form; + int ret = managerDAO.checkManager(managerForm); + System.out.print("֤retֵ:" + ret); + if (ret == 2) { + request.setAttribute("error", "ĹԱƻ"); + return mapping.findForward("error"); + } else { + HttpSession session = request.getSession(); + session.setAttribute("manager", managerForm.getName()); + return mapping.findForward("managerLoginok"); + } + } + + // ѯԱϢ + private ActionForward managerQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + request.setAttribute("managerQuery", managerDAO.query(0)); + return mapping.findForward("managerQuery"); + } + + // ӹԱϢ + private ActionForward managerAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + ManagerForm managerForm = (ManagerForm) form; + managerForm.setPwd(managerForm.getPwd()); + int ret = managerDAO.insert(managerForm); + System.out.println("ֵret" + ret); + if (ret == 1) { + return mapping.findForward("managerAdd"); + } else if (ret == 2) { + request.setAttribute("error", "ùԱϢѾӣ"); + return mapping.findForward("error"); + } else { + request.setAttribute("error", "ӹԱϢʧܣ"); + return mapping.findForward("error"); + } + } + + // ޸ʱѯ + private ActionForward pwdQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + request.setAttribute("pwdQueryif", managerDAO.query(Integer.parseInt(request.getParameter("id")))); + return mapping.findForward("pwdQueryModify"); + } + + // ޸ĹԱ + private ActionForward modifypwd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + ManagerForm managerForm = (ManagerForm) form; + int ret = managerDAO.updatePwd(managerForm); + if (ret == 0) { + request.setAttribute("error", "޸ĹԱʧܣ"); + return mapping.findForward("error"); + } else { + return mapping.findForward("pwdModify"); + } + } + + // ɾԱϢ + private ActionForward managerDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + ManagerForm managerForm = (ManagerForm) form; + managerForm.setID(Integer.parseInt(request.getParameter("id"))); + int ret = managerDAO.delete(managerForm); + if (ret == 0) { + request.setAttribute("error", "ɾԱϢʧܣ"); + return mapping.findForward("error"); + } else { + return mapping.findForward("managerDel"); + } + } +} \ No newline at end of file diff --git a/06/src/com/wgh/action/Questions.java b/06/src/com/wgh/action/Questions.java new file mode 100644 index 0000000..4523d03 --- /dev/null +++ b/06/src/com/wgh/action/Questions.java @@ -0,0 +1,114 @@ +package com.wgh.action; + +import javax.servlet.http.*; + +import org.apache.struts.action.*; + +import com.wgh.actionForm.QuestionsForm; +import com.wgh.actionForm.TaoTiForm; +import com.wgh.core.ChStr; +import com.wgh.dao.LessonDAO; +import com.wgh.dao.QuestionsDAO; +import com.wgh.dao.TaoTiDAO; + +public class Questions extends Action { + private QuestionsDAO questionsDAO = null; + private LessonDAO lessonDAO=null; + private TaoTiDAO taoTiDAO=null; + + public Questions() { + this.questionsDAO = new QuestionsDAO(); + this.lessonDAO=new LessonDAO(); + this.taoTiDAO=new TaoTiDAO(); + } + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + String action = request.getParameter("action"); + System.out.println("ȡIJѯַ" + action); + if ("questionsQuery".equals(action)) { + return questionsQuery(mapping, form, request, response); + }else if("questionsAddQuery".equals(action)){ + return questionsAddQuery(mapping,form,request,response); + } else if ("questionsAdd".equals(action)) { + return questionsAdd(mapping, form, request, response); + } else if ("questionsDel".equals(action)) { + return questionsDel(mapping, form, request, response); + }else if("questionsModifyQuery".equals(action)){ + return questionsModifyQuery(mapping,form,request,response); + }else if("questionsModify".equals(action)){ + return questionsModify(mapping,form,request,response); + }else if("queryTaoTi".equals(action)){ + return queryTaoTi(mapping,form,request,response); + }else{ + request.setAttribute("error", "ʧܣ"); + return mapping.findForward("error"); + } + } + + // ѯĿϢ + private ActionForward questionsQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + request.setAttribute("questionsQuery", questionsDAO.query(0)); + return mapping.findForward("questionsQuery"); + } + + // ӿĿ + private ActionForward questionsAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + QuestionsForm questionsForm = (QuestionsForm) form; + int ret = questionsDAO.insert(questionsForm); + if (ret == 1) { + return mapping.findForward("questionsAdd"); + } else if (ret == 2) { + request.setAttribute("error", "ÿĿѾӣ"); + return mapping.findForward("error"); + } else { + request.setAttribute("error", "ӿĿʧܣ"); + return mapping.findForward("error"); + } + } + // ӿĿʱѯ + private ActionForward questionsAddQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + request.setAttribute("lessonList",lessonDAO.query(-1)); //ȫĿγб + return mapping.findForward("questionsAddQuery"); + } + + //ݿγ̲ѯajax + private ActionForward queryTaoTi(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + request.setAttribute("taoTiList",taoTiDAO.queryTaoTi(Integer.parseInt(request.getParameter("id")))); //ѯָγ̵б + return mapping.findForward("queryTaoTi"); + } + // ޸ĿĿʱIJѯ + private ActionForward questionsModifyQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + QuestionsForm questionsForm=(QuestionsForm)((questionsDAO.query(Integer.parseInt(request.getParameter("id")))).get(0)); + request.setAttribute("questionsModifyQuery", questionsForm); + return mapping.findForward("questionsModifyQuery"); + } + //޸ĿĿ + private ActionForward questionsModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + QuestionsForm questionsForm = (QuestionsForm) form; + int ret = questionsDAO.update(questionsForm); + if (ret == 0) { + request.setAttribute("error", "޸ĿĿʧܣ"); + return mapping.findForward("error"); + } else { + return mapping.findForward("questionsModify"); + } + } + // ɾĿ + private ActionForward questionsDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + QuestionsForm questionsForm = (QuestionsForm) form; + int ret = questionsDAO.delete(questionsForm); + if (ret == 0) { + request.setAttribute("error", "ɾĿʧܣ"); + return mapping.findForward("error"); + } else { + return mapping.findForward("questionsDel"); + } + } +} \ No newline at end of file diff --git a/06/src/com/wgh/action/SelfRequestProcessor.java b/06/src/com/wgh/action/SelfRequestProcessor.java new file mode 100644 index 0000000..61c2621 --- /dev/null +++ b/06/src/com/wgh/action/SelfRequestProcessor.java @@ -0,0 +1,18 @@ +package com.wgh.action; + +import org.apache.struts.action.RequestProcessor; +import javax.servlet.http.*; +import java.io.*; + +public class SelfRequestProcessor extends RequestProcessor { + public SelfRequestProcessor() { + } + protected boolean processPreprocess(HttpServletRequest request,HttpServletResponse response){ + try { + request.setCharacterEncoding("GBK"); + } catch (UnsupportedEncodingException ex) { + ex.printStackTrace(); + } + return true; + } +} diff --git a/06/src/com/wgh/action/StartExam.java b/06/src/com/wgh/action/StartExam.java new file mode 100644 index 0000000..96720fa --- /dev/null +++ b/06/src/com/wgh/action/StartExam.java @@ -0,0 +1,167 @@ +package com.wgh.action; + +import javax.servlet.http.*; + +import org.apache.struts.action.*; + +import com.wgh.actionForm.LessonForm; +import com.wgh.actionForm.MoreSelect; +import com.wgh.actionForm.QuestionsForm; +import com.wgh.actionForm.TaoTiForm; +import com.wgh.core.ChStr; +import com.wgh.dao.LessonDAO; +import com.wgh.dao.StartExamDAO; +import com.wgh.dao.TaoTiDAO; +import java.util.*; + +public class StartExam extends Action { + private StartExamDAO startExamDAO = null; + ChStr chStr=new ChStr(); + + public StartExam() { + this.startExamDAO = new StartExamDAO(); + } + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + String action = request.getParameter("action"); + //System.out.println("ȡIJѯַ" + action); + if ("startExam".equals(action)) { + return startExam(mapping, form, request, response); + }else if("submitTestPaper".equals(action)){ + return submitTestPaper(mapping,form,request,response); + }else if("showStartTime".equals(action)){//ʾԼʱ + return showStartTime(mapping,form,request,response); + }else if("showRemainTime".equals(action)){//ʾʱ + return showRemainTime(mapping,form,request,response); + }else{ + request.setAttribute("error", "ʧܣ"); + return mapping.findForward("error"); + } + } + //ʱ + private ActionForward showStartTime(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + HttpSession session = request.getSession(); + String startTime=session.getAttribute("startTime").toString(); + long a=Long.parseLong(startTime); + long b=new java.util.Date().getTime(); + int h=(int)Math.abs((b-a)/3600000); + String hour=chStr.formatNO(h,2); + int m=(int)(b-a)%3600000/60000; + String minute=chStr.formatNO(m,2); + int s=(int)((b-a)%3600000)%60000/1000; + String second=chStr.formatNO(s,2); + String time=hour+":"+minute+":"+second; + request.setAttribute("showStartTime",time); + return mapping.findForward("showStartTime"); + } + //ʣʱ + private ActionForward showRemainTime(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + HttpSession session = request.getSession(); + String startTime=session.getAttribute("startTime").toString(); + long a=Long.parseLong(startTime); + long b=new java.util.Date().getTime(); + long r=20*60000-(b-a-1000); + int h=(int)Math.abs(r/3600000); + String hour=chStr.formatNO(h,2); + int m=(int)(r)%3600000/60000; + String minute=chStr.formatNO(m,2); + int s=(int)((r)%3600000)%60000/1000; + String second=chStr.formatNO(s,2); + String time=hour+":"+minute+":"+second; + request.setAttribute("showRemainTime",time); + return mapping.findForward("showRemainTime"); + } + + // ȡĿϢ + private ActionForward startExam(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + //System.out.println("γID"+lessonForm.getID()+lessonForm.getName()); + HttpSession session = request.getSession(); + if(session.getAttribute("student")==null || session.getAttribute("student").equals("")){ + return mapping.findForward("dealNull"); //תǰ̨¼ҳ + }else{ + String student=session.getAttribute("student").toString(); //׼֤ + if(session.getAttribute("lessonID")==null || session.getAttribute("lessonID").equals("")){ + return mapping.findForward("dealNull"); //תǰ̨¼ҳ + }else{ + int lessonID=Integer.parseInt(session.getAttribute("lessonID").toString()); //γID + //ȡ + int questions=startExamDAO.randomGetQuestion(lessonID); + //տʼʱ濼Խ + int ret=startExamDAO.startSaveResult(student,lessonID); + // System.out.println("տʼʱ濼Խ"+ret); + List singleQue=(List)startExamDAO.queryExam(questions,0); + QuestionsForm q=(QuestionsForm)form; + q.setSize(singleQue.size()); + request.setAttribute("singleQue",singleQue); //ȡѡ + List moreQue=(List)startExamDAO.queryExam(questions,1); //ȡѡ + q.setMoreSize(moreQue.size()); + request.setAttribute("moreQue",moreQue); + session.setAttribute("startTime",new java.util.Date().getTime()); + return mapping.findForward("testPaper"); + } + } + } +//ύԾ + private ActionForward submitTestPaper(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response){ + QuestionsForm q=(QuestionsForm)form; + String rightAnswer=""; + float singleMark=0; + float moreMark=0; + /****************************ͳƵѡĵ÷**************************************/ + String[] single=q.getAnswerArrS(); + int[] singleId=q.getIdArrS(); + //System.out.println(q.getID()); + System.out.println("ݵijȣ"+single.length); + float markS=40/(single.length); + for(int i=0;i1){ + str=str.substring(0,str.length()-1); + } + + System.out.println("ȡĶѡ𰸣"+str); + if(rightAnswer.equals(str)){ + moreMark=moreMark+markM; //ۼӶѡķ + } + str=""; + } + System.out.println("ѡ÷֣"+moreMark); + /*********************************************************************************/ + HttpSession session = request.getSession(); + String student=session.getAttribute("student").toString(); + int lessonID=Integer.parseInt(session.getAttribute("lessonID").toString()); //γID + int ret=startExamDAO.saveResult(student,lessonID,(int)Math.round(singleMark),(int)Math.round(moreMark)); + if(ret>0){ + request.setAttribute("submitTestPaperok", "ԾύοԵijɼΪ"+(Math.round(singleMark)+Math.round(moreMark))+"֣"); + return mapping.findForward("submitTestPaperok"); + }else{ + return mapping.findForward("dealNull"); + } + } + +} diff --git a/06/src/com/wgh/action/StuResult.java b/06/src/com/wgh/action/StuResult.java new file mode 100644 index 0000000..fcc484e --- /dev/null +++ b/06/src/com/wgh/action/StuResult.java @@ -0,0 +1,48 @@ +package com.wgh.action; + +import javax.servlet.http.*; + +import org.apache.struts.action.*; + +import com.wgh.actionForm.QueryResultIfForm; +import com.wgh.actionForm.StuResultForm; +import com.wgh.dao.StuResultDAO; + +public class StuResult extends Action { + private StuResultDAO stuResultDAO = null; + public StuResult() { + this.stuResultDAO = new StuResultDAO(); + } + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + String action = request.getParameter("action"); + System.out.println("ȡIJѯַ" + action); + if (action == null || "".equals(action)) { + return mapping.findForward("error"); + } else if ("stuResultQuery".equals(action)) { + return stuResultQuery(mapping, form, request, response); + } else if ("stuResultQueryS".equals(action)) { + return stuResultQueryS(mapping, form, request, response); + } + request.setAttribute("error", "ʧܣ"); + return mapping.findForward("error"); + } + + // Աѯɼ + private ActionForward stuResultQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + if(form instanceof StuResultForm){ + request.setAttribute("stuResultQuery", stuResultDAO.query("")); + }else{ + QueryResultIfForm ifForm = (QueryResultIfForm) form; + request.setAttribute("stuResultQuery", stuResultDAO.query(ifForm)); + } + return mapping.findForward("stuResultQuery"); + } + // ѯԼijɼ + private ActionForward stuResultQueryS(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + request.setAttribute("stuResultQuery", stuResultDAO.query(request.getParameter("ID").toString())); + return mapping.findForward("stuResultQueryS"); + } +} \ No newline at end of file diff --git a/06/src/com/wgh/action/Student.java b/06/src/com/wgh/action/Student.java new file mode 100644 index 0000000..a87e195 --- /dev/null +++ b/06/src/com/wgh/action/Student.java @@ -0,0 +1,148 @@ +package com.wgh.action; + +import java.util.*; + +import javax.servlet.http.*; +import org.apache.struts.action.*; + +import antlr.collections.List; + +import com.wgh.actionForm.StudentForm; +import com.wgh.actionForm.TaoTiForm; +import com.wgh.dao.StudentDAO; + +public class Student extends Action { + private StudentDAO studentDAO = null; + + public Student() { + this.studentDAO = new StudentDAO(); + } + + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + String action = request.getParameter("action"); + System.out.println("ȡIJѯַ" + action); + if ("studentQuery".equals(action)) { + return studentQuery(mapping, form, request, response); + } else if ("login".equals(action)) { + return studentLogin(mapping, form, request, response); + } else if ("studentAdd".equals(action)) { + return studentAdd(mapping, form, request, response); + } else if ("studentDel".equals(action)) { + return studentDel(mapping, form, request, response); + } else if ("modifyQuery".equals(action)) { + return modifyQuery(mapping, form, request, response); + } else if ("studentModify".equals(action)) { + return studentModify(mapping, form, request, response); + }else if("seekPwd1".equals(action)){ + return seekPwd1(mapping,form,request,response); + }else if("seekPwd2".equals(action)){ + return seekPwd2(mapping,form,request,response); + }else{ + request.setAttribute("error","IJ"); //Ϣ浽error + return mapping.findForward("error"); //תʾϢҳ + } + } + + // ֤ + public ActionForward studentLogin(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + StudentForm studentForm = (StudentForm) form; + int ret = studentDAO.checkStudent(studentForm); + System.out.print("֤retֵ:" + ret); + if (ret == 2) { + request.setAttribute("error", "Ŀ׼֤"); + return mapping.findForward("error"); + } else { + HttpSession session = request.getSession(); + session.setAttribute("student", studentForm.getID()); + return mapping.findForward("studentLoginok"); + } + } + + // ѯϢ + private ActionForward studentQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + request.setAttribute("studentQuery", studentDAO.query(null)); + return mapping.findForward("studentQuery"); + } + + // ӿעϢ + private ActionForward studentAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + StudentForm studentForm = (StudentForm) form; + String ret = studentDAO.insert(studentForm); + System.out.println("ֵret" + ret); + if (ret.equals("re")) { + request.setAttribute("error", "Ѿעᣬֱӵ¼ɣ"); + return mapping.findForward("error"); + } else if(ret.equals("miss")){ + request.setAttribute("error", "עʧܣ"); + return mapping.findForward("error"); + }else{ + request.setAttribute("ret",ret); + return mapping.findForward("studentAdd"); + } + } + + // ޸ĿϢʱѯ + private ActionForward modifyQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + System.out.println("ȡID"+request.getParameter("ID")); + StudentForm studentForm=(StudentForm)(studentDAO.query(request.getParameter("ID")).get(0)); + System.out.println("BeanлȡID"+studentForm.getID()); + request.setAttribute("modifyQuery", studentForm); + return mapping.findForward("modifyQuery"); + } +//һ루һ + private ActionForward seekPwd1(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response){ + StudentForm studentForm = (StudentForm) form; + StudentForm s=studentDAO.seekPwd1(studentForm); + request.setAttribute("seekPwd2", s); + if(s.getID().equals("")){ + request.setAttribute("error", "׼֤Ųڣ"); + return mapping.findForward("error"); + }else{ + return mapping.findForward("seekPwd1"); + } + } +// һ루ڶ + private ActionForward seekPwd2(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response){ + StudentForm studentForm = (StudentForm) form; + StudentForm s=studentDAO.seekPwd2(studentForm); + request.setAttribute("seekPwd3", s); + if(s.getID().equals("")){ + request.setAttribute("error", "ʾĴ𰸲ȷ"); + return mapping.findForward("error"); + }else{ + return mapping.findForward("seekPwd2"); + } + } + // ޸ĿϢ + private ActionForward studentModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + StudentForm studentForm = (StudentForm) form; + int ret = studentDAO.update(studentForm); + if (ret == 0) { + request.setAttribute("error", "޸ĿϢʧܣ"); + return mapping.findForward("error"); + } else { + return mapping.findForward("studentModify"); + } + } + + // ɾϢ + private ActionForward studentDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + StudentForm studentForm = (StudentForm) form; + int ret = studentDAO.delete(studentForm); + if (ret == 0) { + request.setAttribute("error", "ɾϢʧܣ"); + return mapping.findForward("error"); + } else { + return mapping.findForward("studentDel"); + } + } +} \ No newline at end of file diff --git a/06/src/com/wgh/action/TaoTi.java b/06/src/com/wgh/action/TaoTi.java new file mode 100644 index 0000000..7225e8c --- /dev/null +++ b/06/src/com/wgh/action/TaoTi.java @@ -0,0 +1,103 @@ +package com.wgh.action; + +import javax.servlet.http.*; + +import org.apache.struts.action.*; + +import com.wgh.actionForm.TaoTiForm; +import com.wgh.dao.LessonDAO; +import com.wgh.dao.TaoTiDAO; + +public class TaoTi extends Action { + private TaoTiDAO taoTiDAO = null; + private LessonDAO lessonDAO=null; + + public TaoTi() { + this.taoTiDAO = new TaoTiDAO(); + this.lessonDAO=new LessonDAO(); + } + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + String action = request.getParameter("action"); + System.out.println("ȡIJѯַ" + action); + if (action == null || "".equals(action)) { + return mapping.findForward("error"); + } else if ("taoTiQuery".equals(action)) { + return taoTiQuery(mapping, form, request, response); + }else if("taoTiAddQuery".equals(action)){ + return taoTiAddQuery(mapping,form,request,response); + } else if ("taoTiAdd".equals(action)) { + return taoTiAdd(mapping, form, request, response); + } else if ("taoTiDel".equals(action)) { + return taoTiDel(mapping, form, request, response); + }else if("taoTiModifyQuery".equals(action)){ + return taoTiModifyQuery(mapping,form,request,response); + }else if("taoTiModify".equals(action)){ + return taoTiModify(mapping,form,request,response); + } + request.setAttribute("error", "ʧܣ"); + return mapping.findForward("error"); + } + + // ѯϢ + private ActionForward taoTiQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + request.setAttribute("taoTiQuery", taoTiDAO.query(0)); + return mapping.findForward("taoTiQuery"); + } + + // + private ActionForward taoTiAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + TaoTiForm taoTiForm = (TaoTiForm) form; + int ret = taoTiDAO.insert(taoTiForm); + System.out.println("ֵret" + ret); + if (ret == 1) { + return mapping.findForward("taoTiAdd"); + } else if (ret == 2) { + request.setAttribute("error", "Ѿӣ"); + return mapping.findForward("error"); + } else { + request.setAttribute("error", "ʧܣ"); + return mapping.findForward("error"); + } + } + // ʱѯ + private ActionForward taoTiAddQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + request.setAttribute("lessonList",lessonDAO.query(0)); //ȫγб + return mapping.findForward("taoTiAddQuery"); + } + // ޸ʱѯ + private ActionForward taoTiModifyQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + TaoTiForm taoTiForm=(TaoTiForm)((taoTiDAO.query(Integer.parseInt(request.getParameter("id")))).get(0)); + request.setAttribute("taoTiModifyQuery", taoTiForm); + request.setAttribute("lessonList",lessonDAO.query(0)); //ȫγб + return mapping.findForward("taoTiModifyQuery"); + } + //޸ + private ActionForward taoTiModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + TaoTiForm taoTiForm = (TaoTiForm) form; + int ret = taoTiDAO.update(taoTiForm); + if (ret == 0) { + request.setAttribute("error", "޸ʧܣ"); + return mapping.findForward("error"); + } else { + return mapping.findForward("taoTiModify"); + } + } + // ɾ + private ActionForward taoTiDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + TaoTiForm taoTiForm = (TaoTiForm) form; + int ret = taoTiDAO.delete(taoTiForm); + if (ret == 0) { + request.setAttribute("error", "ɾʧܣ"); + return mapping.findForward("error"); + } else { + return mapping.findForward("taoTiDel"); + } + } +} \ No newline at end of file diff --git a/06/src/com/wgh/action/temp.java b/06/src/com/wgh/action/temp.java new file mode 100644 index 0000000..9879501 --- /dev/null +++ b/06/src/com/wgh/action/temp.java @@ -0,0 +1,34 @@ +package com.wgh.action; + +import com.wgh.core.ChStr; + +public class temp { + + /** + * @param args + */ + public static void main(String[] args) { + ChStr chStr=new ChStr(); + // TODO Զɷ + long a=new java.util.Date().getTime(); + + System.out.println(a); + long sum=0; + for(long i=0;i<1000000000;i++){ + sum=sum+i; + } + long b=new java.util.Date().getTime(); + System.out.println(b); + System.out.println(b-a); + int h=(int)Math.abs((b-a+10000)/3600000); + String hour=chStr.formatNO(h,2); + int m=(int)(b-a+10000)%3600000/60000; + String minute=chStr.formatNO(m,2); + int s=(int)((b-a+10000)%3600000)%60000/1000; + String second=chStr.formatNO(s,2); + + System.out.println(hour+":"+minute+":"+second); + + } + +} diff --git a/06/src/com/wgh/actionForm/LessonForm.java b/06/src/com/wgh/actionForm/LessonForm.java new file mode 100644 index 0000000..92ce4d5 --- /dev/null +++ b/06/src/com/wgh/actionForm/LessonForm.java @@ -0,0 +1,45 @@ +package com.wgh.actionForm; + +import java.util.Date; +import org.apache.struts.action.ActionForm; + +/** + * MyEclipse Struts + * Creation date: 12-14-2007 + * + * XDoclet definition: + * @struts.form name="lessonForm" + */ +public class LessonForm extends ActionForm { + private Date joinTime; + private String name; + private int ID; + private String[] delIdArray=new String[0]; + + public Date getJoinTime() { + return joinTime; + } + public void setJoinTime(Date joinTime) { + this.joinTime = joinTime; + } + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + public int getID() { + return ID; + } + public void setID(int ID) { + this.ID = ID; + } + public String[] getDelIdArray(){ + return delIdArray; + } + public void setDelIdArray(String[] delIdArray){ + this.delIdArray=delIdArray; + } +} \ No newline at end of file diff --git a/06/src/com/wgh/actionForm/ManagerForm.java b/06/src/com/wgh/actionForm/ManagerForm.java new file mode 100644 index 0000000..1e31bf0 --- /dev/null +++ b/06/src/com/wgh/actionForm/ManagerForm.java @@ -0,0 +1,34 @@ +package com.wgh.actionForm; + +import org.apache.struts.action.ActionForm; + +public class ManagerForm extends ActionForm { + private int ID; //ID + private String pwd; // + private String name; //Ա + private String oldpwd; //ԭ + public int getID() { + return ID; + } + public void setID(int ID) { + this.ID = ID; + } + public String getPwd() { + return pwd; + } + public void setPwd(String pwd) { + this.pwd = pwd; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getOldpwd() { + return oldpwd; + } + public void setOldpwd(String oldpwd) { + this.oldpwd = oldpwd; + } +} \ No newline at end of file diff --git a/06/src/com/wgh/actionForm/MoreSelect.java b/06/src/com/wgh/actionForm/MoreSelect.java new file mode 100644 index 0000000..9a95032 --- /dev/null +++ b/06/src/com/wgh/actionForm/MoreSelect.java @@ -0,0 +1,12 @@ +package com.wgh.actionForm; + + +public class MoreSelect{ + private String[] answerArr=new String[4]; + public String[] getAnswerArr(){ + return answerArr; + } + public void setAnswerArr(String[] answerArr){ + this.answerArr=answerArr; + } +} diff --git a/06/src/com/wgh/actionForm/QueryResultIfForm.java b/06/src/com/wgh/actionForm/QueryResultIfForm.java new file mode 100644 index 0000000..48406e5 --- /dev/null +++ b/06/src/com/wgh/actionForm/QueryResultIfForm.java @@ -0,0 +1,22 @@ +package com.wgh.actionForm; + +import org.apache.struts.action.ActionForm; + +public class QueryResultIfForm extends ActionForm { + private String queryIf; + private String key; + + + public String getQueryIf() { + return queryIf; + } + public void setQueryIf(String queryIf) { + this.queryIf = queryIf; + } + public String getKey() { + return key; + } + public void setKey(String key) { + this.key = key; + } +} diff --git a/06/src/com/wgh/actionForm/QuestionsForm.java b/06/src/com/wgh/actionForm/QuestionsForm.java new file mode 100644 index 0000000..c55f6d4 --- /dev/null +++ b/06/src/com/wgh/actionForm/QuestionsForm.java @@ -0,0 +1,172 @@ +package com.wgh.actionForm; + +import java.util.Date; +import javax.servlet.http.HttpServletRequest; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionMapping; + +/** + * MyEclipse Struts + * Creation date: 12-15-2007 + * + * XDoclet definition: + * @struts.form name="questionsForm" + */ +public class QuestionsForm extends ActionForm { + private String optionD; + private String optionC; + private String optionB; + private String optionA; + private int taoTiId; + private int lessonId; + private Date joinTime; + private String subject; + private String answer; + private int ID; + private String type; + private String note; + private String[] delIdArray=new String[0]; + private int[] idArrS; //¼ѡID + private int[] idArrM; //¼ѡID + private String[] answerArr=new String[0]; + private String[] answerArrS; +// private Object[] answerArrM=new Object[0]; + private MoreSelect[] moreSelect; + + public String getOptionD() { + return optionD; + } + public void setOptionD(String optionD) { + this.optionD = optionD; + } + + public String getOptionC() { + return optionC; + } + public void setOptionC(String optionC) { + this.optionC = optionC; + } + + public String getOptionB() { + return optionB; + } + public void setOptionB(String optionB) { + this.optionB = optionB; + } + + public String getOptionA() { + return optionA; + } + public void setOptionA(String optionA) { + this.optionA = optionA; + } + + public int getTaoTiId() { + return taoTiId; + } + public void setTaoTiId(int taoTiId) { + this.taoTiId = taoTiId; + } + + public int getLessonId() { + return lessonId; + } + public void setLessonId(int lessonId) { + this.lessonId = lessonId; + } + + public Date getJoinTime() { + return joinTime; + } + public void setJoinTime(Date joinTime) { + this.joinTime = joinTime; + } + + public String getSubject() { + return subject; + } + public void setSubject(String subject) { + this.subject = subject; + } + + public String getAnswer() { + return answer; + } + public void setAnswer(String answer) { + this.answer = answer; + } + + public int getID() { + return ID; + } + public void setID(int ID) { + this.ID = ID; + } + + public String getType() { + return type; + } + public void setType(String type) { + this.type = type; + } + + public String getNote() { + return note; + } + public void setNote(String note) { + this.note = note; + } + public String[] getDelIdArray(){ + return delIdArray; + } + public void setDelIdArray(String[] delIdArray){ + this.delIdArray=delIdArray; + } + + public int[] getIdArrS(){ + return idArrS; + } + public void setIdArrS(int[] idArrS){ + this.idArrS=idArrS; + } + + public int[] getIdArrM(){ + return idArrM; + } + public void setIdArrM(int[] idArrM){ + this.idArrM=idArrM; + } + + public String[] getAnswerArr(){ + return answerArr; + } + public void setAnswerArr(String[] answerArr){ + this.answerArr=answerArr; + } + public String[] getAnswerArrS(){ + return answerArrS; + } + public void setAnswerArrS(String[] answerArrS){ + this.answerArrS=answerArrS; + } + public void setSize(int size){ + answerArrS=new String[size]; + idArrS=new int[size]; + System.out.println("ѡС"+answerArrS.length); + } + + public MoreSelect[] getMoreSelect() { + return moreSelect; + } + public void setMoreSelect(MoreSelect[] moreSelect) { + this.moreSelect = moreSelect; + } + public void setMoreSize(int size){ + idArrM=new int[size]; + moreSelect=new MoreSelect[size]; + for(int i=0;i1) AND" + + " name not in (SELECT distinct whichLesson FROM tb_stuResult WHERE stuId='"+studentID+"')"; + //String sql="SELECT distinct l.* FROM tb_lesson l INNER JOIN tb_questions q ON l.id=q.LessonId WHERE name not in (SELECT distinct whichLesson FROM tb_stuResult WHERE stuId='"+studentID+"')"; + ResultSet rs = conn.executeQuery(sql); + try { + while (rs.next()) { + lessonForm1 = new LessonForm(); + lessonForm1.setID(rs.getInt(1)); + lessonForm1.setName(rs.getString(2)); + lessonList.add(lessonForm1); + } + } catch (Exception ex) {} + return lessonList; + } + +// ɾ + public int delete(LessonForm lessonForm) { + int flag=0; + String[] delId=lessonForm.getDelIdArray(); + if (delId.length>0){ + String id=""; + for(int i=0;i0){ + String str=""; + for(int i=0;i0){ + String str=""; + for(int i=0;i0){ + String sql="SELECT * FROM tb_taoTi WHERE id="+id+""; + ResultSet rs=conn.executeQuery(sql); + try { + if(rs.next()) { + taoTiName=rs.getString(2); + } + } catch (Exception e) { + e.printStackTrace(); + }finally{ + conn.close(); + } + } + return taoTiName; + } +// ɾ + public int delete(QuestionsForm questionsForm) { + int flag=0; + String[] delId=questionsForm.getDelIdArray(); + if (delId.length>0){ + String id=""; + for(int i=0;i1)as temp" + + " WHERE lessonID="+lessonID+""; + ResultSet rs = conn.executeQuery(sql); + int i=0; + try { + rs.last(); + int recordNum=rs.getRow(); + rs.first(); + int[] id=new int[recordNum]; + do { + id[i]=rs.getInt(1); + i++; + }while (rs.next()); + int rand=Math.abs(new Random().nextInt(id.length)); + questionsID=id[rand]; + } catch (Exception ex) { + ex.printStackTrace(); + } + return questionsID; + } + //տʼʱ濼Խ + public int startSaveResult(String studentID,int lessonID){ + String lesson=((LessonForm)lessonDAO.query(lessonID).get(0)).getName(); + String sql="INSERT INTO tb_stuResult (stuId,whichLesson,resSingle,resMore) values('"+studentID+"','"+lesson+"',0,0)"; + System.out.println("տʼʱ濼ԽSQL䣺"+sql); + int ret=conn.executeUpdate(sql); + return ret; + } + //Խ󱣴濼Խ + public int saveResult(String studentID,int lessonID,int resSingle,int resMore){ + String lesson=((LessonForm)lessonDAO.query(lessonID).get(0)).getName(); + String sql="UPDATE tb_stuResult set resSingle="+resSingle+",resMore="+resMore+" WHERE stuId='"+studentID+"' AND whichLesson='"+lesson+"'"; + System.out.println(sql); + int ret=conn.executeUpdate(sql); + return ret; + } + public List queryExam(int questionsID,int flag){ + List questionsList = new ArrayList(); + QuestionsForm questionsForm1 = null; + String sql=""; + if(flag==0){ + sql = "SELECT * FROM tb_questions WHERE taoTiID="+questionsID+" AND type='ѡ'"; + }else{ + sql = "SELECT * FROM tb_questions WHERE taoTiID="+questionsID+" AND type='ѡ'"; + } + ResultSet rs = conn.executeQuery(sql); + String type=""; + int id=0; + try { + rs.last(); + int recordNum=rs.getRow(); + rs.first(); + int[] idArr=new int[recordNum]; + for(int i=0;i0){ + String id="'"; + for(int i=0;i0){ + String sql="SELECT * FROM tb_lesson WHERE id="+id+""; + ResultSet rs=conn.executeQuery(sql); + try { + if(rs.next()) { + lessonName=rs.getString(2); + } + } catch (Exception ex) {} + } + return lessonName; + } +// ɾ + public int delete(TaoTiForm taoTiForm) { + int flag=0; + String[] delId=taoTiForm.getDelIdArray(); + if (delId.length>0){ + String id=""; + for(int i=0;i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/07/.mymetadata b/07/.mymetadata new file mode 100644 index 0000000..12f7c71 --- /dev/null +++ b/07/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/07/.project b/07/.project new file mode 100644 index 0000000..9891873 --- /dev/null +++ b/07/.project @@ -0,0 +1,50 @@ + + + 07 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/07/.settings/.jsdtscope b/07/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/07/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/07/.settings/org.eclipse.jdt.core.prefs b/07/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..e2fb092 --- /dev/null +++ b/07/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Fri Feb 25 16:17:20 CST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/07/.settings/org.eclipse.wst.jsdt.ui.superType.container b/07/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/07/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/07/.settings/org.eclipse.wst.jsdt.ui.superType.name b/07/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/07/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/07/WebRoot/Css/style.css b/07/WebRoot/Css/style.css new file mode 100644 index 0000000..293ebae --- /dev/null +++ b/07/WebRoot/Css/style.css @@ -0,0 +1,117 @@ + + \ No newline at end of file diff --git a/07/WebRoot/Database/db_Material_Data.MDF b/07/WebRoot/Database/db_Material_Data.MDF new file mode 100644 index 0000000..b2db029 Binary files /dev/null and b/07/WebRoot/Database/db_Material_Data.MDF differ diff --git a/07/WebRoot/Database/db_Material_Log.LDF b/07/WebRoot/Database/db_Material_Log.LDF new file mode 100644 index 0000000..c869671 Binary files /dev/null and b/07/WebRoot/Database/db_Material_Log.LDF differ diff --git a/07/WebRoot/JS/check.jsp b/07/WebRoot/JS/check.jsp new file mode 100644 index 0000000..ac39ef9 --- /dev/null +++ b/07/WebRoot/JS/check.jsp @@ -0,0 +1,27 @@ +//жûǷϷ +function check(myform){ + if(myform.author.value==""){ + alert("˲Ϊ!");myform.author.focus();return; + } + if (myform.email.value!=""){ + var i=myform.email.value.indexOf("@"); + var j=myform.email.value.indexOf("."); + if((i<0)||(i-j>0)||(j<0)){ + alert("Emailַȷ룡");myform.email.value="";myform.email.focus();return; + } + } + if(myform.content.value==""){ + alert("ݲΪգ");myform.content.focus();return; + } + myform.submit(); +} + +function checkM(myform){ + if(myform.name.value==""){ + alert("Ա!");myform.name.focus();return; + } + if(myform.pwd.value==""){ + alert("!");myform.pwd.focus();return; + } + myform.submit(); +} diff --git a/07/WebRoot/JS/function.js b/07/WebRoot/JS/function.js new file mode 100644 index 0000000..dc6d3df --- /dev/null +++ b/07/WebRoot/JS/function.js @@ -0,0 +1,83 @@ +//жǷȷ +function CheckDate(INDate) { + if (INDate == "") // Ϊ + { + return true; + } + subYY = INDate.substr(0, 4) // ȡڵǰ4λ + if (isNaN(subYY) || subYY <= 0) { // IJֻǸ + return true; + } + // ת·ݣֵĵ0λʼңжǷַ"-"нseparateֵΪ"-" + if (INDate.indexOf('-', 0) != -1) { + separate = "-" + } else { + if (INDate.indexOf('/', 0) != -1) { + separate = "/" + }// ûַ"-"ôseparateֵΪ"/" + else { + return true; + }// ߾ѯ򷵻true + } + area = INDate.indexOf(separate, 0)// ַĵһλÿʼңضַλ + subMM = INDate.substr(area + 1, INDate.indexOf(separate, area + 1) + - (area + 1)) + if (isNaN(subMM) || subMM <= 0) { + return true; + } + if (subMM.length < 2) { + subMM = "0" + subMM + }// ·ֻ1λôǰ"0" + // ת + area = INDate.lastIndexOf(separate)// ַһλʼңضַλ + subDD = INDate.substr(area + 1, INDate.length - area - 1) + if (isNaN(subDD) || subDD <= 0) { + return true; + } + if (eval(subDD) < 10) { + subDD = "0" + eval(subDD) + } // Ϊֱʽֵַ + NewDate = subYY + "-" + subMM + "-" + subDD + if (NewDate.length != 10) { + return true; + } // ڵijС10 + if (NewDate.substr(4, 1) != "-") { + return true; + } // ڵĵ5λ"-" + if (NewDate.substr(7, 1) != "-") { + return true; + } // ڵĵ8λ"-" + var MM = NewDate.substr(5, 2); // ӵ5λʼȡַȡ2Ϊ· + var DD = NewDate.substr(8, 2); // ӵ8λʼȡַȡ2Ϊ + // жǷΪܱ꣨4Ҳܱ100ֻܱ400ݾΪ꣩ + if ((subYY % 4 == 0 && subYY % 100 != 0) || subYY % 400 == 0) { // жǷΪ + if (parseInt(MM) == 2) { // MMתΪ + if (DD > 29) { + return true; + } + } + } else { + if (parseInt(MM) == 2) { + if (DD > 28) { + return true; + } + } + } + var mm = new Array(1, 3, 5, 7, 8, 10, 12); // жÿе + for (i = 0; i < mm.length; i++) { + if (parseInt(MM, 10) == mm[i]) { // ж·ǷΪеֵ + if (parseInt(DD) > 31) { + return true; + } else { + return false; + } + } + } + if (parseInt(DD) > 30) { + return true; + } + if (parseInt(MM) > 12) { + return true; + }// ·ݴ12 + return false; // 򷵻false +} diff --git a/07/WebRoot/JS/menu.JS b/07/WebRoot/JS/menu.JS new file mode 100644 index 0000000..950188f --- /dev/null +++ b/07/WebRoot/JS/menu.JS @@ -0,0 +1,205 @@ +var menuOffX=0 //˵˾ +var menuOffY=18 //˵ֶ˾ +var fo_shadows=new Array() +var linkset=new Array() +var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1 +var ns6=document.getElementById&&!document.all +var ns4=document.layers +function openScript(url, width, height){ + var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=no' ); +} +function showmenu(e,vmenu,mod){ + if (!document.all&&!document.getElementById&&!document.layers) + return + which=vmenu + clearhidemenu() + ie_clearshadow() + menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : "" + menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj + + if (ie4||ns6) + menuobj.innerHTML=which + else{ + menuobj.document.write(''+which+'') + menuobj.document.close() + } + menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width + menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height + + eventX=ie4? event.clientX : ns6? e.clientX : e.x + eventY=ie4? event.clientY : ns6? e.clientY : e.y + + var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX + var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY + if (rightedge0; i--) + { + var rect = document.createElement('div'); + var rs = rect.style + rs.position = 'absolute'; + rs.left = (el.style.posLeft + i) + 'px'; + rs.top = (el.style.posTop + i) + 'px'; + rs.width = el.offsetWidth + 'px'; + rs.height = el.offsetHeight + 'px'; + rs.zIndex = el.style.zIndex - i; + rs.backgroundColor = color; + var opacity = 1 - i / (i + 1); + rs.filter = 'alpha(opacity=' + (100 * opacity) + ')'; + fo_shadows[fo_shadows.length] = rect; + } +} +function ie_clearshadow() +{ + for(var i=0;i + \ No newline at end of file diff --git a/07/WebRoot/WEB-INF/classes/ApplicationResources.properties b/07/WebRoot/WEB-INF/classes/ApplicationResources.properties new file mode 100644 index 0000000..e69de29 diff --git a/07/WebRoot/WEB-INF/classes/com/action/Branch.class b/07/WebRoot/WEB-INF/classes/com/action/Branch.class new file mode 100644 index 0000000..ba297d3 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/action/Branch.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/action/Cart.class b/07/WebRoot/WEB-INF/classes/com/action/Cart.class new file mode 100644 index 0000000..4b0d774 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/action/Cart.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/action/Damage.class b/07/WebRoot/WEB-INF/classes/com/action/Damage.class new file mode 100644 index 0000000..9631744 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/action/Damage.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/action/GetUse.class b/07/WebRoot/WEB-INF/classes/com/action/GetUse.class new file mode 100644 index 0000000..12cdb88 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/action/GetUse.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/action/Goods.class b/07/WebRoot/WEB-INF/classes/com/action/Goods.class new file mode 100644 index 0000000..72e8d36 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/action/Goods.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/action/IfDeal.class b/07/WebRoot/WEB-INF/classes/com/action/IfDeal.class new file mode 100644 index 0000000..42c376f Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/action/IfDeal.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/action/Instorage.class b/07/WebRoot/WEB-INF/classes/com/action/Instorage.class new file mode 100644 index 0000000..1dd15d7 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/action/Instorage.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/action/Loan.class b/07/WebRoot/WEB-INF/classes/com/action/Loan.class new file mode 100644 index 0000000..fc8532a Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/action/Loan.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/action/Provider.class b/07/WebRoot/WEB-INF/classes/com/action/Provider.class new file mode 100644 index 0000000..4025c57 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/action/Provider.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/action/SelfRequestProcessor.class b/07/WebRoot/WEB-INF/classes/com/action/SelfRequestProcessor.class new file mode 100644 index 0000000..edefc48 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/action/SelfRequestProcessor.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/action/User.class b/07/WebRoot/WEB-INF/classes/com/action/User.class new file mode 100644 index 0000000..c81ab36 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/action/User.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/BranchForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/BranchForm.class new file mode 100644 index 0000000..704b023 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/BranchForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/BranchForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/BranchForm.hbm.xml new file mode 100644 index 0000000..ef92435 --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/BranchForm.hbm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/CheckForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/CheckForm.class new file mode 100644 index 0000000..6db1651 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/CheckForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/CheckForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/CheckForm.hbm.xml new file mode 100644 index 0000000..5ffeccf --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/CheckForm.hbm.xml @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/DamageForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/DamageForm.class new file mode 100644 index 0000000..a550b88 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/DamageForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/DamageForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/DamageForm.hbm.xml new file mode 100644 index 0000000..2f69c47 --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/DamageForm.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/GetUseForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/GetUseForm.class new file mode 100644 index 0000000..514d27c Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/GetUseForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/GetUseForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/GetUseForm.hbm.xml new file mode 100644 index 0000000..2c6ee8f --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/GetUseForm.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/GoodsForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/GoodsForm.class new file mode 100644 index 0000000..edc88cf Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/GoodsForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/GoodsForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/GoodsForm.hbm.xml new file mode 100644 index 0000000..567023d --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/GoodsForm.hbm.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/IfForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/IfForm.class new file mode 100644 index 0000000..ecb6015 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/IfForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/InStorageForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/InStorageForm.class new file mode 100644 index 0000000..9e82344 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/InStorageForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/InStorageForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/InStorageForm.hbm.xml new file mode 100644 index 0000000..573fa75 --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/InStorageForm.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/LoanForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/LoanForm.class new file mode 100644 index 0000000..c04006b Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/LoanForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/LoanForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/LoanForm.hbm.xml new file mode 100644 index 0000000..0acb73f --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/LoanForm.hbm.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/ProviderForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/ProviderForm.class new file mode 100644 index 0000000..c275ed0 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/ProviderForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/ProviderForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/ProviderForm.hbm.xml new file mode 100644 index 0000000..a567f00 --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/ProviderForm.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/StockDetailForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/StockDetailForm.class new file mode 100644 index 0000000..6766a9f Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/StockDetailForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/StockDetailForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/StockDetailForm.hbm.xml new file mode 100644 index 0000000..573a66d --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/StockDetailForm.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/StockGoodsForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/StockGoodsForm.class new file mode 100644 index 0000000..d0a4dce Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/StockGoodsForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainForm.class new file mode 100644 index 0000000..b03a0fb Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainForm.hbm.xml new file mode 100644 index 0000000..29d4103 --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainForm.hbm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainViewForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainViewForm.class new file mode 100644 index 0000000..c8136a8 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainViewForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainViewForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainViewForm.hbm.xml new file mode 100644 index 0000000..f3be55a --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/StockMainViewForm.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/StorageForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/StorageForm.class new file mode 100644 index 0000000..8dca8a2 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/StorageForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/StorageForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/StorageForm.hbm.xml new file mode 100644 index 0000000..53179ec --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/StorageForm.hbm.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/UserForm.class b/07/WebRoot/WEB-INF/classes/com/actionForm/UserForm.class new file mode 100644 index 0000000..0b9e326 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/actionForm/UserForm.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/actionForm/UserForm.hbm.xml b/07/WebRoot/WEB-INF/classes/com/actionForm/UserForm.hbm.xml new file mode 100644 index 0000000..912166e --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/com/actionForm/UserForm.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/classes/com/core/GetTime.class b/07/WebRoot/WEB-INF/classes/com/core/GetTime.class new file mode 100644 index 0000000..89cc642 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/core/GetTime.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/core/MySession.class b/07/WebRoot/WEB-INF/classes/com/core/MySession.class new file mode 100644 index 0000000..a00396f Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/core/MySession.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/dao/BranchDAO.class b/07/WebRoot/WEB-INF/classes/com/dao/BranchDAO.class new file mode 100644 index 0000000..3cf2285 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/dao/BranchDAO.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/dao/GoodsDAO.class b/07/WebRoot/WEB-INF/classes/com/dao/GoodsDAO.class new file mode 100644 index 0000000..5917043 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/dao/GoodsDAO.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/dao/InstorageDAO.class b/07/WebRoot/WEB-INF/classes/com/dao/InstorageDAO.class new file mode 100644 index 0000000..18f0a55 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/dao/InstorageDAO.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/dao/OutStorageDAO.class b/07/WebRoot/WEB-INF/classes/com/dao/OutStorageDAO.class new file mode 100644 index 0000000..c761cb4 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/dao/OutStorageDAO.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/dao/ProviderDAO.class b/07/WebRoot/WEB-INF/classes/com/dao/ProviderDAO.class new file mode 100644 index 0000000..2ceb6be Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/dao/ProviderDAO.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/dao/QueryDAO.class b/07/WebRoot/WEB-INF/classes/com/dao/QueryDAO.class new file mode 100644 index 0000000..2d120d1 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/dao/QueryDAO.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/dao/SysDAO.class b/07/WebRoot/WEB-INF/classes/com/dao/SysDAO.class new file mode 100644 index 0000000..16df7d7 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/dao/SysDAO.class differ diff --git a/07/WebRoot/WEB-INF/classes/com/dao/UserDAO.class b/07/WebRoot/WEB-INF/classes/com/dao/UserDAO.class new file mode 100644 index 0000000..1682eb6 Binary files /dev/null and b/07/WebRoot/WEB-INF/classes/com/dao/UserDAO.class differ diff --git a/07/WebRoot/WEB-INF/classes/hibernate.cfg.xml b/07/WebRoot/WEB-INF/classes/hibernate.cfg.xml new file mode 100644 index 0000000..78f2f08 --- /dev/null +++ b/07/WebRoot/WEB-INF/classes/hibernate.cfg.xml @@ -0,0 +1,30 @@ + + + + + + com.microsoft.sqlserver.jdbc.SQLServerDriver + + + jdbc:sqlserver://localhost:1433;DatabaseName=db_Material + + sa + + false + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/lib/antlr.jar b/07/WebRoot/WEB-INF/lib/antlr.jar new file mode 100644 index 0000000..8850fc6 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/antlr.jar differ diff --git a/07/WebRoot/WEB-INF/lib/c3p0-0.9.1.jar b/07/WebRoot/WEB-INF/lib/c3p0-0.9.1.jar new file mode 100644 index 0000000..693667a Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/c3p0-0.9.1.jar differ diff --git a/07/WebRoot/WEB-INF/lib/cglib-2.2.jar b/07/WebRoot/WEB-INF/lib/cglib-2.2.jar new file mode 100644 index 0000000..084ef6e Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/cglib-2.2.jar differ diff --git a/07/WebRoot/WEB-INF/lib/commons-beanutils.jar b/07/WebRoot/WEB-INF/lib/commons-beanutils.jar new file mode 100644 index 0000000..b1b89c9 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/commons-beanutils.jar differ diff --git a/07/WebRoot/WEB-INF/lib/commons-collections-3.1.jar b/07/WebRoot/WEB-INF/lib/commons-collections-3.1.jar new file mode 100644 index 0000000..41e230f Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/commons-collections-3.1.jar differ diff --git a/07/WebRoot/WEB-INF/lib/commons-digester.jar b/07/WebRoot/WEB-INF/lib/commons-digester.jar new file mode 100644 index 0000000..9765493 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/commons-digester.jar differ diff --git a/07/WebRoot/WEB-INF/lib/commons-fileupload.jar b/07/WebRoot/WEB-INF/lib/commons-fileupload.jar new file mode 100644 index 0000000..1ca4a9c Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/commons-fileupload.jar differ diff --git a/07/WebRoot/WEB-INF/lib/commons-logging.jar b/07/WebRoot/WEB-INF/lib/commons-logging.jar new file mode 100644 index 0000000..b73a80f Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/commons-logging.jar differ diff --git a/07/WebRoot/WEB-INF/lib/commons-validator.jar b/07/WebRoot/WEB-INF/lib/commons-validator.jar new file mode 100644 index 0000000..bf76e86 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/commons-validator.jar differ diff --git a/07/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar b/07/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..c8c4dbb Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/07/WebRoot/WEB-INF/lib/ehcache-1.5.0.jar b/07/WebRoot/WEB-INF/lib/ehcache-1.5.0.jar new file mode 100644 index 0000000..1a83c6a Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/ehcache-1.5.0.jar differ diff --git a/07/WebRoot/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar b/07/WebRoot/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar new file mode 100644 index 0000000..4c9ac4e Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar differ diff --git a/07/WebRoot/WEB-INF/lib/hibernate3.jar b/07/WebRoot/WEB-INF/lib/hibernate3.jar new file mode 100644 index 0000000..7275ad6 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/hibernate3.jar differ diff --git a/07/WebRoot/WEB-INF/lib/infinispan-core-4.2.0.ALPHA1.jar b/07/WebRoot/WEB-INF/lib/infinispan-core-4.2.0.ALPHA1.jar new file mode 100644 index 0000000..20b1041 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/infinispan-core-4.2.0.ALPHA1.jar differ diff --git a/07/WebRoot/WEB-INF/lib/jakarta-oro.jar b/07/WebRoot/WEB-INF/lib/jakarta-oro.jar new file mode 100644 index 0000000..ed6c60a Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/jakarta-oro.jar differ diff --git a/07/WebRoot/WEB-INF/lib/javassist-3.12.0.GA.jar b/07/WebRoot/WEB-INF/lib/javassist-3.12.0.GA.jar new file mode 100644 index 0000000..8f692f4 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/javassist-3.12.0.GA.jar differ diff --git a/07/WebRoot/WEB-INF/lib/jbosscache-core-3.2.1.GA.jar b/07/WebRoot/WEB-INF/lib/jbosscache-core-3.2.1.GA.jar new file mode 100644 index 0000000..44e5750 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/jbosscache-core-3.2.1.GA.jar differ diff --git a/07/WebRoot/WEB-INF/lib/jta-1.1.jar b/07/WebRoot/WEB-INF/lib/jta-1.1.jar new file mode 100644 index 0000000..6d225b7 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/jta-1.1.jar differ diff --git a/07/WebRoot/WEB-INF/lib/oscache-2.1.jar b/07/WebRoot/WEB-INF/lib/oscache-2.1.jar new file mode 100644 index 0000000..4496a88 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/oscache-2.1.jar differ diff --git a/07/WebRoot/WEB-INF/lib/proxool-0.8.3.jar b/07/WebRoot/WEB-INF/lib/proxool-0.8.3.jar new file mode 100644 index 0000000..c4f700c Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/proxool-0.8.3.jar differ diff --git a/07/WebRoot/WEB-INF/lib/slf4j-api-1.6.1.jar b/07/WebRoot/WEB-INF/lib/slf4j-api-1.6.1.jar new file mode 100644 index 0000000..f1f4fdd Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/slf4j-api-1.6.1.jar differ diff --git a/07/WebRoot/WEB-INF/lib/sqljdbc.jar b/07/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/07/WebRoot/WEB-INF/lib/struts.jar b/07/WebRoot/WEB-INF/lib/struts.jar new file mode 100644 index 0000000..7815901 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/struts.jar differ diff --git a/07/WebRoot/WEB-INF/lib/swarmcache-1.0RC2.jar b/07/WebRoot/WEB-INF/lib/swarmcache-1.0RC2.jar new file mode 100644 index 0000000..f0cb0d0 Binary files /dev/null and b/07/WebRoot/WEB-INF/lib/swarmcache-1.0RC2.jar differ diff --git a/07/WebRoot/WEB-INF/struts-config.xml b/07/WebRoot/WEB-INF/struts-config.xml new file mode 100644 index 0000000..81f984a --- /dev/null +++ b/07/WebRoot/WEB-INF/struts-config.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/07/WebRoot/WEB-INF/web.xml b/07/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..2e0c8f2 --- /dev/null +++ b/07/WebRoot/WEB-INF/web.xml @@ -0,0 +1,28 @@ + + + 07 + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts-config.xml + + + debug + 3 + + + detail + 3 + + 3 + + + action + *.do + + + diff --git a/07/WebRoot/branchAdd.jsp b/07/WebRoot/branchAdd.jsp new file mode 100644 index 0000000..be750df --- /dev/null +++ b/07/WebRoot/branchAdd.jsp @@ -0,0 +1,71 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϢ > Ź > ӲϢ >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + +
    ƣ
        
        ע
      + +  + +  +
    +
    +
     
    +
    <%@ include file="copyright.jsp"%>
    + + + diff --git a/07/WebRoot/branchList.jsp b/07/WebRoot/branchList.jsp new file mode 100644 index 0000000..71ab146 --- /dev/null +++ b/07/WebRoot/branchList.jsp @@ -0,0 +1,85 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> +<%@ page import="com.actionForm.BranchForm" %> +<%@ page import="java.util.List" %> +<%@ page import="java.util.Iterator"%> + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϢ > Ź >>>
    + + + + + + +
       + + + + +
    ӲϢ
    +<% +List list=(List)request.getAttribute("branchList"); + if(list.size()<=0){%> + + + + +
    ޲Ϣ!
    + <%}else{%> + + + + + + + + <% +Iterator it=list.iterator(); +int id=-1; +String name=""; +String tel=""; +String memo=""; +while(it.hasNext()){ + BranchForm branchForm=(BranchForm)it.next(); + id=branchForm.getId(); + name=branchForm.getName(); + tel=branchForm.getTel(); + memo=branchForm.getMemo(); +%> + + + + + + + <%}%> +
    עɾ
     <%=name %> <%=tel%> <%=memo%>   + ɾ
    + <%}%> +
     
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/07/WebRoot/branchTotal.jsp b/07/WebRoot/branchTotal.jsp new file mode 100644 index 0000000..c38f7ce --- /dev/null +++ b/07/WebRoot/branchTotal.jsp @@ -0,0 +1,158 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.GetUseForm"%> +<%@page import="com.actionForm.BranchForm"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãѯͳ + > + Ż + >>>
    + + + + + + +
       + + + + +
    +
    + + + + + +
      +ͳʱ䣺 + + + +(ڸʽΪ2011-07-05) +
    +
    +<% +List list=(List)request.getAttribute("branchTotal"); +System.out.println("LIST SIZE:"+list.size()); +if(list.size()==0){ +%> + + + + +
    ûзIJϢ
    + <% +}else{ + String sDate=(String)request.getAttribute("sDate"); + String eDate=(String)request.getAttribute("eDate"); + String message=""; + if(sDate==null || sDate.equals("")){ + message="ȫŻϢ"; + }else{ + message=""+sDate+""+eDate+"֮IJŻϢ"; + } + String goodsname=""; + String spec=""; + String unit=""; + float price=0.0f; + String branchname=""; + int lyamount=0; + int bsamount=0; + int zyamount=0; + %> + + + + +
    <%=message%>
    + + + + + + + + + + + + + +<% +for(int i=0;i + + + + + + + + + + + + +<%}%> +
    []λýý
    <%=branchname%><%=goodsname%>[<%=spec%>]<%=unit%><%=price%><%=lyamount%><%=price*lyamount%><%=bsamount%><%=price*bsamount%><%=zyamount%><%=price*zyamount%>
    +<%}%> +
    + +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/branch_ok.jsp b/07/WebRoot/branch_ok.jsp new file mode 100644 index 0000000..733b7c0 --- /dev/null +++ b/07/WebRoot/branch_ok.jsp @@ -0,0 +1,28 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/07/WebRoot/copyright.jsp b/07/WebRoot/copyright.jsp new file mode 100644 index 0000000..510aeed --- /dev/null +++ b/07/WebRoot/copyright.jsp @@ -0,0 +1,16 @@ +<%@ page contentType="text/html; charset=gb2312"%> + + + + + + + + + + + + + + +
      CopyRight © 2011 www.mingrisoft.com ʡտƼ޹˾ 
     վʹIE6.0ϰ汾 1024*768ΪʾЧ 
    diff --git a/07/WebRoot/damageAdd.jsp b/07/WebRoot/damageAdd.jsp new file mode 100644 index 0000000..2c58df3 --- /dev/null +++ b/07/WebRoot/damageAdd.jsp @@ -0,0 +1,184 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.actionForm.BranchForm"%> +<%@page import="com.actionForm.StorageForm"%> +<%@page import="com.dao.OutStorageDAO"%> +<%@page import="com.dao.BranchDAO"%> +<%@page import="java.util.*"%> +<% +boolean flag=false; + + //ȡȫϢ + List listgetuse = null; + OutStorageDAO outStorageDAO = new OutStorageDAO(); + //listgoods = getUseDAO.storage_query(); //ѯ + listgetuse=(List)request.getAttribute("getuse"); + // session.setAttribute("listgoods", listgoods); + //ȡȫϢ + List listbranch = null; + BranchDAO branchDAO = new BranchDAO(); + listbranch = branchDAO.query(null); + if (listgetuse.size() <= 0) { + out.println(""); + } + else if (listbranch.size() <= 0) { + out.println(""); + } + else { +%> + + + + +ʹϵͳ + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãʴ + > ű + >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ƣ
    ң<%=selProducer%>
        ۣ
    ƣ
    + <%=selUnit%>
      ˣ
      Ա" size="20" readonly="yes">
    ԭ
      +
    +
    +
     
    <%@include file="copyright.jsp"%> +
    + + +<%}%> diff --git a/07/WebRoot/damageAddok_ok.jsp b/07/WebRoot/damageAddok_ok.jsp new file mode 100644 index 0000000..47a7e63 --- /dev/null +++ b/07/WebRoot/damageAddok_ok.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/07/WebRoot/damageQuery.jsp b/07/WebRoot/damageQuery.jsp new file mode 100644 index 0000000..6995d5e --- /dev/null +++ b/07/WebRoot/damageQuery.jsp @@ -0,0 +1,164 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.DamageForm"%> +<%@page import="com.actionForm.BranchForm"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãѯͳ + > + űѯ + >>>
    + + + + + + +
       + + + + +
    +
    + + + + + + + + +
     
    + ѡѯݣ + + +
    +ʱ䣺 + + + +(ڸʽΪ2011-07-05) +
    +
    +<% +List list=(List)request.getAttribute("damageQuery"); +System.out.println("LIST SIZE:"+list.size()); +if(list.size()==0){ +%> + + + + +
    ûзIJűϢ
    + <% +}else{ + String goodsname=""; + String username=""; + String createtime=""; + String branchname=""; + String spec=""; + String principal=""; + String cause=""; + int damagenum=0; + String unit=""; + %> + + + + + + + + + + + +<% +for(int i=0;i + + + + + + + + + + +<%}%> +
    ʱԱԭ
     <%=goodsname%> <%=spec%> <%=damagenum%>(<%=unit%>) <%=branchname%> <%=createtime%> <%=principal%><%=username%> <%=cause%>
    +<%}%> +
    + +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/damageTotal.jsp b/07/WebRoot/damageTotal.jsp new file mode 100644 index 0000000..861adb0 --- /dev/null +++ b/07/WebRoot/damageTotal.jsp @@ -0,0 +1,155 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.GetUseForm"%> +<%@page import="com.actionForm.BranchForm"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãѯͳ + > + ű + >>>
    + + + + + + +
       + + + + +
    +
    + + + + + + + + +
     
    + ѡͳݣ + + +   + +
    +ͳʱ䣺 + + + +(ڸʽΪ2011-07-05)
    +
    +<% +List list=(List)request.getAttribute("damageTotal"); +System.out.println("LIST SIZE:"+list.size()); +if(list.size()==0){ +%> + + + + +
    ûзIJűϢ
    + <% +}else{ + String goodsname=""; + String spec=""; + String producer=""; + String branchname=""; + String unit=""; + float price=0.0f; + int amount=0; + %> + + + + + + + + + + +<% +for(int i=0;i + + + + + + + + + +<%}%> +
    []λ
    <%=branchname%><%=goodsname%>[<%=spec%>]<%=producer%><%=unit%><%=price%><%=amount%><%=price*amount%>
    +<%}%> +
    + +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/error.jsp b/07/WebRoot/error.jsp new file mode 100644 index 0000000..0f9a43d --- /dev/null +++ b/07/WebRoot/error.jsp @@ -0,0 +1,31 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> +<% +String error=(String)request.getAttribute("error"); +%> + + + +ʾ + + + + + + + + +
    + + + +
    + + + +
      ʾϢ <%=error%>
    +
    +
    +
    +
    + + diff --git a/07/WebRoot/getUseAdd.jsp b/07/WebRoot/getUseAdd.jsp new file mode 100644 index 0000000..943c984 --- /dev/null +++ b/07/WebRoot/getUseAdd.jsp @@ -0,0 +1,191 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.actionForm.BranchForm"%> +<%@page import="com.actionForm.StorageForm"%> +<%@page import="com.dao.OutStorageDAO"%> +<%@page import="com.dao.BranchDAO"%> +<%@page import="java.util.*"%> +<% +boolean flag=false; + + //ȡȫϢ + List listgoods = null; + OutStorageDAO outStorageDAO = new OutStorageDAO(); + //listgoods = getUseDAO.storage_query(); //ѯ + listgoods=(List)request.getAttribute("GoodsStorage"); + // session.setAttribute("listgoods", listgoods); + //ȡȫϢ + List listbranch = null; + BranchDAO branchDAO = new BranchDAO(); + listbranch = branchDAO.query(null); + if (listgoods.size() <= 0) { + out.println(""); + } + else if (listbranch.size() <= 0) { + out.println(""); + } + else { +%> + + + + +ʹϵͳ + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãʳ + > + >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ƣ
    ң<%=selProducer%>
        ۣ
    + <%=selUnit%>
    + <%=selUnit%>
    ƣ
      ˣ
    ϼƽ
      Ա" size="20" readonly="yes">
      +
    +
    +
     
    <%@include file="copyright.jsp"%> +
    + + +<%}%> diff --git a/07/WebRoot/getUseAdd_ok.jsp b/07/WebRoot/getUseAdd_ok.jsp new file mode 100644 index 0000000..a3990b9 --- /dev/null +++ b/07/WebRoot/getUseAdd_ok.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/07/WebRoot/getuseQuery.jsp b/07/WebRoot/getuseQuery.jsp new file mode 100644 index 0000000..38180d3 --- /dev/null +++ b/07/WebRoot/getuseQuery.jsp @@ -0,0 +1,164 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.GetUseForm"%> +<%@page import="com.actionForm.BranchForm"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãѯͳ + > + òѯ + >>>
    + + + + + + +
       + + + + +
    +
    + + + + + + + + +
     
    + ѡѯݣ + + +
    +ʱ䣺 + + + +(ڸʽΪ2011-07-05) +
    +
    +<% +List list=(List)request.getAttribute("getuseQuery"); +System.out.println("LIST SIZE:"+list.size()); +if(list.size()==0){ +%> + + + + +
    ûзIJϢ
    + <% +}else{ + String goodsname=""; + String username=""; + String createtime=""; + String branchname=""; + String spec=""; + String principal=""; + String gno=""; + int number=0; + String unit=""; + %> + + + + + + + + + + + +<% +for(int i=0;i + + + + + + + + + + +<%}%> +
    IDʱԱ
     <%=gno%> <%=goodsname%> <%=spec%> <%=number%>(<%=unit%>) <%=branchname%> <%=createtime%> <%=principal%><%=username%>
    +<%}%> +
    + +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/getuseTotal.jsp b/07/WebRoot/getuseTotal.jsp new file mode 100644 index 0000000..d44cae2 --- /dev/null +++ b/07/WebRoot/getuseTotal.jsp @@ -0,0 +1,155 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.GetUseForm"%> +<%@page import="com.actionForm.BranchForm"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãѯͳ + > + û + >>>
    + + + + + + +
       + + + + +
    +
    + + + + + + + + +
     
    + ѡͳݣ + + +   + +
    +ͳʱ䣺 + + + +(ڸʽΪ2011-07-05)
    +
    +<% +List list=(List)request.getAttribute("getuseTotal"); +System.out.println("LIST SIZE:"+list.size()); +if(list.size()==0){ +%> + + + + +
    ûзIJϢ
    + <% +}else{ + String goodsname=""; + String spec=""; + String producer=""; + String branchname=""; + String unit=""; + float price=0.0f; + int amount=0; + %> + + + + + + + + + + +<% +for(int i=0;i + + + + + + + + + +<%}%> +
    []λý
    <%=branchname%><%=goodsname%>[<%=spec%>]<%=producer%><%=unit%><%=price%><%=amount%><%=price*amount%>
    +<%}%> +
    + +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/goodsAdd.jsp b/07/WebRoot/goodsAdd.jsp new file mode 100644 index 0000000..822ff60 --- /dev/null +++ b/07/WebRoot/goodsAdd.jsp @@ -0,0 +1,97 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϢ > ʹ > Ϣ >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    ƣ
        
        λ
        ۣ + (Ԫ)
    ң + +
      + +  + +  +
    +
    +
     
    +
    <%@ include file="copyright.jsp"%>
    + + + diff --git a/07/WebRoot/goodsList.jsp b/07/WebRoot/goodsList.jsp new file mode 100644 index 0000000..74b28b5 --- /dev/null +++ b/07/WebRoot/goodsList.jsp @@ -0,0 +1,130 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> +<%@ page import="com.actionForm.GoodsForm" %> +<%@ page import="java.util.List" %> +<%@ page import="java.util.Iterator"%> + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϢ > ʹ >>>
    + + + + + + +
       + + + + +
    Ϣ
    +<% +List list=(List)request.getAttribute("goodslist0"); + if(list.size()<=0){%> + + + + +
    Ϣ!
    + <%}else{%> + + + + + + + + + + <% +Iterator it=list.iterator(); +int id=-1; +String goodsname=""; +String spec=""; +String unit=""; +float price=0; +String producer=""; +Byte ifdel=new Byte("0"); +while(it.hasNext()){ + GoodsForm goodsForm=(GoodsForm)it.next(); + id=goodsForm.getId(); + goodsname=goodsForm.getName(); + spec=goodsForm.getSpec(); + unit=goodsForm.getUnit(); + price=goodsForm.getPrice(); + producer=goodsForm.getProducer(); + ifdel=goodsForm.getIfdel(); +%> + + + + + + + + + <%}%> +
    +
    ƷӦ޸ɾ
     <%=goodsname %> <%=spec%> <%=producer%> <%=price%>(Ԫ)/<%=unit %> ޸ + ɾ +
    + + + + + + + + + + <% +List list1=(List)request.getAttribute("goodslist1"); +Iterator it1=list1.iterator(); +while(it1.hasNext()){ + GoodsForm goodsForm=(GoodsForm)it1.next(); + id=goodsForm.getId(); + goodsname=goodsForm.getName(); + spec=goodsForm.getSpec(); + unit=goodsForm.getUnit(); + price=goodsForm.getPrice(); + producer=goodsForm.getProducer(); + ifdel=goodsForm.getIfdel(); +%> + + + + + + + + + <%}%> +
    Ӧ޸ָ
     <%=goodsname %> <%=spec%> <%=producer%> <%=price%>(Ԫ)/<%=unit %> ޸ + ָ +
    <%}%> +
     
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/07/WebRoot/goodsModify.jsp b/07/WebRoot/goodsModify.jsp new file mode 100644 index 0000000..1f902c3 --- /dev/null +++ b/07/WebRoot/goodsModify.jsp @@ -0,0 +1,116 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> +<%@ page import="com.actionForm.ProviderForm" %> +<%@ page import="com.actionForm.GoodsForm" %> +<%@ page import="java.util.List" %> +<%@ page import="java.util.Iterator"%> +<% +GoodsForm goodsForm=(GoodsForm)request.getAttribute("goodsForm"); +if(goodsForm.getName().equals("") || goodsForm.getName()==null){ + %> + +<%}else{ + int id=goodsForm.getId(); + String goodsname=goodsForm.getName(); + String spec=goodsForm.getSpec(); + String unit=goodsForm.getUnit(); + float price=goodsForm.getPrice(); + String producer=goodsForm.getProducer(); + %> + + + + + ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϢ > ʹ > ޸Ϣ >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    ƣ
        
        λ
        ۣ + (Ԫ)
    ң +
      + +   + +   +
    +
    +
     
    +
    <%@ include file="copyright.jsp"%>
    + + + <% + } +%> diff --git a/07/WebRoot/goods_ok.jsp b/07/WebRoot/goods_ok.jsp new file mode 100644 index 0000000..5efd43e --- /dev/null +++ b/07/WebRoot/goods_ok.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/07/WebRoot/images/area_bg.jpg b/07/WebRoot/images/area_bg.jpg new file mode 100644 index 0000000..67ae38d Binary files /dev/null and b/07/WebRoot/images/area_bg.jpg differ diff --git a/07/WebRoot/images/bg.gif b/07/WebRoot/images/bg.gif new file mode 100644 index 0000000..c175417 Binary files /dev/null and b/07/WebRoot/images/bg.gif differ diff --git a/07/WebRoot/images/bottom.jpg b/07/WebRoot/images/bottom.jpg new file mode 100644 index 0000000..ff25977 Binary files /dev/null and b/07/WebRoot/images/bottom.jpg differ diff --git a/07/WebRoot/images/compart.gif b/07/WebRoot/images/compart.gif new file mode 100644 index 0000000..6c449d2 Binary files /dev/null and b/07/WebRoot/images/compart.gif differ diff --git a/07/WebRoot/images/enforce.gif b/07/WebRoot/images/enforce.gif new file mode 100644 index 0000000..52ab062 Binary files /dev/null and b/07/WebRoot/images/enforce.gif differ diff --git a/07/WebRoot/images/error.jpg b/07/WebRoot/images/error.jpg new file mode 100644 index 0000000..5eb55f0 Binary files /dev/null and b/07/WebRoot/images/error.jpg differ diff --git a/07/WebRoot/images/error_b.gif b/07/WebRoot/images/error_b.gif new file mode 100644 index 0000000..5e1a66c Binary files /dev/null and b/07/WebRoot/images/error_b.gif differ diff --git a/07/WebRoot/images/item_out.gif b/07/WebRoot/images/item_out.gif new file mode 100644 index 0000000..73d19a3 Binary files /dev/null and b/07/WebRoot/images/item_out.gif differ diff --git a/07/WebRoot/images/item_over.gif b/07/WebRoot/images/item_over.gif new file mode 100644 index 0000000..e5edc25 Binary files /dev/null and b/07/WebRoot/images/item_over.gif differ diff --git a/07/WebRoot/images/left.gif b/07/WebRoot/images/left.gif new file mode 100644 index 0000000..dd5fd25 Binary files /dev/null and b/07/WebRoot/images/left.gif differ diff --git a/07/WebRoot/images/login.gif b/07/WebRoot/images/login.gif new file mode 100644 index 0000000..68256f8 Binary files /dev/null and b/07/WebRoot/images/login.gif differ diff --git a/07/WebRoot/images/main.jpg b/07/WebRoot/images/main.jpg new file mode 100644 index 0000000..5ecf73d Binary files /dev/null and b/07/WebRoot/images/main.jpg differ diff --git a/07/WebRoot/images/noel.gif b/07/WebRoot/images/noel.gif new file mode 100644 index 0000000..7759ff6 Binary files /dev/null and b/07/WebRoot/images/noel.gif differ diff --git a/07/WebRoot/images/right.jpg b/07/WebRoot/images/right.jpg new file mode 100644 index 0000000..fa86a59 Binary files /dev/null and b/07/WebRoot/images/right.jpg differ diff --git a/07/WebRoot/images/search.gif b/07/WebRoot/images/search.gif new file mode 100644 index 0000000..0a28ce2 Binary files /dev/null and b/07/WebRoot/images/search.gif differ diff --git a/07/WebRoot/images/sysinitialize.gif b/07/WebRoot/images/sysinitialize.gif new file mode 100644 index 0000000..9be8d60 Binary files /dev/null and b/07/WebRoot/images/sysinitialize.gif differ diff --git a/07/WebRoot/images/topbg.jpg b/07/WebRoot/images/topbg.jpg new file mode 100644 index 0000000..fdc1213 Binary files /dev/null and b/07/WebRoot/images/topbg.jpg differ diff --git a/07/WebRoot/inStockQuery.jsp b/07/WebRoot/inStockQuery.jsp new file mode 100644 index 0000000..854427c --- /dev/null +++ b/07/WebRoot/inStockQuery.jsp @@ -0,0 +1,164 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.StockMainViewForm"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> +<% +boolean flag=false; +%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλã + > + + >>>
    + + + + + + +
       + + + + +
    +
    + + + + + + + + +
     
    + ѡѯݣ + + +
    +ɹʱ䣺 + + + +(ڸʽΪ2011-07-05) +
    +
    + <% + List list=(List)request.getAttribute("stockQueryM"); + System.out.println("LIST SIZE:"+list.size()); +if(list.size()==0){ +%> + + + + +
    ûзIJɹϢ
    + <% +}else{ + int id=0; + String sno=""; + String provider=""; + String principal=""; + String username=""; + String createTime=""; + int state=-1; + String strState=""; + %> + + + + + + + + + +<% +for(int i=0;i + + + + + + + + + <%} %> +
    ɹӦԱɹʱϸ/ϸ
     <%=sno%><%=provider%> <%=principal%> <%=username%> <%=createTime%> 
    +<%}%> +
    +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/inStorageQuery.jsp b/07/WebRoot/inStorageQuery.jsp new file mode 100644 index 0000000..b475149 --- /dev/null +++ b/07/WebRoot/inStorageQuery.jsp @@ -0,0 +1,145 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.InStorageForm"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> +<% +boolean flag=false; +%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãѯͳ + > + ѯ + >>>
    + + + + + + +
       + + + + +
    +
    + + + + + + + + +
     
    + ѡѯݣ + + +
    +ʱ䣺 + + + +(ڸʽΪ2011-07-05) +
    +
    +<% +List list=(List)request.getAttribute("inStorageForm"); +System.out.println("LIST SIZE:"+list.size()); +if(list.size()==0){ +%> + + + + +
    ûзⵥϢ
    + <% +}else{ + int id=0; + String ino=""; + int stockid=0; + String username=""; + String inTime=""; + %> + + + + + + + + +<% +for(int i=0;i + + + + + + +<%}%> +
    Աʱ鿴ԭɹϸϢ
     <%=ino%> <%=username%> <%=inTime%>
    +<%}%> +
    + +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/index.jsp b/07/WebRoot/index.jsp new file mode 100644 index 0000000..f6825e7 --- /dev/null +++ b/07/WebRoot/index.jsp @@ -0,0 +1,10 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> + + +תҳ + + + + + + diff --git a/07/WebRoot/initialize.jsp b/07/WebRoot/initialize.jsp new file mode 100644 index 0000000..a109d30 --- /dev/null +++ b/07/WebRoot/initialize.jsp @@ -0,0 +1,51 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> + + + + +ʹϵͳ + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϵͳ > ϵͳʹ >>>
    + + + + + + +
       +
    + + + + + + + +
    ϵͳʹݿбȱݿ⣬ִϵͳʹִϵͳʹ뵥ϵͳʹť
    + +  
    +
    +
     
    +
    <%@ include file="copyright.jsp"%>
    + + + diff --git a/07/WebRoot/initialize_deal.jsp b/07/WebRoot/initialize_deal.jsp new file mode 100644 index 0000000..351a9b4 --- /dev/null +++ b/07/WebRoot/initialize_deal.jsp @@ -0,0 +1,12 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + +<% +int rtn=sysDAO.sysinitialize(); +if(rtn==0){ + out.println(""); +}else{ + + out.println(""); + //out.println(""); +} +%> \ No newline at end of file diff --git a/07/WebRoot/loanAdd.jsp b/07/WebRoot/loanAdd.jsp new file mode 100644 index 0000000..7d1e0a1 --- /dev/null +++ b/07/WebRoot/loanAdd.jsp @@ -0,0 +1,196 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.actionForm.BranchForm"%> +<%@page import="com.actionForm.StorageForm"%> +<%@page import="com.dao.OutStorageDAO"%> +<%@page import="com.dao.BranchDAO"%> +<%@page import="java.util.*"%> +<% +boolean flag=false; + + //ȡȫϢ + List listgoods = null; + OutStorageDAO outStorageDAO = new OutStorageDAO(); + //listgoods = getUseDAO.storage_query(); //ѯ + listgoods=(List)request.getAttribute("GoodsStorage"); + // session.setAttribute("listgoods", listgoods); + //ȡȫϢ + List listbranch = null; + BranchDAO branchDAO = new BranchDAO(); + listbranch = branchDAO.query(null); + if (listgoods.size() <= 0) { + out.println(""); + } + else if (listbranch.size() <= 0) { + out.println(""); + } + else { +%> + + + + +ʹϵͳ + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãʳ + > ʽ + >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ƣ
    ң<%=selProducer%>
        ۣ
    + <%=selUnit%>
    + <%=selUnit%>
    ˣ
    ϵ绰
    λ
      ˣ
    ϼƽ
      Ա" size="20" readonly="yes">
      +
    +
    +
     
    <%@include file="copyright.jsp"%> +
    + + +<%}%> diff --git a/07/WebRoot/loanAddok_ok.jsp b/07/WebRoot/loanAddok_ok.jsp new file mode 100644 index 0000000..081019f --- /dev/null +++ b/07/WebRoot/loanAddok_ok.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/07/WebRoot/loanApproveQuery.jsp b/07/WebRoot/loanApproveQuery.jsp new file mode 100644 index 0000000..e6b46e9 --- /dev/null +++ b/07/WebRoot/loanApproveQuery.jsp @@ -0,0 +1,161 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.LoanForm"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãʳ + > + + >>>
    + + + + + + +
       + + + + +
    +
    + + + + + + + + +
     
    + ѡѯݣ + + +
    +ʱ䣺 + + + +(ڸʽΪ2011-07-05) +
    +
    + <% + List list=(List)request.getAttribute("loanApproveQuery"); + System.out.println("LIST SIZE:"+list.size()); +if(list.size()==0){ +%> + + + + +
    ûзĽϢ
    + <% +}else{ + int id=0; + String lno=""; + String goodsname=""; + String spec=""; + String principal=""; + String borrowperson=""; + String btel=""; + String username=""; + String createTime=""; + GoodsForm goodsF=null; + %> + + + + + + + + + + + +<% +for(int i=0;i + + + + + + + + + + + <%} %> +
    [ ]Աʱ
     <%=lno%><%=goodsname%> [ <%=spec%> ] <%=borrowperson%> <%=btel%> <%=principal%> <%=username%> <%=createTime%>
    +<%}%> +
    +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/loanBackQuery.jsp b/07/WebRoot/loanBackQuery.jsp new file mode 100644 index 0000000..c7dfa0d --- /dev/null +++ b/07/WebRoot/loanBackQuery.jsp @@ -0,0 +1,161 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.LoanForm"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλã + > + 黹 + >>>
    + + + + + + +
       + + + + +
    +
    + + + + + + + + +
     
    + ѡѯݣ + + +
    +ʱ䣺 + + + +(ڸʽΪ2011-07-05) +
    +
    + <% + List list=(List)request.getAttribute("loanBackQuery"); + System.out.println("LIST SIZE:"+list.size()); +if(list.size()==0){ +%> + + + + +
    ûзĽϢ
    + <% +}else{ + int id=0; + String lno=""; + String goodsname=""; + String spec=""; + String principal=""; + String borrowperson=""; + String btel=""; + String username=""; + String createTime=""; + GoodsForm goodsF=null; + %> + + + + + + + + + + + +<% +for(int i=0;i + + + + + + + + + + + <%} %> +
    [ ]Աʱ
     <%=lno%><%=goodsname%> [ <%=spec%> ] <%=borrowperson%> <%=btel%> <%=principal%> <%=username%> <%=createTime%>
    +<%}%> +
    +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/loanDetail.jsp b/07/WebRoot/loanDetail.jsp new file mode 100644 index 0000000..07ff636 --- /dev/null +++ b/07/WebRoot/loanDetail.jsp @@ -0,0 +1,168 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.actionForm.LoanForm"%> +<%@page import="com.dao.GoodsDAO"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.Date"%> + + + +ʹϵͳ + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãѯͳ + > ѯ > ϸϢ >>>
    + + + + + + +
       + + + + +
    <% + try{ + LoanForm LoanForm=(LoanForm)request.getAttribute("loanDetail"); +if(LoanForm==null){ +%> + + + + +
    ûзĽϢ
    + <% +}else{ + String strState=""; + int id=LoanForm.getId(); + String lno=LoanForm.getLno(); + GoodsForm goodsF=LoanForm.getGoods(); + String goodsname=goodsF.getName(); + String spec=goodsF.getSpec(); + float price=goodsF.getPrice(); + String unit=goodsF.getUnit(); + int number=LoanForm.getNumber(); + String principal=LoanForm.getPrincipal(); + String borrowperson=LoanForm.getBorrowperson(); + String borrowunit=LoanForm.getBunit(); + String btel=LoanForm.getBtel(); + String username=LoanForm.getUsername(); + java.sql.Date createTime=new java.sql.Date(LoanForm.getCreatetime().getTime()); + String taster=LoanForm.getTaster(); + Date approveTime; + if(LoanForm.getApprovetime()!=null){ + approveTime=LoanForm.getApprovetime(); + }else{ + approveTime=null; + } + String backperson=LoanForm.getBackperson(); + Date backtime; + if(LoanForm.getBacktime()!=null){ + backtime=LoanForm.getBacktime(); + }else{ + backtime=null; + } + short state=LoanForm.getState(); + switch(state){ + case 0: + strState="δ"; + break; + case 1: + strState=""; + break; + default: + strState="ѹ黹"; + } +%> + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%if(approveTime!=null){%> + + + + + + + <%}%> + <%if(backperson!=null && approveTime!=null){%> + + + + + + + <%}%> +
    ţ<%=lno%>ʱ䣺<%=createTime%>
    ƣ<%=goodsname%>    <%=spec%>
    ʵۣ<%=price%>    <%=number%>(<%=unit%>)
      ˣ<%=borrowperson%>˵绰<%=btel%>
    ˹λ<%=borrowunit%>  ˣ<%=principal%>
      Ա<%=username%>״    ̬<%=strState%>
      ˣ<%=taster%>ʱ䣺<%=approveTime%>
      ˣ<%=backperson%>黹ʱ䣺<%=backtime%>
    + <%} + }catch(Exception e){ + System.out.println(e.getMessage()); + } + %> +
    + + + + +
     []
     
    <%@include file="copyright.jsp"%> +
    + + diff --git a/07/WebRoot/loanQuery.jsp b/07/WebRoot/loanQuery.jsp new file mode 100644 index 0000000..9e66778 --- /dev/null +++ b/07/WebRoot/loanQuery.jsp @@ -0,0 +1,184 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.LoanForm"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãѯͳ + > + ѯ + >>>
    + + + + + + +
       + + + + +
    +
    + + + + + + + + + + + +
     
    + ѡѯݣ + + +
    +ʱ䣺 + + + +(ڸʽΪ2011-07-05) +
    + + δ  + +   + + ѹ黹 
    +
    + <% + List list=(List)request.getAttribute("loanQuery"); + System.out.println("LIST SIZE:"+list.size()); +if(list.size()==0){ +%> + + + + +
    ûзĽϢ
    + <% +}else{ + int id=0; + String lno=""; + String goodsname=""; + String spec=""; + String principal=""; + String borrowperson=""; + String btel=""; + String username=""; + java.sql.Date createTime=null; + GoodsForm goodsF=null; + short state=0; + String strState=""; + %> + + + + + + + + + + + +<% +for(int i=0;i + + + + + + + + + + + <%} %> +
    [ ]Աʱ״̬
     <%=lno%><%=goodsname%> [ <%=spec%> ] <%=borrowperson%> <%=btel%> <%=principal%> <%=username%> <%=createTime%><%=strState%>
    +<%}%> +
    +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/login.jsp b/07/WebRoot/login.jsp new file mode 100644 index 0000000..fd4b39d --- /dev/null +++ b/07/WebRoot/login.jsp @@ -0,0 +1,91 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + + + +ʹϵͳ + + + + + + + + +
    + + + + +
    + + + +
    + + + + +
    + + + + + + + + + +
    + + + +
     
    + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + +
       
     ûƣ +  
     û룺 
      +   + +   +  
    +
     
     
    +
    +
    + + diff --git a/07/WebRoot/logout.jsp b/07/WebRoot/logout.jsp new file mode 100644 index 0000000..7723269 --- /dev/null +++ b/07/WebRoot/logout.jsp @@ -0,0 +1,18 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + + +Untitled Document + + + + +<% +session.invalidate(); +out.println(""); +%> + + + + diff --git a/07/WebRoot/main.jsp b/07/WebRoot/main.jsp new file mode 100644 index 0000000..00289ee --- /dev/null +++ b/07/WebRoot/main.jsp @@ -0,0 +1,42 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> +<%@ page import="com.dao.GoodsDAO" %> +<%@ page import="java.util.List" %> +<% + +%> + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãʹϵͳҳ >>>
    + + + + + + +
       
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/07/WebRoot/providerAdd.jsp b/07/WebRoot/providerAdd.jsp new file mode 100644 index 0000000..c4f86e6 --- /dev/null +++ b/07/WebRoot/providerAdd.jsp @@ -0,0 +1,100 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϢ > Ӧ̹ > ӹӦϢ >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ӧƣ
        ַ
    ϵ绰
    + +
    У
    ˺ţ
        ע +
      + +  + +  +
    +
    +
     
    +
    <%@ include file="copyright.jsp"%>
    + + + diff --git a/07/WebRoot/providerDetail.jsp b/07/WebRoot/providerDetail.jsp new file mode 100644 index 0000000..5067094 --- /dev/null +++ b/07/WebRoot/providerDetail.jsp @@ -0,0 +1,107 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> +<%@ page import="com.actionForm.ProviderForm" %> +<%@ page import="com.dao.ProviderDAO" %> +<% +ProviderDAO providerDAO=new ProviderDAO(); +ProviderForm providerForm=(ProviderForm)providerDAO.query(Integer.parseInt(request.getParameter("id"))); +if(providerForm==null){ +%> + +<% +}else{ + int id=providerForm.getId(); + String name=providerForm.getName(); + String address=providerForm.getAddress(); + String postcode=providerForm.getPostcode(); + String tel=providerForm.getTel(); + String fax=providerForm.getFax(); + String bankNo=providerForm.getBankNo(); + String bankName=providerForm.getBankName(); + String memo=providerForm.getMemo(); +%> + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϢ > Ӧ̹ > ӦϸϢ >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ӧƣ
        ַ
    ϵ绰
    + +
    У
    ˺ţ
        ע +
      +   +
    +
    +
     
    +
    <%@ include file="copyright.jsp"%>
    + + +<%} %> diff --git a/07/WebRoot/providerList.jsp b/07/WebRoot/providerList.jsp new file mode 100644 index 0000000..4c603d2 --- /dev/null +++ b/07/WebRoot/providerList.jsp @@ -0,0 +1,102 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> +<%@ page import="com.actionForm.ProviderForm" %> +<%@ page import="java.util.List" %> +<%@ page import="java.util.Iterator"%> + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϢ > Ӧ̹ >>>
    + + + + + + +
       + + + + +
    ӹӦϢ
    +<% +List list=(List)request.getAttribute("providerList"); + if(list.size()<=0){%> + + + + +
    ޹ӦϢ!
    + <%}else{%> + + + + + + + + + + + <% +Iterator it=list.iterator(); +int id=-1; +String name=""; +String address=""; +String fax=""; +String tel=""; +String postcode=""; +String bankNO=""; +String bankName=""; +String memo=""; +while(it.hasNext()){ + ProviderForm providerForm=(ProviderForm)it.next(); + id=providerForm.getId(); + name=providerForm.getName(); + address=providerForm.getAddress(); + fax=providerForm.getFax(); + tel=providerForm.getTel(); + postcode=providerForm.getPostcode(); + bankNO=providerForm.getBankNo(); + bankName=providerForm.getBankName(); + memo=providerForm.getMemo(); +%> + + + + + + + + + + <%}%> +
    Ӧַ޸ɾ
     <%=name %> <%=address%> <%=postcode%> <%=tel%> <%=fax%> ޸ + ɾ +
    + <%}%> +
     
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/07/WebRoot/providerModify.jsp b/07/WebRoot/providerModify.jsp new file mode 100644 index 0000000..d5bf4c7 --- /dev/null +++ b/07/WebRoot/providerModify.jsp @@ -0,0 +1,118 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> +<%@ page import="com.actionForm.ProviderForm" %> +<% +ProviderForm providerForm=(ProviderForm)request.getAttribute("providerList"); +if(providerForm==null){ +%> + +<% +}else{ + int id=providerForm.getId(); + String name=providerForm.getName(); + String address=providerForm.getAddress(); + String postcode=providerForm.getPostcode(); + String tel=providerForm.getTel(); + String fax=providerForm.getFax(); + String bankNo=providerForm.getBankNo(); + String bankName=providerForm.getBankName(); + String memo=providerForm.getMemo(); +%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϢ > Ӧ̹ > ޸ĹӦϢ >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ӧƣ
        ַ
    ϵ绰
    + +
    У
    ˺ţ
        ע +
      + +  + +  +
    +
    +
     
    +
    <%@ include file="copyright.jsp"%>
    + + +<%} %> diff --git a/07/WebRoot/provider_ok.jsp b/07/WebRoot/provider_ok.jsp new file mode 100644 index 0000000..d1b835d --- /dev/null +++ b/07/WebRoot/provider_ok.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/07/WebRoot/pwsModify.jsp b/07/WebRoot/pwsModify.jsp new file mode 100644 index 0000000..3f4a527 --- /dev/null +++ b/07/WebRoot/pwsModify.jsp @@ -0,0 +1,94 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> +<% +if(session.getAttribute("username")!=null || session.getAttribute("username")!=""){ +%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλã ޸ >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + + + + + +
    ûƣ
    ԭ  룺
      룺 +
    ȷ룺
      + +  + +  +
    +
    +
     
    +
    <%@ include file="copyright.jsp"%>
    + + +<%}else{ +response.sendRedirect("login.jsp"); +} %> diff --git a/07/WebRoot/quit.jsp b/07/WebRoot/quit.jsp new file mode 100644 index 0000000..9c09d49 --- /dev/null +++ b/07/WebRoot/quit.jsp @@ -0,0 +1,19 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + + + + + + + + + + + diff --git a/07/WebRoot/stockAdd.jsp b/07/WebRoot/stockAdd.jsp new file mode 100644 index 0000000..ae630da --- /dev/null +++ b/07/WebRoot/stockAdd.jsp @@ -0,0 +1,214 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.actionForm.ProviderForm"%> +<%@page import="com.dao.GoodsDAO"%> +<%@page import="com.actionForm.StockGoodsForm"%> +<%@page import="com.dao.ProviderDAO"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> +<% +boolean flag=false; + GetTime getTime = new GetTime(); + //ȡȫϢ + List listgoods = null; + GoodsDAO goodsDAO = new GoodsDAO(); + listgoods = goodsDAO.query(null, 0); + // session.setAttribute("listgoods", listgoods); + //ȡȫӦϢ + List listprovider = null; + ProviderDAO providerDAO = new ProviderDAO(); + listprovider = providerDAO.query(null); + // session.setAttribute("listprovider", listprovider); + //List listgoods=(List)request.getAttribute("goodsList"); + // List listprovider = (List) request.getAttribute("providerList"); + if (listgoods.size() <= 0) { + out.println(""); + } + else if (listprovider.size() <= 0) { + out.println(""); + } + else { + int goodsid = -1; + String goodsname = ""; + String spec = ""; + String unit = ""; + float price = 0.0f; + String producer = ""; + int providerid = -1; + String providername = ""; + float amount=0.0f; +%> + + + + +ʹϵͳ + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλã + > + ɹǼ + >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + <%if(session.getAttribute("stockgoods")!=null ){ + flag=true; + List sessionList=(List)session.getAttribute("stockgoods"); + int sesId=0; + float sesPrice=0.0f; + int sesNumber=0; + String sesName=""; + String sesProducer=""; + String sesunit=""; + for(int i=0;i + + + + + + + + <% + } + }%> +
    []
    + <%=selProducer%> + Ԫ + <%=selUnit%>ɹ
    <%=sesName%><%=sesProducer%><%=sesPrice%>Ԫ<%=sesNumber%> [<%=sesunit%>]ȥ
    +
    +
    + + + + +
     
    + + + + + + + + + + + + + + + +
    Ӧƣ ϼƽ + Ԫ
        ˣ     Ա" size="20" readonly="yes">
    + + + + +
    + <%if(flag){%> + +   + <%}%> +  
    +
     
    <%@include file="copyright.jsp"%> +
    + + +<%}%> diff --git a/07/WebRoot/stockDetail.jsp b/07/WebRoot/stockDetail.jsp new file mode 100644 index 0000000..d684783 --- /dev/null +++ b/07/WebRoot/stockDetail.jsp @@ -0,0 +1,154 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.actionForm.ProviderForm"%> +<%@page import="com.dao.GoodsDAO"%> +<%@page import="com.actionForm.StockGoodsForm"%> +<%@page import="com.actionForm.StockMainViewForm"%> +<%@page import="com.actionForm.StockDetailForm"%> +<%@page import="com.dao.ProviderDAO"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> +<% +boolean flag=false; +%> + + + +ʹϵͳ + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãѯͳ + > ɹѯ > ɹϸϢ >>>
    + + + + + + +
       + + + + +
    <% + StockMainViewForm stockMVF=(StockMainViewForm)request.getAttribute("stockDetail"); +if(stockMVF==null){ +%> + + + + +
    ûзIJɹϢ
    + <% +}else{ + int id=0; + String sno=""; + String provider=""; + String principal=""; + String username=""; + String createTime=""; + int state=-1; + String strState=""; + sno=stockMVF.getSno(); + provider=stockMVF.getProvider(); + principal=stockMVF.getPrincipal(); + username=stockMVF.getUsername(); + GetTime getTime=new GetTime(); + createTime=getTime.formatTime(stockMVF.getCreateTime()); + state=stockMVF.getState(); + switch(state){ + case 0: + strState="δ"; + break; + case 1: + strState=""; + break; + default: + strState="ϸ"; + } +%> + + + + +
    + + + + + +
    ɹţ<%=sno%>Ӧƣ<%=provider%>ɹʱ䣺<%=createTime%>
    + + + + + + + + + + <% + String goodsname=""; + String spec=""; + String producer=""; + String unit=""; + float price=0.0f; + int number=0; + Set detail=stockMVF.getStockDetail(); + Iterator it=detail.iterator(); + while(it.hasNext()){ + StockDetailForm stockDF=(StockDetailForm)it.next(); + price=stockDF.getPrice(); + number=stockDF.getNumber(); + GoodsForm goodsF=(GoodsForm)stockDF.getGoods(); + goodsname=goodsF.getName(); + spec=goodsF.getSpec(); + producer=goodsF.getProducer(); + unit=goodsF.getUnit(); +%> + + + + + + + + + <%}%> +
     <%=goodsname%>  <%=spec%> <%=producer%> <%=price%>(Ԫ) <%=number%>(<%=unit%>) <%=price*number%>(Ԫ)
    + + + + + + + +
     ˣ<%=principal%>Ա<%=username%>״̬<%=strState%>
    + <%}%> +
    + + + + +
     []
     
    <%@include file="copyright.jsp"%> +
    + + diff --git a/07/WebRoot/stockQuery.jsp b/07/WebRoot/stockQuery.jsp new file mode 100644 index 0000000..aacd8ff --- /dev/null +++ b/07/WebRoot/stockQuery.jsp @@ -0,0 +1,172 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.StockMainViewForm"%> +<%@page import="com.core.GetTime"%> +<%@page import="java.util.*"%> +<% +boolean flag=false; +%> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãѯͳ + > + ɹѯ + >>>
    + + + + + + +
       + + + + +
    +
    + + + + + + + + + + + +
     
    + ѡѯݣ + + +
    +ɹʱ䣺 + + + +(ڸʽΪ2011-07-05)
    + + δ  + +   + + ϸ 
    +
    + <% + List list=(List)request.getAttribute("stockQueryM"); + System.out.println("LIST SIZE:"+list.size()); +if(list.size()==0){ +%> + + + + +
    ûзIJɹϢ
    + <% +}else{ + int id=0; + String sno=""; + String provider=""; + String principal=""; + String username=""; + String createTime=""; + int state=-1; + String strState=""; + %> + + + + + + + + + +<% +for(int i=0;i + + + + + + + + + <%} %> +
    ɹӦԱɹʱ״̬
     <%=sno%><%=provider%> <%=principal%> <%=username%> <%=createTime%> <%=strState%>
    +<%}%> +
    +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/storageCheck.jsp b/07/WebRoot/storageCheck.jsp new file mode 100644 index 0000000..c08300f --- /dev/null +++ b/07/WebRoot/storageCheck.jsp @@ -0,0 +1,140 @@ +<%@page contentType="text/html; charset=gb2312" language="java"%> +<%@page import="com.actionForm.GoodsForm"%> +<%@page import="com.actionForm.StorageForm"%> +<%@page import="com.dao.OutStorageDAO"%> +<%@page import="java.util.*"%> +<% + //ȡȫϢ + List listgoods = null; + OutStorageDAO outStorageDAO = new OutStorageDAO(); + listgoods = outStorageDAO.storage_query(); //ѯ + java.util.Date date=new java.util.Date(); +%> + + + + + + + + + + + + + + + + + + +
    <%@include file="top.jsp"%> +
    + + + + + +
    ǰ¼û<%=session.getAttribute("username")%>  ǰλãʴ + > ̵ + >>>
    + + + + + + +
       + + + + + + +
      + + + + + + + + + +
    ̵
    ӡڣ<%=new java.sql.Date(date.getTime())%>
     
    + + + + + + + + + + + + + <% + if (listgoods.size() <= 0) {%> + + + + <% }else { + String Producer=""; // + String Unit=""; //λ + float Price=0.0f; // + float amount=0.0f; + int storagenumber=0; // + String goodsname=""; // + int goodsId=0; //ID + String spec=""; // + for(int i=0;i + style="page-break-after:always;"<%}%>> + + + + + + + + + <%}%> + +
    (Ԫ)(λ)̵
     ޿Ϣ!
     <%=i+1%> <%=goodsname%> <%=spec%> <%=Producer%> <%=Price%> <%=storagenumber%>(<%=Unit%>) 
    + + + + + + + + <%}%> +
     
    ܽ<%=amount%>    ӡ̵㱨
     
    +
     
    <%@include file="copyright.jsp"%> +
    + + + diff --git a/07/WebRoot/top.jsp b/07/WebRoot/top.jsp new file mode 100644 index 0000000..05294ed --- /dev/null +++ b/07/WebRoot/top.jsp @@ -0,0 +1,83 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.util.List" %> +<%@ page import="com.actionForm.UserForm"%> +<%@ page import="com.dao.UserDAO"%> +<% +if(session.getAttribute("username")==null || session.getAttribute("username")==""){ + response.sendRedirect("login.jsp"); +} +UserDAO userDAO=new UserDAO(); +String str="name='"+session.getAttribute("username")+"'"; +List list_user=userDAO.query(str); + int user_id=0; + String user_name=""; + String user_pwd=""; + Byte user_setInstorage = new Byte("0"); + Byte user_setOutstorage= new Byte("0"); + Byte user_setDeal= new Byte("0"); + Byte user_setQuery= new Byte("0"); + Byte user_setBasic= new Byte("0"); + Byte user_setSys= new Byte("0"); +if(list_user.size()>0){ + UserForm user_userForm=(UserForm)list_user.get(0); + user_id=user_userForm.getId(); + user_name=user_userForm.getName(); + user_pwd=user_userForm.getPwd(); + user_setInstorage = user_userForm.getSetInstorage(); + user_setOutstorage= user_userForm.getSetOutstorage(); + user_setDeal= user_userForm.getSetDeal(); + user_setQuery= user_userForm.getSetQuery(); + user_setBasic= user_userForm.getSetBasic(); + user_setSys= user_userForm.getSetSys(); +} +%> + + + + + + + + +
    + + + + + + + + + + + + + +
       + +
      + + + + + + + + + + + + + + + +
    <%if(user_setInstorage.equals(new Byte("1"))){%><%}else{%><%}%><%if(user_setOutstorage.equals(new Byte("1"))){%>ʳ<%}else{%>ʳ<%}%><%if(user_setDeal.equals(new Byte("1"))){%>ʴ<%}else{%>ʴ<%}%><%if(user_setQuery.equals(new Byte("1"))){%>ѯͳ<%}else{%>ѯͳ<%}%><%if(user_setBasic.equals(new Byte("1"))){%>Ϣ<%}else{%>Ϣ<%}%><%if(user_setSys.equals(new Byte("1"))){%>ϵͳ<%}else{%>ϵͳ<%}%>
    µ¼ ޸
    + diff --git a/07/WebRoot/transfer.jsp b/07/WebRoot/transfer.jsp new file mode 100644 index 0000000..3b70dfd --- /dev/null +++ b/07/WebRoot/transfer.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + + + + \ No newline at end of file diff --git a/07/WebRoot/userAdd.jsp b/07/WebRoot/userAdd.jsp new file mode 100644 index 0000000..d72c077 --- /dev/null +++ b/07/WebRoot/userAdd.jsp @@ -0,0 +1,84 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϵͳ > û > û >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + + + + +
    ûƣ 
        룺 
    ȷ룺 
      + +  + +  +
    +
    +
     
    +
    <%@ include file="copyright.jsp"%>
    + + + diff --git a/07/WebRoot/userAdd1.jsp b/07/WebRoot/userAdd1.jsp new file mode 100644 index 0000000..f757b72 --- /dev/null +++ b/07/WebRoot/userAdd1.jsp @@ -0,0 +1,78 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + + +ʹϵͳ + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϵͳ > û > û >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + +
    ûƣ
        룺
    ȷ룺
      + +  + +  +
    +
    +
     
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/07/WebRoot/userList.jsp b/07/WebRoot/userList.jsp new file mode 100644 index 0000000..3483fae --- /dev/null +++ b/07/WebRoot/userList.jsp @@ -0,0 +1,111 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> +<%@ page import="com.actionForm.UserForm" %> +<%@ page import="java.util.List" %> +<%@ page import="java.util.Iterator"%> + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϵͳ > û >>>
    + + + + + + +
       + + + + +
    û
    +<% +List list=(List)request.getAttribute("userList"); + if(list.size()<=0){%> + + + + +
    ûϢ!
    + <%}else{%> + + + + + + + + + + + + + <% +Iterator it=list.iterator(); +int id=-1; +String name=""; +Byte setInstorage=new Byte("0"); +Byte setOutstorage=new Byte("0"); +Byte setDeal=new Byte("0"); +Byte setQuery=new Byte("0"); +Byte setBasic=new Byte("0"); +Byte setSys=new Byte("0"); +while(it.hasNext()){ + UserForm userForm=(UserForm)it.next(); + id=userForm.getId(); + name=userForm.getName(); + setInstorage=userForm.getSetInstorage(); + setOutstorage=userForm.getSetOutstorage(); + setDeal=userForm.getSetDeal(); + setQuery=userForm.getSetQuery(); + setBasic=userForm.getSetBasic(); + setSys=userForm.getSetSys(); + if(!name.equals("mr")){ +%> + + + + + + + + + + + + <%} +}%> +
    ûʴѯͳϢϵͳ޸ɾ
     <%=name %>  + >  + >  + >  + >  + >  + > ޸ + ɾ
    + <%}%> +
     
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/07/WebRoot/userModify.jsp b/07/WebRoot/userModify.jsp new file mode 100644 index 0000000..99f1eb9 --- /dev/null +++ b/07/WebRoot/userModify.jsp @@ -0,0 +1,100 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> +<%@ page import="com.actionForm.UserForm" %> +<% +UserForm userForm=(UserForm)request.getAttribute("userList"); +if(userForm==null){ +%> + +<% +}else{ + int id=userForm.getId(); + String name=userForm.getName(); + Byte setInstorage=userForm.getSetInstorage(); + Byte setOutstorage=userForm.getSetOutstorage(); + Byte setDeal=userForm.getSetDeal(); + Byte setQuery=userForm.getSetQuery(); + Byte setBasic=userForm.getSetBasic(); + Byte setSys=userForm.getSetSys(); +%> + + + +ʹϵͳ + + + + + + + + + + + + + + +
    <%@ include file="top.jsp"%>
    + + + + + + +
    ǰ¼û<%=session.getAttribute("username")%> ǰλãϵͳ > û > ޸ûȨ >>>
    + + + + + + +
       +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     ûƣ +  
     >ʳ⣺>ʴ> 
     ѯͳƣ>Ϣ>ϵͳ> 
       +  + +  + 
    +
    +
     
    +
    <%@ include file="copyright.jsp"%>
    + + +<%} %> diff --git a/07/WebRoot/user_ok.jsp b/07/WebRoot/user_ok.jsp new file mode 100644 index 0000000..c1c8800 --- /dev/null +++ b/07/WebRoot/user_ok.jsp @@ -0,0 +1,42 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; + case 4: + %> + + <% +} +%> + + \ No newline at end of file diff --git a/07/src/ApplicationResources.properties b/07/src/ApplicationResources.properties new file mode 100644 index 0000000..e69de29 diff --git a/07/src/com/action/Branch.java b/07/src/com/action/Branch.java new file mode 100644 index 0000000..cd3d763 --- /dev/null +++ b/07/src/com/action/Branch.java @@ -0,0 +1,69 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForward; +import com.actionForm.BranchForm; +import org.apache.struts.action.Action; +import com.dao.BranchDAO; + +public class Branch extends Action { + BranchDAO branchDAO=null; + public Branch() { + branchDAO = new BranchDAO(); + } + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + BranchForm branchForm = (BranchForm) form; + String action=request.getParameter("action"); + if(action.equals("") || action==null){ + request.setAttribute("err","IJ"); + return mapping.findForward("error"); + }else if(action.equals("branchQuery")){ + return branchQuery(mapping,form,request,response); + }else if(action.equals("branchdel")){ + return branchDel(mapping, form, request, response); + }else if(action.equals("branchadd")){ + return branchAdd(mapping, form, request, response); + } + return mapping.findForward("error"); + } + + public ActionForward branchQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String str = ""; + request.setAttribute("branchList", branchDAO.query(str)); + return mapping.findForward("branchQuery"); + } + public ActionForward branchDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + int id=Integer.parseInt(request.getParameter("id")); + int rtn=branchDAO.del(id); + if(rtn==0){ + request.setAttribute("error","òϢɾ"); + return mapping.findForward("error"); + }else{ + return mapping.findForward("branchdelok"); + } + } + public ActionForward branchAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + BranchForm branchForm = (BranchForm) form; + int rtn=branchDAO.insert(branchForm); + if(rtn==2){ + request.setAttribute("error","òϢѾڣ"); + return mapping.findForward("error"); + }else if(rtn==1){ + return mapping.findForward("branchaddok"); + }else{ + request.setAttribute("error","Ϣʧܣ"); + return mapping.findForward("error"); + } + } +} diff --git a/07/src/com/action/Cart.java b/07/src/com/action/Cart.java new file mode 100644 index 0000000..5d28453 --- /dev/null +++ b/07/src/com/action/Cart.java @@ -0,0 +1,55 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForward; +import com.actionForm.StockGoodsForm; +import org.apache.struts.action.Action; +import com.dao.InstorageDAO; + +public class Cart extends Action { + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String action = request.getParameter("action"); + System.out.println("Action:" + action); + if (action.equals("add")) { //ɹťʱִеIJ + return add(mapping, form, request, response); + } else if (action.equals("remove")) { + return remove(mapping, form, request, response); + } else if(action.equals("clear")){ + return clear(mapping, form, request, response); + }else { + request.setAttribute("err", "IJ"); + return mapping.findForward("error"); + } + } +//ָϢ + public ActionForward add(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + InstorageDAO instorageDAO = new InstorageDAO(); + StockGoodsForm stockGoodsForm = (StockGoodsForm) form; + instorageDAO.cart_add(stockGoodsForm, request); + return mapping.findForward("add"); + } + //ȥָϢ + public ActionForward remove(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + InstorageDAO instorageDAO = new InstorageDAO(); + int id=Integer.parseInt(request.getParameter("removeid")); + instorageDAO.cart_remove(id, request); + return mapping.findForward("add"); + } + //ձϢSession + public ActionForward clear(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + InstorageDAO instorageDAO = new InstorageDAO(); + instorageDAO.cart_clear(request); + return mapping.findForward("add"); + } +} diff --git a/07/src/com/action/Damage.java b/07/src/com/action/Damage.java new file mode 100644 index 0000000..6ddb331 --- /dev/null +++ b/07/src/com/action/Damage.java @@ -0,0 +1,62 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForward; +import com.actionForm.DamageForm; +import org.apache.struts.action.Action; +import com.dao.OutStorageDAO; +import com.dao.QueryDAO; + +public class Damage extends Action { + private OutStorageDAO outStorageDAO = null; + public Damage() { + outStorageDAO = new OutStorageDAO(); + } + + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String action = request.getParameter("action"); + if (action.equals("") || action == null) { + request.setAttribute("error", "IJ"); + return mapping.findForward("error"); + } else if (action.equals("damageaddquery")) { + return damageadd_request(mapping, form, request, response); + } else if (action.equals("damageadd")) { + return damageadd(mapping, form, request, response); + }else{ + request.setAttribute("error", "IJ"); + return mapping.findForward("error"); + } + } +//ѯϢ + public ActionForward damageadd_request(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + int goodsid = 0; + if (request.getParameter("id") != null) { + goodsid = Integer.parseInt(request.getParameter("id")); + } + request.setAttribute("id", goodsid); + request.setAttribute("getuse", outStorageDAO.getuseGoods_query()); //ȡϢ + return mapping.findForward("selGetuseGoods"); + } + //ӲűϢ + public ActionForward damageadd(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + DamageForm getUseForm = (DamageForm) form; + int rtn = outStorageDAO.damageAdd(getUseForm); + if (rtn == 1) { + return mapping.findForward("damageAddok"); + } else { + request.setAttribute("error", "űϢʧܣ"); + return mapping.findForward("error"); + } + } +} diff --git a/07/src/com/action/GetUse.java b/07/src/com/action/GetUse.java new file mode 100644 index 0000000..5504794 --- /dev/null +++ b/07/src/com/action/GetUse.java @@ -0,0 +1,62 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForward; +import com.actionForm.GetUseForm; +import org.apache.struts.action.Action; +import com.dao.OutStorageDAO; + +public class GetUse extends Action { + private OutStorageDAO outStorageDAO = null; + public GetUse() { + outStorageDAO = new OutStorageDAO(); + } + + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String action = request.getParameter("action"); + if (action.equals("") || action == null) { + request.setAttribute("error", "IJ"); + return mapping.findForward("error"); + } else if (action.equals("getuseaddquery")) { + return getuseadd_request(mapping, form, request, response); + } else if (action.equals("getuseadd")) {//loanaddquery + return getuseadd(mapping, form, request, response); + } + request.setAttribute("error", "IJ"); + return mapping.findForward("error"); + } + +//ѯеϢ + public ActionForward getuseadd_request(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + int goodsid = 0; + if (request.getParameter("id") != null) { + goodsid = Integer.parseInt(request.getParameter("id")); + } + request.setAttribute("id", goodsid); + request.setAttribute("GoodsStorage", outStorageDAO.storage_query()); //ȡϢ + return mapping.findForward("selStorageGoods"); + } + +// + public ActionForward getuseadd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + GetUseForm getUseForm = (GetUseForm) form; + int rtn = outStorageDAO.getuseAdd(getUseForm); + if (rtn == 1) { + return mapping.findForward("getUseAddok"); + } else { + request.setAttribute("error", "Ϣʧܣ"); + return mapping.findForward("error"); + } + } + +} diff --git a/07/src/com/action/Goods.java b/07/src/com/action/Goods.java new file mode 100644 index 0000000..e141320 --- /dev/null +++ b/07/src/com/action/Goods.java @@ -0,0 +1,96 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForward; +import com.actionForm.GoodsForm; +import com.dao.*; +import org.apache.struts.action.Action; + +public class Goods extends Action { + private GoodsDAO goodsDAO=null; + public Goods(){ + goodsDAO=new GoodsDAO(); + } + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + + String action=request.getParameter("action"); + + if(action.equals("") || action==null){ + request.setAttribute("error","IJ"); + return mapping.findForward("error"); + }else if(action.equals("goodsRequest")){ + return goodsQuery(mapping,form,request,response); + }else if(action.equals("goodsadd")){ + return goodsAdd(mapping,form,request,response); + }else if(action.equals("goodsMquery")){ + return goodsModiQuery(mapping,form,request,response); + }else if(action.equals("goodsmodify")){ + return goodsModify(mapping,form,request,response); + }else if(action.equals("goodsdel")){ + return goodsdel(mapping,form,request,response); + } + request.setAttribute("error","IJ"); + return mapping.findForward("error"); + } + public ActionForward goodsQuery(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + String str=null; + int ifdel=0; //ȡδɾ + request.setAttribute("goodslist0",goodsDAO.query(str,ifdel)); + ifdel=1; //ȡѱɾ + request.setAttribute("goodslist1",goodsDAO.query(str,ifdel)); + return mapping.findForward("goodsQuery"); + } + //Ϣ + public ActionForward goodsAdd(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + GoodsForm goodsForm = (GoodsForm) form; +// goodsForm.setName(chStr.toChinese(goodsForm.getName())); +// goodsForm.setSpec(chStr.toChinese(goodsForm.getSpec())); +// goodsForm.setUnit(chStr.toChinese(goodsForm.getUnit())); +// goodsForm.setProducer(chStr.toChinese(goodsForm.getProducer())); + int rtn=goodsDAO.insert(goodsForm); + if (rtn == 1) { + return mapping.findForward("goodsaddok"); + } else if (rtn == 2) { + request.setAttribute("error", "ϢѾӣ"); + return mapping.findForward("error"); + } else { + request.setAttribute("error", "Ϣʧܣ"); + return mapping.findForward("error"); + } + } + //޸ϢIJѯ + public ActionForward goodsModiQuery(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + int id=Integer.parseInt(request.getParameter("id")); + request.setAttribute("goodsForm",goodsDAO.query(id)); + return mapping.findForward("goodsModiQuery"); + } + //޸Ϣ + public ActionForward goodsModify(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + GoodsForm goodsForm = (GoodsForm) form; + int rtn=goodsDAO.update(goodsForm); + if (rtn == 1) { + return mapping.findForward("goodsmodifyok"); + }else { + request.setAttribute("error", "Ϣ޸ʧܣ"); + return mapping.findForward("error"); + } + } + //ɾ/ָϢ + public ActionForward goodsdel(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + int id=Integer.parseInt(request.getParameter("id")); + byte val=Byte.parseByte(request.getParameter("val")); + int rtn=goodsDAO.del(id,val); + if(rtn==1){ + return mapping.findForward("goodsdelok"); + }else{ + request.setAttribute("error", "Ϣɾ/ָʧܣ"); + return mapping.findForward("error"); + } +} + +} diff --git a/07/src/com/action/IfDeal.java b/07/src/com/action/IfDeal.java new file mode 100644 index 0000000..750de2a --- /dev/null +++ b/07/src/com/action/IfDeal.java @@ -0,0 +1,195 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForward; +import com.actionForm.IfForm; +import org.apache.struts.action.Action; +import com.dao.QueryDAO; + + +public class IfDeal extends Action { + QueryDAO queryDAO = null; + public IfDeal() { + queryDAO = new QueryDAO(); + } + + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + + String action = request.getParameter("action"); + if (action.equals("stockQuery")) { + return stockIf(mapping, form, request, response); + } else if (action.equals("stockDetail")) { + return stockDetail(mapping, form, request, response); + } else if (action.equals("inStockQuery")) { + return inStockIf(mapping, form, request, response); + } else if (action.equals("inStorageSQuery")) { + return inStorageSQuery(mapping, form, request, response); + } else if (action.equals("loanApproveQuery")) { + return loanApproveQuery(mapping, form, request, response); + } else if (action.equals("loanBackQuery")) { + return loanBackQuery(mapping, form, request, response); + } else if (action.equals("loanQuery")) { + return loanQuery(mapping, form, request, response); + } else if (action.equals("loanDetail")) { + return loanDetail(mapping, form, request, response); + } else if (action.equals("damageQuery")) { + return damageQuery(mapping, form, request, response); + } else if (action.equals("getuseQuery")) { + return getuseQuery(mapping, form, request, response); + } else if (action.equals("getuseTotal")) { + return getuseTotal(mapping, form, request, response); + } else if (action.equals("damageTotal")) { + return damageTotal(mapping, form, request, response); + } else if (action.equals("branchTotal")) { + return branchTotal(mapping, form, request, response); + } else { + return mapping.findForward("error"); + } + } + + public ActionForward stockIf(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + IfForm ifForm = (IfForm) form; + // StockMainViewForm stockMVF = new StockMainViewForm(); + String tablename = "StockMainViewForm"; + request.setAttribute("stockQueryM", + queryDAO.stockQuery(ifForm, tablename, 3)); + return mapping.findForward("stockQuery"); + } + +//ɹϸϢѯ + public ActionForward stockDetail(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + int id = Integer.parseInt(request.getParameter("id")); + request.setAttribute("stockDetail", queryDAO.stockDetail(id)); + return mapping.findForward("stockDetail"); + } + + //ˡʱõIJѯ + public ActionForward inStockIf(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + IfForm ifForm = (IfForm) form; + String tablename = "StockMainViewForm"; + request.setAttribute("stockQueryM", + queryDAO.stockQuery(ifForm, tablename, 0)); + return mapping.findForward("inStockQuery"); + } + + //ѯʱõIJѯ + public ActionForward inStorageSQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + IfForm ifForm = (IfForm) form; + String tablename = "InStorageForm"; + request.setAttribute("inStorageForm", + queryDAO.stockQuery(ifForm, tablename, 3)); + return mapping.findForward("inStorageSQuery"); + } + + //ˡʱõIJѯ + public ActionForward loanApproveQuery(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + IfForm ifForm = (IfForm) form; + String tablename = "LoanForm"; + request.setAttribute("loanApproveQuery", + queryDAO.stockQuery(ifForm, tablename, 0)); + return mapping.findForward("loanApproveQuery"); + } + + //黹ʱõIJѯ + public ActionForward loanBackQuery(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + IfForm ifForm = (IfForm) form; + String tablename = "LoanForm"; + request.setAttribute("loanBackQuery", + queryDAO.stockQuery(ifForm, tablename, 1)); + return mapping.findForward("loanBackQuery"); + } + + //ѯ + public ActionForward loanQuery(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + IfForm ifForm = (IfForm) form; + String tablename = "LoanForm"; + request.setAttribute("loanQuery", + queryDAO.stockQuery(ifForm, tablename, 3)); + return mapping.findForward("loanQuery"); + } + + //ϸϢѯ + public ActionForward loanDetail(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + int id = Integer.parseInt(request.getParameter("id")); + request.setAttribute("loanDetail", queryDAO.loanDetail(id)); + return mapping.findForward("loanDetail"); + } + + //űѯ + public ActionForward damageQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + IfForm ifForm = (IfForm) form; + request.setAttribute("damageQuery", + queryDAO.damageQuery(ifForm)); + return mapping.findForward("damageQuery"); + } + + //òѯ + public ActionForward getuseQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + IfForm ifForm = (IfForm) form; + request.setAttribute("getuseQuery", + queryDAO.getuseQuery(ifForm)); + return mapping.findForward("getuseQuery"); + } + + //ûܲѯ + public ActionForward getuseTotal(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + IfForm ifForm = (IfForm) form; + request.setAttribute("getuseTotal", + queryDAO.getusedamageTotal(ifForm, "GetUseForm", + "number")); + return mapping.findForward("getuseTotal"); + } + + //űܲѯ + public ActionForward damageTotal(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + IfForm ifForm = (IfForm) form; + request.setAttribute("damageTotal", + queryDAO.getusedamageTotal(ifForm, "DamageForm", + "damagenum")); + return mapping.findForward("damageTotal"); + } + + //Żܲѯ + public ActionForward branchTotal(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + IfForm ifForm = (IfForm) form; + request.setAttribute("sDate", ifForm.getSdate()); + request.setAttribute("eDate", ifForm.getEdate()); + request.setAttribute("branchTotal", + queryDAO.branchTotal(ifForm)); + return mapping.findForward("branchTotal"); + } +} diff --git a/07/src/com/action/Instorage.java b/07/src/com/action/Instorage.java new file mode 100644 index 0000000..137ba1b --- /dev/null +++ b/07/src/com/action/Instorage.java @@ -0,0 +1,97 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForward; +import com.actionForm.StockMainForm; +import com.dao.InstorageDAO; +import org.apache.struts.action.Action; +import com.dao.GoodsDAO; +import javax.servlet.http.HttpSession; + +public class Instorage extends Action { + InstorageDAO instorageDAO=null; + public Instorage(){ + instorageDAO=new InstorageDAO(); + } + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + + String action=request.getParameter("action"); + System.out.println("Action:"+action); + if(action.equals("changeGoods")){ //ѡϢʱִеIJ + return changeGoods(mapping,form,request,response); + }else if(action.equals("stockadd")){ + return stockadd(mapping,form,request,response); + }else if(action.equals("eligible")){ + return eligible(mapping,form,request,response); + }else if(action.equals("uneligible")){ + return uneligible(mapping,form,request,response); + }else{ + request.setAttribute("err","IJ"); + return mapping.findForward("error"); + } + + } + + //ѡָϢIJѯ + public ActionForward changeGoods(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + GoodsDAO goodsDAO=new GoodsDAO(); + int goodsid=1; + if(request.getParameter("id")!=null){ + goodsid=Integer.parseInt(request.getParameter("id")); + } + request.setAttribute("selGoods",goodsDAO.query(goodsid)); //ȡѡϢ + return mapping.findForward("stock"); + } + //ɹϢ + public ActionForward stockadd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + StockMainForm stockMainForm=(StockMainForm)form; + int rtn=instorageDAO.stockadd(stockMainForm,request); + if(rtn==1){ + return mapping.findForward("stockaddok"); + }else{ + request.setAttribute("error","ɹϢʧܣ"); + return mapping.findForward("error"); + } + } + // + public ActionForward eligible(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + HttpSession httpsession = request.getSession(); + if(httpsession.getAttribute("username")==null){ + request.setAttribute("error","ȵ¼"); + return mapping.findForward("error"); + } + int id=Integer.valueOf(request.getParameter("id")); + int rtn=instorageDAO.eligibleAdd(id,request); + if(rtn==1){ + return mapping.findForward("eligibleAddok"); + }else{ + request.setAttribute("error","ʧܣ"); + return mapping.findForward("error"); + } + } + //˲ϸ + public ActionForward uneligible(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + HttpSession httpsession = request.getSession(); + if(httpsession.getAttribute("username")==null){ + request.setAttribute("error","ȵ¼"); + return mapping.findForward("error"); + } + int id=Integer.valueOf(request.getParameter("id")); + int rtn=instorageDAO.uneligibleAdd(id,request); + if(rtn==1){ + return mapping.findForward("eligibleAddok"); + }else{ + request.setAttribute("error","˲ϸʧܣ"); + return mapping.findForward("error"); + } + } +} diff --git a/07/src/com/action/Loan.java b/07/src/com/action/Loan.java new file mode 100644 index 0000000..4a2080b --- /dev/null +++ b/07/src/com/action/Loan.java @@ -0,0 +1,104 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForward; +import com.actionForm.LoanForm; +import org.apache.struts.action.Action; +import com.dao.OutStorageDAO; +import javax.servlet.http.HttpSession; +import com.dao.InstorageDAO; + +public class Loan extends Action { + private OutStorageDAO outStorageDAO = null; + public Loan() { + outStorageDAO = new OutStorageDAO(); + } + + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String action = request.getParameter("action"); + if (action.equals("") || action == null) { + request.setAttribute("error", "IJ"); + return mapping.findForward("error"); + } else if (action.equals("loanaddquery")) { + return loanadd_request(mapping, form, request, response); + } else if (action.equals("loanadd")) { + return loanadd(mapping, form, request, response); + }else if(action.equals("approveloan")){ + return approveloan(mapping, form, request, response); + }else if(action.equals("backloan")){ + return backloan(mapping, form, request, response); + }else{ + request.setAttribute("error", "IJ"); + return mapping.findForward("error"); + } + } + +//ѯеϢ + public ActionForward loanadd_request(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + int goodsid = 0; + if (request.getParameter("id") != null) { + goodsid = Integer.parseInt(request.getParameter("id")); + } + request.setAttribute("id", goodsid); + request.setAttribute("GoodsStorage", outStorageDAO.storage_query()); //ȡϢ + return mapping.findForward("selStorageGoods"); + } + +//ʽ + public ActionForward loanadd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + LoanForm loanForm = (LoanForm) form; + int rtn = outStorageDAO.loanAdd(loanForm); + if (rtn == 1) { + return mapping.findForward("loanAddok"); + } else { + request.setAttribute("error", "ʽϢʧܣ"); + return mapping.findForward("error"); + } + } +// + public ActionForward approveloan(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + HttpSession httpsession = request.getSession(); + if(httpsession.getAttribute("username")==null){ + request.setAttribute("error","ȵ¼"); + return mapping.findForward("error"); + } + int id=Integer.valueOf(request.getParameter("id")); + int rtn=outStorageDAO.approveloanAdd(id,request); + if(rtn==1){ + return mapping.findForward("loanApproveAddok"); + }else if(rtn==2){ + request.setAttribute("error","㣬ɽˣ"); + return mapping.findForward("error"); + }else{ + request.setAttribute("error","˲ʧܣ"); + return mapping.findForward("error"); + } + } + //黹 + public ActionForward backloan(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + HttpSession httpsession = request.getSession(); + if(httpsession.getAttribute("username")==null){ + request.setAttribute("error","ȵ¼"); + return mapping.findForward("error"); + } + int id=Integer.valueOf(request.getParameter("id")); + InstorageDAO inStorageDAO=new InstorageDAO(); + int rtn=inStorageDAO.backloan(id,request); + if(rtn==1){ + return mapping.findForward("loanbackAddok"); + }else{ + request.setAttribute("error","黹ʧܣ"); + return mapping.findForward("error"); + } + } +} diff --git a/07/src/com/action/Provider.java b/07/src/com/action/Provider.java new file mode 100644 index 0000000..5161d67 --- /dev/null +++ b/07/src/com/action/Provider.java @@ -0,0 +1,99 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForward; +import com.actionForm.ProviderForm; +import org.apache.struts.action.Action; +import com.dao.ProviderDAO; + +public class Provider extends Action { + ProviderDAO providerDAO=null; + public Provider(){ + providerDAO=new ProviderDAO(); + } + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String action=request.getParameter("action"); + if(action.equals("") || action==null){ + request.setAttribute("err","IJ"); + return mapping.findForward("error"); + }else if(action.equals("providerQuery")){ + return providerQuery(mapping,form,request,response); + }else if(action.equals("providerdel")){ + return providerDel(mapping, form, request, response); + }else if(action.equals("provideradd")){ + return providerAdd(mapping, form, request, response); + }else if(action.equals("providerMQuery")){ + return providerQModify(mapping, form, request, response); + }else if(action.equals("providerModify")){ + return providerModify(mapping, form, request, response); + } + + + return mapping.findForward("error"); + } + + public ActionForward providerQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String str = ""; + request.setAttribute("providerList", providerDAO.query(str)); + return mapping.findForward("providerQuery"); + } + public ActionForward providerDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + + + int id=Integer.parseInt(request.getParameter("id")); + int rtn=providerDAO.del(id); + if(rtn==0){ + request.setAttribute("error","ùӦϢɾ"); + return mapping.findForward("error"); + }else{ + return mapping.findForward("providerdelok"); + } + } + public ActionForward providerAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + ProviderForm providerForm = (ProviderForm) form; + int rtn=providerDAO.insert(providerForm); + if(rtn==2){ + request.setAttribute("error","ùӦϢѾڣ"); + return mapping.findForward("error"); + }else if(rtn==1){ + return mapping.findForward("provideraddok"); + }else{ + request.setAttribute("error","ӦϢʧܣ"); + return mapping.findForward("error"); + } + } + public ActionForward providerQModify(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + int id=Integer.parseInt(request.getParameter("id")); + request.setAttribute("providerList",providerDAO.query(id)); + return mapping.findForward("providerQModify"); + } + public ActionForward providerModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + + ProviderForm providerForm = (ProviderForm) form; +// ChStr chStr=new ChStr(); +// providerForm.setName(chStr.toChinese(providerForm.getName())); +// providerForm.setAddress(chStr.toChinese(providerForm.getAddress())); +// providerForm.setBankName(chStr.toChinese(providerForm.getBankName())); +// providerForm.setMemo(chStr.toChinese(providerForm.getMemo())); + int rtn=providerDAO.Modify(providerForm); + if(rtn==1){ + return mapping.findForward("providermodiok"); + }else{ + request.setAttribute("error","޸ĹӦϢʧܣ"); + return mapping.findForward("error"); + } + } +} diff --git a/07/src/com/action/SelfRequestProcessor.java b/07/src/com/action/SelfRequestProcessor.java new file mode 100644 index 0000000..e098503 --- /dev/null +++ b/07/src/com/action/SelfRequestProcessor.java @@ -0,0 +1,18 @@ +package com.action; + +import org.apache.struts.action.RequestProcessor; +import javax.servlet.http.*; +import java.io.*; + +public class SelfRequestProcessor extends RequestProcessor { + public SelfRequestProcessor() { + } + protected boolean processPreprocess(HttpServletRequest request,HttpServletResponse response){ + try { + request.setCharacterEncoding("gb2312"); + } catch (UnsupportedEncodingException ex) { + ex.printStackTrace(); + } + return true; + } +} diff --git a/07/src/com/action/User.java b/07/src/com/action/User.java new file mode 100644 index 0000000..99129f7 --- /dev/null +++ b/07/src/com/action/User.java @@ -0,0 +1,139 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForward; +import com.actionForm.UserForm; +import org.apache.struts.action.Action; +import com.dao.UserDAO; + +public class User extends Action { + private UserDAO userDAO=null; + public User(){ + userDAO=new UserDAO(); + } + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String action = request.getParameter("action"); + if(action.equals("userQuery")){ + return userQuery(mapping,form,request,response); + }else if(action.equals("userdel")){ + return userDel(mapping, form, request, response); + }else if(action.equals("useradd")){ + return userAdd(mapping, form, request, response); + }else if(action.equals("userMQuery")){ + return userQModify(mapping, form, request, response); + }else if(action.equals("userModify")){ + return userModify(mapping, form, request, response); + }else if(action.equals("pwsModify")){ + return pwsModify(mapping,form,request,response); + }else if(action.equals("login")){ + return login(mapping,form,request,response); + }else{ + request.setAttribute("err","IJ"); + return mapping.findForward("error"); + } + } + //ѯûϢ + public ActionForward userQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String str = ""; + request.setAttribute("userList", userDAO.query(str)); + return mapping.findForward("userQuery"); + } + //ɾûϢ + public ActionForward userDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + + + int id=Integer.parseInt(request.getParameter("id")); + int rtn=userDAO.del(id); + if(rtn==0){ + request.setAttribute("error","ûϢɾ"); + return mapping.findForward("error"); + }else{ + return mapping.findForward("userdelok"); + } + } + //ûϢ + public ActionForward userAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + UserForm userForm = (UserForm) form; +// ChStr chStr=new ChStr(); +// userForm.setName(chStr.toChinese(userForm.getName())); +// userForm.setPwd(chStr.toChinese(userForm.getPwd())); + System.out.println("лȡInstorage:"+userForm.getSetInstorage()); + int rtn=userDAO.insert(userForm); + if(rtn==2){ + request.setAttribute("error","ûϢѾڣ"); + return mapping.findForward("error"); + }else if(rtn==1){ + return mapping.findForward("useraddok"); + }else{ + request.setAttribute("error","ûϢʧܣ"); + return mapping.findForward("error"); + } + } + //޸ûȨʱIJѯ + public ActionForward userQModify(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + int id=Integer.parseInt(request.getParameter("id")); + request.setAttribute("userList",userDAO.query(id)); + return mapping.findForward("userQModify"); + } + //޸û + public ActionForward pwsModify(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + UserForm userForm = (UserForm) form; +// ChStr chStr=new ChStr(); +// userForm.setName(chStr.toChinese(userForm.getName())); +// userForm.setPwd(chStr.toChinese(userForm.getPwd())); + userForm.setName(userForm.getName()); + userForm.setPwd(userForm.getPwd()); + int flag=1; //ֵΪ1ʱ޸ + int rtn=userDAO.Modify(userForm,flag); + if(rtn==1){ + return mapping.findForward("usermodipwdok"); + }else{ + request.setAttribute("error","û޸ʧܣ"); + return mapping.findForward("error"); + } + } + //޸ûϢ + public ActionForward userModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + + UserForm userForm = (UserForm) form; + // userForm.setName(userForm.getName()); ˾ȡעͣҪ޸ĵwghҪɾע +// ChStr chStr=new ChStr(); +// userForm.setName(chStr.toChinese(userForm.getName())); + int flag=2; // ֵΪ2ʱ޸Ȩ + int rtn=userDAO.Modify(userForm,flag); + if(rtn==1){ + return mapping.findForward("usermodiok"); + }else{ + request.setAttribute("error","޸ûȨϢʧܣ"); + return mapping.findForward("error"); + } + } + //û¼ + public ActionForward login(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + + UserForm userForm = (UserForm) form; + String rtn=userDAO.login(userForm,request); + if(rtn.equals("ok")){ + return mapping.findForward("loginok"); + }else{ + request.setAttribute("error",rtn); + return mapping.findForward("error"); + } + } + +} diff --git a/07/src/com/actionForm/BranchForm.hbm.xml b/07/src/com/actionForm/BranchForm.hbm.xml new file mode 100644 index 0000000..ef92435 --- /dev/null +++ b/07/src/com/actionForm/BranchForm.hbm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/07/src/com/actionForm/BranchForm.java b/07/src/com/actionForm/BranchForm.java new file mode 100644 index 0000000..63e3220 --- /dev/null +++ b/07/src/com/actionForm/BranchForm.java @@ -0,0 +1,63 @@ +package com.actionForm; + +import java.util.*; + +import org.apache.struts.action.*; + + +public class BranchForm extends ActionForm { + private int id; + private String name; + private String tel; + private String memo; + private Set getuse=new HashSet(); + private Set damage=new HashSet(); + public int getId() { + return id; + } + + public String getName() { + return name; + } + + public String getTel() { + return tel; + } + + public String getMemo() { + return memo; + } + + public Set getGetuse() { + return getuse; + } + + public Set getDamage() { + return damage; + } + + public void setId(int id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public void setTel(String tel) { + this.tel = tel; + } + + public void setMemo(String memo) { + this.memo = memo; + } + + public void setGetuse(Set getuse) { + this.getuse = getuse; + } + + public void setDamage(Set damage) { + this.damage = damage; + } + +} diff --git a/07/src/com/actionForm/CheckForm.hbm.xml b/07/src/com/actionForm/CheckForm.hbm.xml new file mode 100644 index 0000000..5ffeccf --- /dev/null +++ b/07/src/com/actionForm/CheckForm.hbm.xml @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/07/src/com/actionForm/CheckForm.java b/07/src/com/actionForm/CheckForm.java new file mode 100644 index 0000000..b3e0876 --- /dev/null +++ b/07/src/com/actionForm/CheckForm.java @@ -0,0 +1,32 @@ +package com.actionForm; + +import java.util.*; + +public class CheckForm { + private int stockid; + private Date checkTime; + private String checker; + public int getStockid() { + return stockid; + } + + public Date getCheckTime() { + return checkTime; + } + + public String getChecker() { + return checker; + } + + public void setStockid(int stockid) { + this.stockid = stockid; + } + + public void setCheckTime(Date checkTime) { + this.checkTime = checkTime; + } + + public void setChecker(String checker) { + this.checker = checker; + } +} diff --git a/07/src/com/actionForm/DamageForm.hbm.xml b/07/src/com/actionForm/DamageForm.hbm.xml new file mode 100644 index 0000000..2f69c47 --- /dev/null +++ b/07/src/com/actionForm/DamageForm.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/07/src/com/actionForm/DamageForm.java b/07/src/com/actionForm/DamageForm.java new file mode 100644 index 0000000..18a306d --- /dev/null +++ b/07/src/com/actionForm/DamageForm.java @@ -0,0 +1,98 @@ +package com.actionForm; + +import java.util.*; + +import org.apache.struts.action.*; + +public class DamageForm extends ActionForm { + private int id; + private int branchid; + private int goodsid; + private int damagenum; + private Date createtime; + private String principal; + private String username; + private String cause; + private GoodsForm goods; + private BranchForm branch; + public int getId() { + return id; + } + + public int getBranchid() { + return branchid; + } + + public int getGoodsid() { + return goodsid; + } + + public int getDamagenum() { + return damagenum; + } + + public Date getCreatetime() { + return createtime; + } + + public String getPrincipal() { + return principal; + } + + public String getUsername() { + return username; + } + + public String getCause() { + return cause; + } + + public GoodsForm getGoods() { + return goods; + } + + public BranchForm getBranch() { + return branch; + } + + public void setId(int id) { + this.id = id; + } + + public void setBranchid(int branchid) { + this.branchid = branchid; + } + + public void setGoodsid(int goodsid) { + this.goodsid = goodsid; + } + + public void setDamagenum(int damagenum) { + this.damagenum = damagenum; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public void setUsername(String username) { + this.username = username; + } + + public void setCause(String cause) { + this.cause = cause; + } + + public void setGoods(GoodsForm goods) { + this.goods = goods; + } + + public void setBranch(BranchForm branch) { + this.branch = branch; + } + +} diff --git a/07/src/com/actionForm/GetUseForm.hbm.xml b/07/src/com/actionForm/GetUseForm.hbm.xml new file mode 100644 index 0000000..2c6ee8f --- /dev/null +++ b/07/src/com/actionForm/GetUseForm.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/07/src/com/actionForm/GetUseForm.java b/07/src/com/actionForm/GetUseForm.java new file mode 100644 index 0000000..860e0d6 --- /dev/null +++ b/07/src/com/actionForm/GetUseForm.java @@ -0,0 +1,98 @@ +package com.actionForm; + +import java.util.*; + +import org.apache.struts.action.*; + +public class GetUseForm extends ActionForm { + private int id; + private String gno=""; + private int goodsid; + private int number; + private String principal; + private String username; + private int branchid; + private Date createtime; + private GoodsForm goods; + private BranchForm branch; + public int getId() { + return id; + } + + public String getGno() { + return gno; + } + + public int getGoodsid() { + return goodsid; + } + + public int getNumber() { + return number; + } + + public String getPrincipal() { + return principal; + } + + public String getUsername() { + return username; + } + + public int getBranchid() { + return branchid; + } + + public Date getCreatetime() { + return createtime; + } + + public GoodsForm getGoods() { + return goods; + } + + public BranchForm getBranch() { + return branch; + } + + public void setId(int id) { + this.id = id; + } + + public void setGno(String gno) { + this.gno = gno; + } + + public void setGoodsid(int goodsid) { + this.goodsid = goodsid; + } + + public void setNumber(int number) { + this.number = number; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public void setUsername(String username) { + this.username = username; + } + + public void setBranchid(int branchid) { + this.branchid = branchid; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + public void setGoods(GoodsForm goods) { + this.goods = goods; + } + + public void setBranch(BranchForm branch) { + this.branch = branch; + } + +} diff --git a/07/src/com/actionForm/GoodsForm.hbm.xml b/07/src/com/actionForm/GoodsForm.hbm.xml new file mode 100644 index 0000000..567023d --- /dev/null +++ b/07/src/com/actionForm/GoodsForm.hbm.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/07/src/com/actionForm/GoodsForm.java b/07/src/com/actionForm/GoodsForm.java new file mode 100644 index 0000000..6192da3 --- /dev/null +++ b/07/src/com/actionForm/GoodsForm.java @@ -0,0 +1,109 @@ +package com.actionForm; + +import java.util.*; + +import org.apache.struts.action.*; + +public class GoodsForm extends ActionForm { + private int id; + private String name=""; + private String spec=""; + private String unit=""; + private float price=0.0f; + private String producer; + private Byte ifdel; + private Set stockDetail=new HashSet(); + private Set loan=new HashSet(); + private Set getuse=new HashSet(); + private Set damage=new HashSet(); + + + public int getId() { + return id; + } + + public String getName() { + return name; + } + + public String getSpec() { + return spec; + } + + public String getUnit() { + return unit; + } + + public float getPrice() { + return price; + } + + public String getProducer() { + return producer; + } + + public Byte getIfdel() { + return ifdel; + } + + public Set getStockDetail() { + return stockDetail; + } + + public Set getLoan() { + return loan; + } + + public Set getGetuse() { + return getuse; + } + + public Set getDamage() { + return damage; + } + + public void setId(int id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public void setSpec(String spec) { + this.spec = spec; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public void setPrice(float price) { + this.price = price; + } + + public void setProducer(String producer) { + this.producer = producer; + } + + public void setIfdel(Byte ifdel) { + this.ifdel = ifdel; + } + + public void setStockDetail(Set stockDetail) { + this.stockDetail = stockDetail; + } + + public void setLoan(Set loan) { + this.loan = loan; + } + + public void setGetuse(Set getuse) { + this.getuse = getuse; + } + + public void setDamage(Set damage) { + this.damage = damage; + } + +} diff --git a/07/src/com/actionForm/IfForm.java b/07/src/com/actionForm/IfForm.java new file mode 100644 index 0000000..8128fc7 --- /dev/null +++ b/07/src/com/actionForm/IfForm.java @@ -0,0 +1,62 @@ +package com.actionForm; + +import org.apache.struts.action.*; + +public class IfForm extends ActionForm { + private String flag[]=null; + private String f=""; + private String key=""; + private String sdate=""; + private String edate=""; + private int state; + public IfForm(){ + } + + public void setFlag(String flag[]) { + this.flag = flag; + } + + public void setF(String f) { + this.f = f; + } + + public void setKey(String key) { + this.key = key; + } + + public void setSdate(String sdate) { + this.sdate = sdate; + } + + public void setEdate(String edate) { + this.edate = edate; + } + + public void setState(int state) { + this.state = state; + } + + public String[] getFlag() { + return flag; + } + + public String getF() { + return f; + } + + public String getKey() { + return key; + } + + public String getSdate() { + return sdate; + } + + public String getEdate() { + return edate; + } + + public int getState() { + return state; + } +} diff --git a/07/src/com/actionForm/InStorageForm.hbm.xml b/07/src/com/actionForm/InStorageForm.hbm.xml new file mode 100644 index 0000000..573fa75 --- /dev/null +++ b/07/src/com/actionForm/InStorageForm.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/07/src/com/actionForm/InStorageForm.java b/07/src/com/actionForm/InStorageForm.java new file mode 100644 index 0000000..de8d0c2 --- /dev/null +++ b/07/src/com/actionForm/InStorageForm.java @@ -0,0 +1,53 @@ +package com.actionForm; + +import java.util.*; + +import org.apache.struts.action.*; + +public class InStorageForm extends ActionForm { + private int id; + private String ino; + private int stockid; + private Date createTime; + private String username; + public int getId() { + return id; + } + + public String getIno() { + return ino; + } + + public int getStockid() { + return stockid; + } + + public Date getCreateTime() { + return createTime; + } + + public String getUsername() { + return username; + } + + public void setId(int id) { + this.id = id; + } + + public void setIno(String ino) { + this.ino = ino; + } + + public void setStockid(int stockid) { + this.stockid = stockid; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public void setUsername(String username) { + this.username = username; + } + +} diff --git a/07/src/com/actionForm/LoanForm.hbm.xml b/07/src/com/actionForm/LoanForm.hbm.xml new file mode 100644 index 0000000..0acb73f --- /dev/null +++ b/07/src/com/actionForm/LoanForm.hbm.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/07/src/com/actionForm/LoanForm.java b/07/src/com/actionForm/LoanForm.java new file mode 100644 index 0000000..d31cc25 --- /dev/null +++ b/07/src/com/actionForm/LoanForm.java @@ -0,0 +1,153 @@ +package com.actionForm; + +import java.util.*; + +import org.apache.struts.action.*; + +public class LoanForm extends ActionForm { + private int id; + private String lno; + private int goodsid; + private int number; + private String username; + private String principal; + private String borrowperson; + private String btel=""; + private String bunit=""; + private Date createtime; + private short state=0; //״̬ 0δˣ1ˣ2ѹ黹 + // private short state=new Short("0"); //״̬ 0δˣ1ˣ2ѹ黹 + private String taster=""; // + private Date approvetime=null; + private GoodsForm goods; + private String backperson=""; //黹Ա + private Date backtime=null; + + public void setId(int id) { + this.id = id; + } + + public void setLno(String lno) { + this.lno = lno; + } + + public void setGoodsid(int goodsid) { + this.goodsid = goodsid; + } + + public void setNumber(int number) { + this.number = number; + } + + public void setUsername(String username) { + this.username = username; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public void setBorrowperson(String borrowperson) { + this.borrowperson = borrowperson; + } + + public void setBtel(String btel) { + this.btel = btel; + } + + public void setBunit(String bunit) { + this.bunit = bunit; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + public void setState(short state) { + this.state = state; + } + + public void setTaster(String taster) { + this.taster = taster; + } + + public void setApprovetime(Date approvetime) { + this.approvetime = approvetime; + } + + public void setGoods(GoodsForm goods) { + this.goods = goods; + } + + public void setBackperson(String backperson) { + this.backperson = backperson; + } + + public void setBacktime(Date backtime) { + this.backtime = backtime; + } + + public int getId() { + return id; + } + + public String getLno() { + return lno; + } + + public int getGoodsid() { + return goodsid; + } + + public int getNumber() { + return number; + } + + public String getUsername() { + return username; + } + + public String getPrincipal() { + return principal; + } + + public String getBorrowperson() { + return borrowperson; + } + + public String getBtel() { + return btel; + } + + public String getBunit() { + return bunit; + } + + public Date getCreatetime() { + return createtime; + } + + public short getState() { + return state; + } + + public String getTaster() { + return taster; + } + + public Date getApprovetime() { + return approvetime; + } + + public GoodsForm getGoods() { + return goods; + } + + public String getBackperson() { + return backperson; + } + + public Date getBacktime() { + return backtime; + } +} diff --git a/07/src/com/actionForm/ProviderForm.hbm.xml b/07/src/com/actionForm/ProviderForm.hbm.xml new file mode 100644 index 0000000..a567f00 --- /dev/null +++ b/07/src/com/actionForm/ProviderForm.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/07/src/com/actionForm/ProviderForm.java b/07/src/com/actionForm/ProviderForm.java new file mode 100644 index 0000000..718709d --- /dev/null +++ b/07/src/com/actionForm/ProviderForm.java @@ -0,0 +1,87 @@ +package com.actionForm; + +import org.apache.struts.action.*; + +public class ProviderForm extends ActionForm { + private int id=-1; + private String name=""; + private String address=""; + private String fax=""; + private String tel=""; + private String postcode=""; + private String bankNo=""; + private String bankName=""; + private String memo=""; + public int getId() { + return id; + } + + public String getName() { + return name; + } + + public String getAddress() { + return address; + } + + public String getFax() { + return fax; + } + + public String getTel() { + return tel; + } + + public String getPostcode() { + return postcode; + } + + public String getBankNo() { + return bankNo; + } + + public String getBankName() { + return bankName; + } + + public String getMemo() { + return memo; + } + + public void setId(int id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public void setAddress(String address) { + this.address = address; + } + + public void setFax(String fax) { + this.fax = fax; + } + + public void setTel(String tel) { + this.tel = tel; + } + + public void setPostcode(String postcode) { + this.postcode = postcode; + } + + public void setBankNo(String bankNo) { + this.bankNo = bankNo; + } + + public void setBankName(String bankName) { + this.bankName = bankName; + } + + public void setMemo(String memo) { + this.memo = memo; + } + +} diff --git a/07/src/com/actionForm/StockDetailForm.hbm.xml b/07/src/com/actionForm/StockDetailForm.hbm.xml new file mode 100644 index 0000000..573a66d --- /dev/null +++ b/07/src/com/actionForm/StockDetailForm.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + diff --git a/07/src/com/actionForm/StockDetailForm.java b/07/src/com/actionForm/StockDetailForm.java new file mode 100644 index 0000000..d69e607 --- /dev/null +++ b/07/src/com/actionForm/StockDetailForm.java @@ -0,0 +1,78 @@ +package com.actionForm; + +import org.apache.struts.action.*; + +public class StockDetailForm extends ActionForm { + private int goodsid; + private float price; + private int number; + private StockMainForm stockMain; + private StockMainViewForm stockViewMain; + private int stockid; + private int id; + private GoodsForm goods; + public int getGoodsid() { + return goodsid; + } + + public float getPrice() { + return price; + } + + public int getNumber() { + return number; + } + + public StockMainForm getStockMain() { + return stockMain; + } + + public StockMainViewForm getStockViewMain() { + return stockViewMain; + } + + public int getStockid() { + return stockid; + } + + public int getId() { + return id; + } + + public GoodsForm getGoods() { + return goods; + } + + public void setGoodsid(int goodsid) { + this.goodsid = goodsid; + } + + public void setPrice(float price) { + this.price = price; + } + + public void setNumber(int number) { + this.number = number; + } + + public void setStockMain(StockMainForm stockMain) { + this.stockMain = stockMain; + } + + public void setStockViewMain(StockMainViewForm stockViewMain) { + this.stockViewMain = stockViewMain; + } + + public void setStockid(int stockid) { + this.stockid = stockid; + } + + public void setId(int id) { + this.id = id; + } + + public void setGoods(GoodsForm goods) { + this.goods = goods; + } + +} diff --git a/07/src/com/actionForm/StockGoodsForm.java b/07/src/com/actionForm/StockGoodsForm.java new file mode 100644 index 0000000..aab54eb --- /dev/null +++ b/07/src/com/actionForm/StockGoodsForm.java @@ -0,0 +1,32 @@ +package com.actionForm; + +import org.apache.struts.action.ActionForm; + +public class StockGoodsForm extends ActionForm { + private int id; + private float price; + private int number; + public int getId() { + return id; + } + + public float getPrice() { + return price; + } + + public int getNumber() { + return number; + } + + public void setId(int id) { + this.id = id; + } + + public void setPrice(float price) { + this.price = price; + } + + public void setNumber(int number) { + this.number = number; + } +} diff --git a/07/src/com/actionForm/StockMainForm.hbm.xml b/07/src/com/actionForm/StockMainForm.hbm.xml new file mode 100644 index 0000000..29d4103 --- /dev/null +++ b/07/src/com/actionForm/StockMainForm.hbm.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/07/src/com/actionForm/StockMainForm.java b/07/src/com/actionForm/StockMainForm.java new file mode 100644 index 0000000..28e19df --- /dev/null +++ b/07/src/com/actionForm/StockMainForm.java @@ -0,0 +1,84 @@ +package com.actionForm; + +import java.util.*; + +import org.apache.struts.action.*; + +public class StockMainForm extends ActionForm { + private int id; + private String principal; + private int providerid; + private String username; + private Date createTime; + private int state; + private Set stockDetail=new HashSet(); + private String sno; + public int getId() { + return id; + } + + public String getPrincipal() { + return principal; + } + + public int getProviderid() { + return providerid; + } + + public String getUsername() { + return username; + } + + public Date getCreateTime() { + return createTime; + } + + public int getState() { + return state; + } + + public Set getStockDetail() { + return stockDetail; + } + + public String getSno() { + return sno; + } + + public void setId(int id) { + this.id = id; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public void setProviderid(int providerid) { + this.providerid = providerid; + } + + public void setUsername(String username) { + this.username = username; + } + +// public void setCreateTime(String createTime) { +// this.createTime =Date.valueOf(createTime); +// } +// public void setCreateTime(String createTime) { +// this.createTime =new Date(); +// } + public void setCreateTime(Date createTime) { + this.createTime =createTime; + } + public void setState(int state) { + this.state = state; + } + + public void setStockDetail(Set stockDetail) { + this.stockDetail = stockDetail; + } + + public void setSno(String sno) { + this.sno = sno; + } +} diff --git a/07/src/com/actionForm/StockMainViewForm.hbm.xml b/07/src/com/actionForm/StockMainViewForm.hbm.xml new file mode 100644 index 0000000..f3be55a --- /dev/null +++ b/07/src/com/actionForm/StockMainViewForm.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/07/src/com/actionForm/StockMainViewForm.java b/07/src/com/actionForm/StockMainViewForm.java new file mode 100644 index 0000000..75a9cb3 --- /dev/null +++ b/07/src/com/actionForm/StockMainViewForm.java @@ -0,0 +1,89 @@ +package com.actionForm; + +import java.util.Set; +import java.util.Date; +import java.util.HashSet; + +public class StockMainViewForm { + private int id; + private String principal; + private int providerid; + private String username; + private Date createTime; + private int state; + private Set stockDetail=new HashSet(); + private String sno; + private String provider; + + public String getProvider() { + return provider; + } + + + public int getId() { + return id; + } + + public String getPrincipal() { + return principal; + } + + public int getProviderid() { + return providerid; + } + + public String getUsername() { + return username; + } + + public Date getCreateTime() { + return createTime; + } + + public int getState() { + return state; + } + + public Set getStockDetail() { + return stockDetail; + } + + public String getSno() { + return sno; + } + + public void setId(int id) { + this.id = id; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public void setProviderid(int providerid) { + this.providerid = providerid; + } + + public void setUsername(String username) { + this.username = username; + } + + public void setCreateTime(Date createTime) { + this.createTime =createTime; + } + public void setState(int state) { + this.state = state; + } + + public void setStockDetail(Set stockDetail) { + this.stockDetail = stockDetail; + } + + public void setSno(String sno) { + this.sno = sno; + } + public void setProvider(String provider) { + this.provider = provider; + } + +} diff --git a/07/src/com/actionForm/StorageForm.hbm.xml b/07/src/com/actionForm/StorageForm.hbm.xml new file mode 100644 index 0000000..53179ec --- /dev/null +++ b/07/src/com/actionForm/StorageForm.hbm.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/07/src/com/actionForm/StorageForm.java b/07/src/com/actionForm/StorageForm.java new file mode 100644 index 0000000..72a358d --- /dev/null +++ b/07/src/com/actionForm/StorageForm.java @@ -0,0 +1,30 @@ +package com.actionForm; + +public class StorageForm { + private int id; + private int number; + private int goodsid; + public int getId() { + return id; + } + + public int getNumber() { + return number; + } + + public int getGoodsid() { + return goodsid; + } + + public void setId(int id) { + this.id = id; + } + + public void setNumber(int number) { + this.number = number; + } + + public void setGoodsid(int goodsid) { + this.goodsid = goodsid; + } +} diff --git a/07/src/com/actionForm/UserForm.hbm.xml b/07/src/com/actionForm/UserForm.hbm.xml new file mode 100644 index 0000000..912166e --- /dev/null +++ b/07/src/com/actionForm/UserForm.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/07/src/com/actionForm/UserForm.java b/07/src/com/actionForm/UserForm.java new file mode 100644 index 0000000..1da4e45 --- /dev/null +++ b/07/src/com/actionForm/UserForm.java @@ -0,0 +1,87 @@ +package com.actionForm; + +import org.apache.struts.action.*; +public class UserForm extends ActionForm { + private int id; + private String name; + private String pwd; + private Byte setInstorage = new Byte("0"); + private Byte setOutstorage= new Byte("0"); + private Byte setDeal= new Byte("0"); + private Byte setQuery= new Byte("0"); + private Byte setBasic= new Byte("0"); + private Byte setSys= new Byte("0"); + public int getId() { + return id; + } + + public String getName() { + return name; + } + + public String getPwd() { + return pwd; + } + + public Byte getSetInstorage() { + return setInstorage; + } + + public Byte getSetOutstorage() { + return setOutstorage; + } + + public Byte getSetDeal() { + return setDeal; + } + + public Byte getSetQuery() { + return setQuery; + } + + public Byte getSetBasic() { + return setBasic; + } + + public Byte getSetSys() { + return setSys; + } + + public void setId(int id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public void setPwd(String pwd) { + this.pwd = pwd; + } + + public void setSetInstorage(Byte setInstorage) { + this.setInstorage = setInstorage; + } + + public void setSetOutstorage(Byte setOutstorage) { + this.setOutstorage = setOutstorage; + } + + public void setSetDeal(Byte setDeal) { + this.setDeal = setDeal; + } + + public void setSetQuery(Byte setQuery) { + this.setQuery = setQuery; + } + + public void setSetBasic(Byte setBasic) { + this.setBasic = setBasic; + } + + public void setSetSys(Byte setSys) { + this.setSys = setSys; + } + +} + diff --git a/07/src/com/core/GetTime.java b/07/src/com/core/GetTime.java new file mode 100644 index 0000000..5b6d228 --- /dev/null +++ b/07/src/com/core/GetTime.java @@ -0,0 +1,33 @@ +package com.core; + +import java.util.Date; +import java.text.SimpleDateFormat; +import java.util.Calendar; + +public class GetTime { + //ȡϵͳ + public Date getDate(){ + Date dateU = new Date(); + java.sql.Date date = new java.sql.Date(dateU.getTime()); + System.out.println(date); + return date; + } + //ȡϵͳںʱ + public String getDateTime(){ + SimpleDateFormat format; + Date date=null; + Calendar myDate=Calendar.getInstance(); + myDate.setTime(new java.util.Date()); + date=myDate.getTime(); + format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String rtnStr=format.format(date); +// String rtnStr=new java.util.Date().toLocaleString(); + return rtnStr; + } + //ʽʱΪ-- ʱ֣롱ĸʽ + public String formatTime(Date date){ + SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String str=format.format(date); + return str; + } +} diff --git a/07/src/com/core/MySession.java b/07/src/com/core/MySession.java new file mode 100644 index 0000000..7c8f82a --- /dev/null +++ b/07/src/com/core/MySession.java @@ -0,0 +1,35 @@ +package com.core; + +import org.hibernate.SessionFactory; +import org.hibernate.cfg.Configuration; +import org.hibernate.Session; +import java.util.List; +import org.hibernate.SQLQuery; +import com.actionForm.GetUseForm; +import org.hibernate.Query; + +public class MySession { + static SessionFactory sessionFactory; + static { + try { + Configuration config = new Configuration().configure(); + sessionFactory = config.buildSessionFactory(); + } catch (Exception e) { + System.out.println("SessionFactoryʱĴϢ" + e.getMessage()); + } + } + + //Session + public static Session openSession() { + Session session = sessionFactory.openSession(); + return session; + } + + //رSession + public static void closeSession(Session session) { + if (session != null) { + session.close(); + } + } + +} diff --git a/07/src/com/dao/BranchDAO.java b/07/src/com/dao/BranchDAO.java new file mode 100644 index 0000000..e0f35bb --- /dev/null +++ b/07/src/com/dao/BranchDAO.java @@ -0,0 +1,89 @@ +package com.dao; + +import org.hibernate.Session; +import java.util.List; +import org.hibernate.Query; +import org.hibernate.Transaction; +import com.actionForm.BranchForm; +import com.core.MySession; + +public class BranchDAO { + private Session session = null; + public List query(String strif) { + session = MySession.openSession(); //Session + String hql = ""; + if (strif != "all" && strif != null && strif != "") { //ѯ + hql = "FROM BranchForm branch WHERE " + strif + + ""; + } else { //ѯȫ + hql = "FROM BranchForm branch"; + } + System.out.println(hql); + List list = null; + try { + Query query = session.createQuery(hql); + list = query.list(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + MySession.closeSession(session); //رSession + } + return list; + } + +//沿Ϣ + public int insert(BranchForm branchForm) { + int ret = 0; + Transaction tx = null; +// ChStr chStr=new ChStr(); +// branchForm.setName(chStr.toChinese(branchForm.getName())); +// branchForm.setMemo(chStr.toChinese(branchForm.getMemo())); + String str = "name='" + branchForm.getName() + "'"; + List list = query(str); + if (list.size() > 0) { //ڸϢ + ret = 2; + } else { + session = MySession.openSession(); //Session + try { + tx = session.beginTransaction(); + session.save(branchForm); + tx.commit(); + ret = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("ӲϢʱĴϢ" + e.getMessage()); + return ret = 0; + } finally { + MySession.closeSession(session); //رSession + } + } + return ret; + } + +//ɾϢ + public int del(int id) { + session = MySession.openSession(); //Session + int ret = 0; + Transaction tx = null; + try { + tx = session.beginTransaction(); + BranchForm branchF = (BranchForm) session.get(BranchForm.class, id); + session.delete(branchF); + tx.commit(); + ret = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("ɾϢʱĴϢ" + e.getMessage()); + return ret = 0; + } finally { + MySession.closeSession(session); //رSession + } + return ret; + } + + +} diff --git a/07/src/com/dao/GoodsDAO.java b/07/src/com/dao/GoodsDAO.java new file mode 100644 index 0000000..045d111 --- /dev/null +++ b/07/src/com/dao/GoodsDAO.java @@ -0,0 +1,131 @@ +package com.dao; + +import org.hibernate.Session; +import java.util.List; +import org.hibernate.Query; +import com.actionForm.GoodsForm; +import org.hibernate.Transaction; +import com.core.MySession; + +public class GoodsDAO { + private Session session = null; + public List query(String strif, int del) { + session = MySession.openSession(); //Session + String hql = ""; + if (strif != "all" && strif != null && strif != "") { //ѯ + hql = "FROM GoodsForm goods WHERE " + strif + ""; + } else { //ѯȫ + hql = "FROM GoodsForm goods WHERE ifdel=" + del + " ORDER BY ifdel"; + } + System.out.println(hql); + List list=null; + try { + Query query = session.createQuery(hql); + list = query.list(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + MySession.closeSession(session); //رSession + } + return list; + } + + //޸ƷϢʱIJѯ + public GoodsForm query(int id) { + session = MySession.openSession(); //Session + GoodsForm goodsForm = null; + try { + goodsForm = (GoodsForm) session.get(GoodsForm.class, id); + } catch (Exception e) { + e.printStackTrace(); + } finally { + MySession.closeSession(session); //رSession + } + return goodsForm; + } + + public int insert(GoodsForm goodsForm) { + int ret = 0; + Transaction tx = null; + String str = "name='" + goodsForm.getName() + "' AND spec='" + + goodsForm.getSpec() + "'"; + List list = query(str, 0); + if (list.size() > 0) { //ڸϢ + ret = 2; + } else { + session = MySession.openSession(); //Session + try { + tx = session.beginTransaction(); + session.save(goodsForm); + tx.commit(); + ret = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("ϢʱĴϢ" + e.getMessage()); + return ret = 0; + } finally { + MySession.closeSession(session); //رSession + } + } + return ret; + } + + // ޸Ϣ + public int update(GoodsForm goodsForm) { + session = MySession.openSession(); //Session + int ret = 0; + Transaction tx = null; + try { + tx = session.beginTransaction(); +// ChStr chStr=new ChStr(); + GoodsForm goodsF = (GoodsForm) session.get(GoodsForm.class, + goodsForm.getId()); + goodsF.setSpec(goodsForm.getSpec()); + goodsF.setUnit(goodsForm.getUnit()); + goodsF.setPrice(goodsForm.getPrice()); + goodsF.setProducer(goodsForm.getProducer()); +// goodsF.setSpec(chStr.toChinese(goodsForm.getSpec())); +// goodsF.setUnit(chStr.toChinese(goodsForm.getUnit())); +// goodsF.setPrice(goodsForm.getPrice()); +// goodsF.setProducer(chStr.toChinese(goodsForm.getProducer())); + session.update(goodsF); + tx.commit(); + ret = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("޸ϢʱĴϢ" + e.getMessage()); + return ret = 0; + } finally { + MySession.closeSession(session); //رSession + } + return ret; + } + + public int del(int id, byte val) { + session = MySession.openSession(); //Session + int ret = 0; + Transaction tx = null; + try { + tx = session.beginTransaction(); + GoodsForm goodsF = (GoodsForm) session.get(GoodsForm.class, id); + goodsF.setIfdel(val); + System.out.println(val + "*********" + id); + session.update(goodsF); + tx.commit(); + ret = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("ɾ/ָϢʱĴϢ" + e.getMessage()); + return ret = 0; + } finally { + MySession.closeSession(session); //رSession + } + return ret; + } +} diff --git a/07/src/com/dao/InstorageDAO.java b/07/src/com/dao/InstorageDAO.java new file mode 100644 index 0000000..370ad6b --- /dev/null +++ b/07/src/com/dao/InstorageDAO.java @@ -0,0 +1,306 @@ +package com.dao; + +import org.hibernate.Session; +import com.core.MySession; +import com.actionForm.StockGoodsForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; +import java.util.List; +import java.util.LinkedList; +import com.actionForm.StockMainForm; +import org.hibernate.Transaction; +import java.text.NumberFormat; +import com.actionForm.StockDetailForm; +import java.util.Set; +import java.util.HashSet; +import com.actionForm.IfForm; +import org.hibernate.Query; +import com.actionForm.StockMainViewForm; +import java.util.Date; +import com.actionForm.GoodsForm; +import com.actionForm.InStorageForm; +import com.actionForm.StorageForm; +import com.actionForm.CheckForm; +import com.actionForm.LoanForm; + +public class InstorageDAO { + private Session session = null; + // session=MySession.openSession(); //Session +// MySession.closeSession(session); //رSession + public void cart_add(StockGoodsForm goodsForm, HttpServletRequest request) { + HttpSession httpsession = request.getSession(); + System.out.println("******************:" + + httpsession.getAttribute("stockgoods") + + "**********"); + if (httpsession.getAttribute("stockgoods") != null && + !httpsession.getAttribute("stockgoods").equals("")) { + List list = (List) httpsession.getAttribute("stockgoods"); + boolean flag = true; + for (int i = 0; i < list.size(); i++) { //жǷѾ˸ü¼ + StockGoodsForm goodsF = (StockGoodsForm) list.get(i); + if (goodsF.getId() == goodsForm.getId()) { //Ѿɹ + goodsF.setNumber(goodsF.getNumber() + goodsForm.getNumber()); + list.set(i, goodsF); //趨ָλiԪ + flag = false; + break; + } + } + if (flag) { + list.add(goodsForm); + } + httpsession.setAttribute("stockgoods", list); + } else { + System.out.println("goodsForm:" + goodsForm); + List list = new LinkedList(); + list.add(goodsForm); + httpsession.setAttribute("stockgoods", list); + } + } + + public void cart_remove(int id, HttpServletRequest request) { + HttpSession httpsession = request.getSession(); + List list = (List) httpsession.getAttribute("stockgoods"); + if (list.size() > 1) { + list.remove(id); //ȥָϢ + httpsession.setAttribute("stockgoods", list); + } else { + httpsession.removeAttribute("stockgoods"); + } + } + + //ձϢSession + public void cart_clear(HttpServletRequest request) { + HttpSession httpsession = request.getSession(); + httpsession.removeAttribute("stockgoods"); + } + +//ӲɹϢ + public int stockadd(StockMainForm stockMainForm, HttpServletRequest request) { + int rtn = 1; + HttpSession httpsession = request.getSession(); + List list = (List) httpsession.getAttribute("stockgoods"); + Transaction tx = null; + if (list.size() <= 0) { + rtn = 0; + } else { + session = MySession.openSession(); //Session + try { + tx = session.beginTransaction(); + System.out.println("ӦID" + stockMainForm.getProviderid()); + + for (int i = 0; i < list.size(); i++) { + StockDetailForm stockDetailForm = new StockDetailForm(); + StockGoodsForm stockGoods = (StockGoodsForm) list.get(i); + stockMainForm.setCreateTime(new Date()); + + int goodsid = stockGoods.getId(); + GoodsForm goodsForm = (GoodsForm) session.get(GoodsForm.class, + goodsid); + stockDetailForm.setGoods(goodsForm); +// System.out.println("GOODSID:"+goodsForm.getId()); + +// stockDetailForm.setGoodsid(stockGoods.getId()); + stockDetailForm.setNumber(stockGoods.getNumber()); + stockDetailForm.setPrice(stockGoods.getPrice()); + stockMainForm.getStockDetail().add(stockDetailForm); + stockDetailForm.setStockMain(stockMainForm); + System.out.println("goods.getId:" + stockGoods.getId() + + "**********" + + stockDetailForm.getGoodsid()); + } + session.save(stockMainForm); + + /*********ɲɹ*******************/ + NumberFormat formater = NumberFormat.getNumberInstance(); + int id = stockMainForm.getId(); + formater.setMinimumIntegerDigits(5); + java.util.Date createTime = stockMainForm.getCreateTime(); + java.sql.Date date = new java.sql.Date(createTime.getTime()); + String sNo = "CG" + date + + formater.format(id).toString().replace(",", ""); //ϲɹ + /**************************************/ + //ɹ + StockMainForm stockmaniF = (StockMainForm) session.get( + StockMainForm.class, id); + stockmaniF.setSno(sNo); + session.update(stockmaniF); + tx.commit(); + httpsession.removeAttribute("stockgoods"); + rtn=1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + rtn=0; + e.printStackTrace(); + System.out.println("ɹϢʱĴʾ" + e.getMessage()); + } finally { + MySession.closeSession(session); //رSession + } + } + return rtn; + } + + //Ϣ + public int eligibleAdd(int id, HttpServletRequest request) { + int rtn = 1; + session = MySession.openSession(); //session + Transaction tx = null; + try { + tx = session.beginTransaction(); + InStorageForm inStorageForm = new InStorageForm(); + inStorageForm.setStockid(id); + inStorageForm.setCreateTime(new Date()); + HttpSession httpsession = request.getSession(); + inStorageForm.setUsername((String) httpsession.getAttribute( + "username")); //òԱ + session.save(inStorageForm); //Ϣ + /********ⵥϢ***********/ + NumberFormat formater = NumberFormat.getNumberInstance(); + int iid = inStorageForm.getId(); + formater.setMinimumIntegerDigits(5); + java.util.Date inTime = inStorageForm.getCreateTime(); + java.sql.Date date = new java.sql.Date(inTime.getTime()); + String ino = "RK" + date + + formater.format(iid).toString().replace(",", ""); //ⵥ + /**********************************/ + //ⵥ + InStorageForm inStorageF = (InStorageForm) session.get( + InStorageForm.class, iid); + inStorageF.setIno(ino); + session.update(inStorageF); + //޸IJɹ״̬Ϊ + StockMainForm stockMainForm = (StockMainForm) session.get( + StockMainForm.class, id); + stockMainForm.setState(1); + session.update(stockMainForm); + //޸ĿϢ + String hql = "FROM StockDetailForm WHERE stockid=" + id + ""; + System.out.println("HQL:" + hql); + List list = null; + Query query = session.createQuery(hql); + list = query.list(); + System.out.println("˵list.size:" + list.size()); + int goodsid = 0; + int goodsnumber = 0; + String sql = ""; + for (int i = 0; i < list.size(); i++) { + StockDetailForm stockdetailF = (StockDetailForm) list.get(i); + goodsid = stockdetailF.getGoods().getId(); //ƷID + goodsnumber = stockdetailF.getNumber(); //ɹ + //жǷѾҪƷ + String hql_goods = "FROM StorageForm WHERE goodsid=" + goodsid + + ""; + List list_goods = session.createQuery(hql_goods).list(); + if (list_goods.size() > 0) { + String hql_up = "UPDATE StorageForm set number=number+" + + goodsnumber + " WHERE goodsid=" + goodsid + + ""; + System.out.println("HQL_UP:" + hql_up); + session.createQuery(hql_up).executeUpdate(); + + } else { //ʱ + StorageForm storageF = new StorageForm(); + storageF.setGoodsid(goodsid); + storageF.setNumber(goodsnumber); + session.save(storageF); + System.out.println(""); + } + + } + tx.commit(); + } catch (Exception e) { + System.out.println("ʱĴϢ" + e.getMessage()); + e.printStackTrace(); + if (tx != null) { + tx.rollback(); + } + rtn = 0; + } finally { + MySession.closeSession(session); //رSession + } + return rtn; + } + + //˲ϸ + public int uneligibleAdd(int id, HttpServletRequest request) { + int rtn = 1; + session = MySession.openSession(); //session + Transaction tx = null; + try { + tx = session.beginTransaction(); + CheckForm checkForm = new CheckForm(); + checkForm.setStockid(id); + checkForm.setCheckTime(new Date()); + HttpSession httpsession = request.getSession(); + checkForm.setChecker((String) httpsession.getAttribute("username")); //òԱ + session.save(checkForm); //˲ϸϢ + //޸IJɹ״̬Ϊϸ + StockMainForm stockMainForm = (StockMainForm) session.get( + StockMainForm.class, id); + stockMainForm.setState(2); + session.update(stockMainForm); + tx.commit(); + } catch (Exception e) { + System.out.println("˲ϸʱĴϢ" + e.getMessage()); + e.printStackTrace(); + if (tx != null) { + tx.rollback(); + } + rtn = 0; + } finally { + MySession.closeSession(session); //رSession + } + return rtn; + } + +//黹 + public int backloan(int id, HttpServletRequest request) { + int rtn = 1; + session = MySession.openSession(); //session + Transaction tx = null; + try { + tx = session.beginTransaction(); + LoanForm loanForm = (LoanForm) session.get(LoanForm.class, id); + loanForm.setBacktime(new Date()); + HttpSession httpsession = request.getSession(); + loanForm.setBackperson((String) httpsession.getAttribute("username")); //ù黹 + loanForm.setState(new Short("2")); //޸Ľ״̬Ϊѹ黹 + session.update(loanForm); //黹Ϣ + //޸ĿϢ + GoodsForm goodsF = loanForm.getGoods(); + int goodsid = goodsF.getId(); + int goodsnumber = loanForm.getNumber(); + String hql_goods = "FROM StorageForm WHERE goodsid=" + goodsid + ""; + List list_goods = session.createQuery(hql_goods).list(); + if (list_goods.size() > 0) { + String hql_up = "UPDATE StorageForm set number=number+" + + goodsnumber + " WHERE goodsid=" + goodsid + + ""; + System.out.println("HQL_UP:" + hql_up); + session.createQuery(hql_up).executeUpdate(); + } else { + rtn = 0; + } + if (rtn == 1) { + tx.commit(); + } else { + if (tx != null) { + tx.rollback(); + } + } + + } catch (Exception e) { + System.out.println("黹ʱĴϢ" + e.getMessage()); + e.printStackTrace(); + if (tx != null) { + tx.rollback(); + } + rtn = 0; + } finally { + MySession.closeSession(session); //رSession + } + return rtn; + } + +} diff --git a/07/src/com/dao/OutStorageDAO.java b/07/src/com/dao/OutStorageDAO.java new file mode 100644 index 0000000..7765a7b --- /dev/null +++ b/07/src/com/dao/OutStorageDAO.java @@ -0,0 +1,265 @@ +package com.dao; + +import org.hibernate.Session; +import java.util.List; +import org.hibernate.SQLQuery; +import com.actionForm.GoodsForm; +import com.actionForm.StorageForm; +import com.core.MySession; +import com.actionForm.GetUseForm; +import org.hibernate.Transaction; +import java.util.Date; +import java.text.NumberFormat; +import com.actionForm.LoanForm; +import javax.servlet.http.HttpServletRequest; +import org.hibernate.Query; +import javax.servlet.http.HttpSession; +import com.actionForm.BranchForm; +import com.actionForm.DamageForm; + +public class OutStorageDAO { + private Session session = null; + //ѯϢ + public List storage_query() { + session = MySession.openSession(); //Session + String sql = "select {goods.*},{storage.*} from tb_goods goods inner join tb_storage storage on goods.id=storage.goodsid"; //ʹӲѯϢ + List list = null; + try { + SQLQuery query = session.createSQLQuery(sql); + query.addEntity("goods", GoodsForm.class); //ݱʵһ + query.addEntity("storage", StorageForm.class); + list = query.list(); + } catch (Exception e) { + System.out.println("ѯʱĴϢ" + e.getMessage()); + } + return list; + } + + //ڲűʱѯϢ + public List getuseGoods_query() { + session = MySession.openSession(); //Session + //ص + String sql = "select * from tb_goods where id in (select goodsid from tb_getuse group by goodsid)"; + List list = null; + try { + SQLQuery query = session.createSQLQuery(sql); + query.addEntity("goods", GoodsForm.class); //ݱʵһ + list = query.list(); + } catch (Exception e) { + System.out.println("ѯʱĴϢ" + e.getMessage()); + } + return list; + } + + //ѯϢ + public List getuse_query() { + session = MySession.openSession(); //Session + String sql = "select {getuse.*},{branch.*},{goods.*} from tb_getuse getuse inner join tb_goods goods on getuse.goodsid=goods.id inner join tb_branch branch on getuse.branchid=branch.id"; //ʹӲѯϢ + List list = null; + try { + SQLQuery query = session.createSQLQuery(sql); + query.addEntity("goods", GoodsForm.class); //ݱʵһ + query.addEntity("getuse", GetUseForm.class); + query.addEntity("branch", BranchForm.class); + list = query.list(); + } catch (Exception e) { + System.out.println("ѯʱĴϢ" + e.getMessage()); + } + return list; + } + +//ӲϢ + public int getuseAdd(GetUseForm getUseForm) { + session = MySession.openSession(); //Session + Transaction tx = null; + int rtn = 1; + try { + //沿Ϣ + tx = session.beginTransaction(); + int goodsid = getUseForm.getGoodsid(); + GoodsForm goodsForm = (GoodsForm) session.get(GoodsForm.class, + goodsid); + getUseForm.setGoods(goodsForm); + int branchid = getUseForm.getBranchid(); + BranchForm branchForm = (BranchForm) session.get(BranchForm.class, + branchid); + getUseForm.setBranch(branchForm); + getUseForm.setCreatetime(new Date()); + session.save(getUseForm); + /*********õ*******************/ + NumberFormat formater = NumberFormat.getNumberInstance(); + int id = getUseForm.getId(); + formater.setMinimumIntegerDigits(5); + java.util.Date createTime = getUseForm.getCreatetime(); + java.sql.Date date = new java.sql.Date(createTime.getTime()); + String gNo = "LY" + date + + formater.format(id).toString().replace(",", ""); //õ + /**************************************/ +//õ + GetUseForm getUseF = (GetUseForm) session.get( + GetUseForm.class, id); + getUseF.setGno(gNo); + session.update(getUseF); +//޸ĿϢ +// StorageForm storageF = (StorageForm) session.get(StorageForm.class, +// getUseForm.getGoodsid()); + List list = session.createQuery("FROM StorageForm WHERE goodsid=" + + getUseForm.getGoodsid() + "").list(); + StorageForm storageF = (StorageForm) list.get(0); + int storageNum = storageF.getNumber() - getUseForm.getNumber(); + if (storageNum >= 0) { + storageF.setNumber(storageNum); + session.update(storageF); + } else { // + + rtn = 0; + } + if (rtn == 1) { + tx.commit(); + } else { + if (tx != null) { + tx.rollback(); + } + } + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("ӲϢʱĴϢ" + e.getMessage()); + rtn = 0; + } finally { + MySession.closeSession(session); //رSession + } + return rtn; + } + + //ӲűϢ + public int damageAdd(DamageForm damageForm) { + session = MySession.openSession(); //Session + Transaction tx = null; + int rtn = 0; + try { + //沿űϢ + tx = session.beginTransaction(); + int goodsid = damageForm.getGoodsid(); + GoodsForm goodsForm = (GoodsForm) session.get(GoodsForm.class, + goodsid); + damageForm.setGoods(goodsForm); + int branchid = damageForm.getBranchid(); + BranchForm branchForm = (BranchForm) session.get(BranchForm.class, + branchid); + damageForm.setBranch(branchForm); + damageForm.setCreatetime(new Date()); + session.save(damageForm); + tx.commit(); + rtn = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("ӲűϢʱĴϢ" + e.getMessage()); + rtn = 0; + } finally { + MySession.closeSession(session); //رSession + } + return rtn; + } + + //ʽϢ + public int loanAdd(LoanForm loanForm) { + session = MySession.openSession(); //Session + Transaction tx = null; + int rtn = 0; + try { + //ʽϢ + tx = session.beginTransaction(); + int goodsid = loanForm.getGoodsid(); + GoodsForm goodsForm = (GoodsForm) session.get(GoodsForm.class, + goodsid); + loanForm.setGoods(goodsForm); + loanForm.setCreatetime(new Date()); + session.save(loanForm); + /*********ɽ*******************/ + NumberFormat formater = NumberFormat.getNumberInstance(); + int id = loanForm.getId(); + formater.setMinimumIntegerDigits(5); + java.util.Date createTime = loanForm.getCreatetime(); + java.sql.Date date = new java.sql.Date(createTime.getTime()); + String lNo = "JC" + date + + formater.format(id).toString().replace(",", ""); //Ͻ + /**************************************/ +// + LoanForm loanF = (LoanForm) session.get( + LoanForm.class, id); + loanF.setLno(lNo); + session.update(loanF); + tx.commit(); + rtn = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("ʽϢʱĴϢ" + e.getMessage()); + rtn = 0; + } finally { + MySession.closeSession(session); //رSession + } + return rtn; + } + + // + public int approveloanAdd(int id, HttpServletRequest request) { + int rtn = 1; + session = MySession.openSession(); //session + Transaction tx = null; + try { + tx = session.beginTransaction(); + LoanForm loanForm = (LoanForm) session.get(LoanForm.class, id); + loanForm.setApprovetime(new Date()); + HttpSession httpsession = request.getSession(); + loanForm.setTaster((String) httpsession.getAttribute("username")); //Ա + loanForm.setState(new Short("1")); //޸Ľ״̬Ϊ + session.update(loanForm); //Ϣ + //޸ĿϢ + GoodsForm goodsF = loanForm.getGoods(); + int goodsid = goodsF.getId(); + int goodsnumber = loanForm.getNumber(); + String hql_goods = "FROM StorageForm WHERE goodsid=" + goodsid + ""; + List list_goods = session.createQuery(hql_goods).list(); + System.out.println("LIST_GOODS.SIZE:" + list_goods.size() + + "********GOODSID:" + goodsid); + if (list_goods.size() > 0) { + StorageForm storageF = (StorageForm) list_goods.get(0); + if (storageF.getNumber() - goodsnumber >= 0) { + String hql_up = "UPDATE StorageForm set number=number-" + + goodsnumber + " WHERE goodsid=" + goodsid + + ""; + System.out.println("HQL_UP:" + hql_up); + session.createQuery(hql_up).executeUpdate(); + } else { + rtn = 2; //治 + } + } else { + rtn = 0; + } + if (rtn == 1) { + tx.commit(); + } else { + if (tx != null) { + tx.rollback(); + } + } + + } catch (Exception e) { + System.out.println("ʱĴϢ" + e.getMessage()); + e.printStackTrace(); + if (tx != null) { + tx.rollback(); + } + rtn = 0; + } finally { + MySession.closeSession(session); //رSession + } + return rtn; + } +} diff --git a/07/src/com/dao/ProviderDAO.java b/07/src/com/dao/ProviderDAO.java new file mode 100644 index 0000000..1f0f5b3 --- /dev/null +++ b/07/src/com/dao/ProviderDAO.java @@ -0,0 +1,127 @@ +package com.dao; + +import org.hibernate.Session; +import java.util.List; +import org.hibernate.Query; +import org.hibernate.Transaction; +import com.actionForm.ProviderForm; +import com.core.MySession; + +public class ProviderDAO { + private Session session = null; + public List query(String strif) { + session = MySession.openSession(); //Session + List list=null; + String hql = ""; + if (strif != "all" && strif != null && strif != "") { //ѯ + hql = "FROM ProviderForm provider WHERE " + strif + + ""; + } else { //ѯȫ + hql = "FROM ProviderForm provider"; + } + System.out.println(hql); + try{ + Query query = session.createQuery(hql); + list = query.list(); + }catch(Exception e){ + e.printStackTrace(); + }finally{ + MySession.closeSession(session); //رSession + } + return list; + } + +public int insert(ProviderForm providerForm){ + int ret=0; + Transaction tx=null; +// ChStr chStr=new ChStr(); +// providerForm.setName(chStr.toChinese(providerForm.getName())); +// providerForm.setAddress(chStr.toChinese(providerForm.getAddress())); +// providerForm.setBankName(chStr.toChinese(providerForm.getBankName())); +// providerForm.setMemo(chStr.toChinese(providerForm.getMemo())); + String str="name='" + providerForm.getName() + "'"; + List list = query(str); + if (list.size()> 0) { //ڸϢ + ret=2; + }else{ + session=MySession.openSession(); //Session + try { + tx = session.beginTransaction(); + session.save(providerForm); + tx.commit(); + ret = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("ӹӦϢʱĴϢ" + e.getMessage()); + return ret = 0; + } finally { + MySession.closeSession(session); //رSession + } + } + return ret; +} +//ѯҪ޸ĵĹӦϢ +public ProviderForm query(int id){ + session=MySession.openSession(); //Session + ProviderForm providerForm=null; + try{ + providerForm=(ProviderForm)session.get(ProviderForm.class,id); + + }catch(Exception e){ + e.printStackTrace(); + }finally{ + MySession.closeSession(session); //رSession + } + return providerForm; +} +//޸ĹӦϢ +public int Modify(ProviderForm providerForm){ + session=MySession.openSession(); //Session + int id=providerForm.getId(); + int ret = 0; + Transaction tx = null; + try { + tx = session.beginTransaction(); + // ProviderForm providerF=(ProviderForm)session.get(ProviderForm.class,id); + + session.update(providerForm); + tx.commit(); + ret = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("޸ĹӦϢʱĴϢ" + e.getMessage()); + return ret = 0; + } finally { + MySession.closeSession(session); //رSession + } + return ret; + } +//ɾӦϢ +public int del(int id){ + session=MySession.openSession(); //Session + int ret = 0; + Transaction tx = null; + try { + tx = session.beginTransaction(); + ProviderForm providerF=(ProviderForm)session.get(ProviderForm.class,id); + session.delete(providerF); + tx.commit(); + ret = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("ɾӦϢʱĴϢ" + e.getMessage()); + return ret = 0; + } finally { + MySession.closeSession(session); //رSession + } + return ret; + } + + +} diff --git a/07/src/com/dao/QueryDAO.java b/07/src/com/dao/QueryDAO.java new file mode 100644 index 0000000..2459335 --- /dev/null +++ b/07/src/com/dao/QueryDAO.java @@ -0,0 +1,257 @@ +package com.dao; + +import java.util.List; +import com.actionForm.StockMainViewForm; +import com.core.MySession; +import org.hibernate.Query; +import com.actionForm.LoanForm; +import com.actionForm.IfForm; +import org.hibernate.Session; +import com.actionForm.GoodsForm; +import com.actionForm.BranchForm; +import com.actionForm.DamageForm; +import org.hibernate.SQLQuery; +import com.actionForm.GetUseForm; +import java.util.Set; + +public class QueryDAO { + private Session session = null; + //ѯɹϸϢ + public StockMainViewForm stockDetail(int id) { + session = MySession.openSession(); //Session + StockMainViewForm stockMVF = new StockMainViewForm(); + try { + stockMVF = (StockMainViewForm) session.get(StockMainViewForm.class, + id); + System.out.println("ɹϸϢĴС" + stockMVF.getStockDetail().size()); + } catch (Exception e) { + System.out.println("ѯɹϸϢʱ" + e.getMessage()); + } finally { + MySession.closeSession(session); + } + return stockMVF; + } + + //ѯϸϢ + public LoanForm loanDetail(int id) { + session = MySession.openSession(); //Session + LoanForm loanF = null; + try { + loanF = (LoanForm) session.get(LoanForm.class, + id); + } catch (Exception e) { + System.out.println("ѯϸϢʱ" + e.getMessage()); + } finally { + MySession.closeSession(session); + } + return loanF; + } + +//ѯűϢ + public List damageQuery(IfForm ifForm) { + session = MySession.openSession(); //Session + String str = ifCompose(ifForm); + String sql = "select {damage.*},{goods.*},{branch.*} from tb_damage damage inner join tb_goods goods on damage.goodsid=goods.id inner join tb_branch branch on damage.branchid=branch.id "; + List list = null; + if (str == null) { + sql = sql + " order by damage.createTime desc"; + } else { + sql = sql + " WHERE " + str + + " order by damage.createTime desc"; + } + session = MySession.openSession(); //Session + System.out.println("SQL=" + sql); + try { + SQLQuery query = session.createSQLQuery(sql); + query.addEntity("goods", GoodsForm.class); //ݱʵһ + query.addEntity("damage", DamageForm.class); + query.addEntity("branch", BranchForm.class); + list = query.list(); + } catch (Exception e) { + e.printStackTrace(); + System.out.println("ѯʱֵĴϢ" + e.getMessage()); + } finally { + MySession.closeSession(session); //رSession + } + return list; + } + + //ѯϢ + public List getuseQuery(IfForm ifForm) { + session = MySession.openSession(); //Session + String str = ifCompose(ifForm); + String sql = "select {getuse.*},{goods.*},{branch.*} from tb_getuse getuse inner join tb_goods goods on getuse.goodsid=goods.id inner join tb_branch branch on getuse.branchid=branch.id "; + List list = null; + if (str == null) { + sql = sql + " order by getuse.createTime desc"; + } else { + sql = sql + " WHERE " + str + + " order by getuse.createTime desc"; + } + session = MySession.openSession(); //Session + System.out.println("SQL=" + sql); + try { + SQLQuery query = session.createSQLQuery(sql); + query.addEntity("goods", GoodsForm.class); //ݱʵһ + query.addEntity("getuse", GetUseForm.class); + query.addEntity("branch", BranchForm.class); + list = query.list(); + } catch (Exception e) { + e.printStackTrace(); + System.out.println("ѯʱֵĴϢ" + e.getMessage()); + } finally { + MySession.closeSession(session); //رSession + } + return list; + } + + //áϢ + public List getusedamageTotal(IfForm ifForm,String form,String cfield) { + session = MySession.openSession(); //Session + String str = ifCompose(ifForm); + String sql=""; + List list = null; + if (str == null) { + sql = "select sum(form."+cfield+") as amount,b.name,g.name,g.spec,g.price,g.unit,g.producer "+ + "FROM "+form+" form JOIN form.branch b JOIN form.goods g "+ + "GROUP BY b.name,g.name,g.spec,g.price,g.unit,g.producer"; + } else { + sql ="select sum(form."+cfield+") as amount,b.name,g.name,g.spec,g.price,g.unit,g.producer "+ + "FROM "+form+" form JOIN form.branch b JOIN form.goods g WHERE "+str+" "+ + "GROUP BY b.name,g.name,g.spec,g.price,g.unit,g.producer"; + } + System.out.println("****************:"+sql); + session = MySession.openSession(); //Session + System.out.println("SQL=" + sql); + try { + list = session.createQuery(sql).list(); + } catch (Exception e) { + e.printStackTrace(); + System.out.println("ѯʱֵĴϢ" + e.getMessage()); + } finally { + MySession.closeSession(session); //رSession + } + return list; + } + // ѯŻϢ + public List branchTotal(IfForm ifForm) { + session = MySession.openSession(); //Session + String str = ifCompose(ifForm); + List list = null; + String sql="select g.name,g.spec,g.unit,g.price,t.branchname,t.lyamount,t.bsamount,(t.lyamount-t.bsamount) zyamount from tb_goods g inner join ( "+ + "select goodsid,branchname,sum(bsamount) bsamount,sum(lyamount) lyamount from(" + + "select getuse.goodsid,0 as bsamount,sum(getuse.number) as lyamount,branch.name as branchname from tb_getuse getuse inner join " + + " tb_branch branch on getuse.branchid=branch.id group by branch.name,getuse.goodsid " + + "union " + + "select damage.goodsid,sum(damage.damagenum) as bsamount,0 as lyamount,branch.name as branchname from tb_damage damage inner join " + + " tb_branch branch on damage.branchid=branch.id group by branch.name,damage.goodsid " + + ") as t group by goodsid,branchname) as t on g.id=t.goodsid"; + + if (str != null) { + sql="select g.name,g.spec,g.unit,g.price,t.branchname,t.lyamount,t.bsamount,(t.lyamount-t.bsamount) zyamount from tb_goods g inner join ( "+ + "select goodsid,branchname,sum(bsamount) bsamount,sum(lyamount) lyamount from(" + + "select getuse.goodsid,0 as bsamount,sum(getuse.number) as lyamount,branch.name as branchname from tb_getuse getuse inner join " + + " tb_branch branch on getuse.branchid=branch.id and getuse."+str+" group by branch.name,getuse.goodsid " + + "union " + + "select damage.goodsid,sum(damage.damagenum) as bsamount,0 as lyamount,branch.name as branchname from tb_damage damage inner join " + + " tb_branch branch on damage.branchid=branch.id and damage."+str+" group by branch.name,damage.goodsid " + + ") as t group by goodsid,branchname) as t on g.id=t.goodsid"; +// sql="select goods.name,goods.spec,goods.unit,goods.price,totle.branchname,totle.lyamount,totle.bsamount,totle.zyamount from tb_goods goods inner join ( "+ +// " select ly.*, isnull(bsamount,0) as bsamount,(ly.lyamount-isnull(bsamount,0))as zyamount from (select getuse.goodsid,count(getuse.number)"+ +// " as lyamount,branch.name as branchname from tb_getuse getuse"+ +// " inner join tb_branch branch on getuse.branchid=branch.id group by branch.name,getuse.goodsid) as ly left join "+ +// " (select damage.goodsid,count(damage.damagenum) as bsamount,branch.name as branchname from tb_damage damage inner join"+ +// " tb_branch branch on damage.branchid=branch.id and damage."+str+" group by branch.name,damage.goodsid) as bs on ly.goodsid=bs.goodsid and ly.branchname=bs.branchname) as totle on goods.id=totle.goodsid"; +} + try { + SQLQuery query = session.createSQLQuery(sql); + list=query.list(); + for(int i=0;i'mr'").executeUpdate(); //ɾûϢ + session.createQuery("DELETE GetUseForm").executeUpdate(); //ղϢ + session.createQuery("DELETE DamageForm").executeUpdate(); //ղűϢ + session.createQuery("DELETE CheckForm").executeUpdate(); //Ϣ + session.createQuery("DELETE InStorageForm").executeUpdate(); //Ϣ + session.createQuery("DELETE StockDetailForm").executeUpdate(); //ղɹϸ + session.createQuery("DELETE StockMainForm").executeUpdate(); //ղɹ + session.createQuery("DELETE ProviderForm").executeUpdate(); //չӦϢ + session.createQuery("DELETE LoanForm").executeUpdate(); //ʽϢ + session.createQuery("DELETE StorageForm").executeUpdate(); //տϢ + session.createQuery("DELETE BranchForm").executeUpdate(); //ղϢ + session.createQuery("DELETE GoodsForm").executeUpdate(); //ƷϢ + rtn=1; + tx.commit(); + }catch(Exception e){ + if(tx!=null){ + tx.rollback(); + } + e.printStackTrace(); + System.out.println("ϵͳʹʱĴϢ"+e.getMessage()); + rtn=0; + } finally { + MySession.closeSession(session); + } + return rtn; + } +} diff --git a/07/src/com/dao/UserDAO.java b/07/src/com/dao/UserDAO.java new file mode 100644 index 0000000..e7900f5 --- /dev/null +++ b/07/src/com/dao/UserDAO.java @@ -0,0 +1,162 @@ +package com.dao; + +import org.hibernate.Transaction; +import com.actionForm.UserForm; +import org.hibernate.Query; +import java.util.List; +import org.hibernate.Session; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; +import com.core.MySession; + +public class UserDAO { + private Session session = null; + public List query(String strif) { + session=MySession.openSession(); //Session + String hql = ""; + if (strif != "all" && strif != null && strif != "") { //ѯ + hql = "FROM UserForm user WHERE " + strif + + ""; + } else { //ѯȫ + hql = "FROM UserForm user"; + } + System.out.println(hql); + List list=null; + try{ + Query query = session.createQuery(hql); + list = query.list(); + }catch(Exception e){ + e.printStackTrace(); + }finally{ + MySession.closeSession(session); //رSession + } + + return list; + } + //ûϢ + public int insert(UserForm userForm) { + int ret = 0; + Transaction tx = null; + String str="name='" + userForm.getName() + "'"; + List list = query(str); + + if (list.size()> 0) { //ڸϢ + ret = 2; + } else { + session=MySession.openSession(); //Session + try { + tx = session.beginTransaction(); + session.save(userForm); + tx.commit(); + ret = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + e.printStackTrace(); + System.out.println("ûϢʱĴϢ" + e.getMessage()); + return ret = 0; + } finally { + MySession.closeSession(session); //رSession + } + } + return ret; + } + public String login(UserForm userForm,HttpServletRequest request){ + String rtn=""; + String name=userForm.getName(); + String pwd=userForm.getPwd(); + String str="name='"+name+"'"; + List list = query(str); + if(list.size()==1){ + UserForm m=(UserForm)list.get(0); + String username=m.getName(); + if(pwd.equals(m.getPwd())){ + rtn="ok"; + //********¼ûƱ浽HttpSession**** + HttpSession httpsession=request.getSession(); + httpsession.setAttribute("username",username); + //******************************************** + System.out.println("¼ɹ"); + }else{ + rtn=""; + System.out.println(""); + } + }else{ + rtn="ûƴ"; + System.out.println("ûƴ"); + } + return rtn; + } + //ѯҪ޸ĵûϢ + public UserForm query(int id) { + session = MySession.openSession(); //Session + UserForm userForm =null; + try{ + userForm = (UserForm) session.get(UserForm.class, id); + }catch(Exception e){ + e.printStackTrace(); + }finally{ + MySession.closeSession(session); //رSession + } + return userForm; + } + + //޸ûϢ + public int Modify(UserForm userForm,int flag) { + int id = userForm.getId(); + int ret = 0; + Transaction tx = null; + session=MySession.openSession(); //Session + try { + tx = session.beginTransaction(); + UserForm userF=(UserForm)session.get(UserForm.class,id); + if(flag==1){ + userF.setPwd(userForm.getPwd()); + }else{ + userF.setSetInstorage(userForm.getSetInstorage()); + userF.setSetOutstorage(userForm.getSetOutstorage()); + userF.setSetDeal(userForm.getSetDeal()); + userF.setSetQuery(userForm.getSetQuery()); + userF.setSetBasic(userForm.getSetBasic()); + userF.setSetSys(userForm.getSetSys()); + } + session.update(userF); + tx.commit(); + ret = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("޸ûϢʱĴϢ" + e.getMessage()); + return ret = 0; + } finally { + MySession.closeSession(session); //رSession + } + return ret; + } + + //ɾûϢ + public int del(int id) { + session=MySession.openSession(); //Session + int ret = 0; + Transaction tx = null; + try { + tx = session.beginTransaction(); + UserForm userForm = (UserForm) session.get(UserForm.class, id); + session.delete(userForm); + tx.commit(); + ret = 1; + } catch (Exception e) { + if (tx != null) { + tx.rollback(); + } + System.out.println("ɾûϢʱĴϢ" + e.getMessage()); + return ret = 0; + } finally { + MySession.closeSession(session); //رSession + } + return ret; + } + +} diff --git a/07/src/hibernate.cfg.xml b/07/src/hibernate.cfg.xml new file mode 100644 index 0000000..78f2f08 --- /dev/null +++ b/07/src/hibernate.cfg.xml @@ -0,0 +1,30 @@ + + + + + + com.microsoft.sqlserver.jdbc.SQLServerDriver + + + jdbc:sqlserver://localhost:1433;DatabaseName=db_Material + + sa + + false + + + + + + + + + + + + + + + diff --git "a/07/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/07/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..c4d2773 Binary files /dev/null and "b/07/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/08/.classpath b/08/.classpath new file mode 100644 index 0000000..6041f59 --- /dev/null +++ b/08/.classpath @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/08/.mymetadata b/08/.mymetadata new file mode 100644 index 0000000..14d1125 --- /dev/null +++ b/08/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/08/.project b/08/.project new file mode 100644 index 0000000..a30925e --- /dev/null +++ b/08/.project @@ -0,0 +1,50 @@ + + + 08 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/08/.settings/.jsdtscope b/08/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/08/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/08/.settings/org.eclipse.jdt.core.prefs b/08/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4932456 --- /dev/null +++ b/08/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Thu Feb 17 09:28:35 CST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/08/.settings/org.eclipse.wst.jsdt.ui.superType.container b/08/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/08/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/08/.settings/org.eclipse.wst.jsdt.ui.superType.name b/08/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/08/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/08/WebRoot/CSS/style.css b/08/WebRoot/CSS/style.css new file mode 100644 index 0000000..2a644bf --- /dev/null +++ b/08/WebRoot/CSS/style.css @@ -0,0 +1,119 @@ + + \ No newline at end of file diff --git a/08/WebRoot/Datebase/Datebase.zip b/08/WebRoot/Datebase/Datebase.zip new file mode 100644 index 0000000..85397dd Binary files /dev/null and b/08/WebRoot/Datebase/Datebase.zip differ diff --git a/08/WebRoot/Datebase/db_work_Data.MDF b/08/WebRoot/Datebase/db_work_Data.MDF new file mode 100644 index 0000000..f4cecc7 Binary files /dev/null and b/08/WebRoot/Datebase/db_work_Data.MDF differ diff --git a/08/WebRoot/Datebase/db_work_Log.LDF b/08/WebRoot/Datebase/db_work_Log.LDF new file mode 100644 index 0000000..d21ffdf Binary files /dev/null and b/08/WebRoot/Datebase/db_work_Log.LDF differ diff --git a/08/WebRoot/EveryDay/BBC/bbc_add.jsp b/08/WebRoot/EveryDay/BBC/bbc_add.jsp new file mode 100644 index 0000000..68c6bed --- /dev/null +++ b/08/WebRoot/EveryDay/BBC/bbc_add.jsp @@ -0,0 +1,85 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ¹ҳ + + + + + + + + + + + + + + +
    +
    + + + + + +
         ¹Ϣ
     
    +
    + + + + + + + + + + + + +
    ݣ
    + + + + "> +
    +
    + + + + + diff --git a/08/WebRoot/EveryDay/BBC/bbc_addCenter.jsp b/08/WebRoot/EveryDay/BBC/bbc_addCenter.jsp new file mode 100644 index 0000000..7141a99 --- /dev/null +++ b/08/WebRoot/EveryDay/BBC/bbc_addCenter.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + + +<% + Placard placard = new Placard(); // + placard.setContent(request.getParameter("content")); //ù + placard.setSubject(request.getParameter("subject")); //ù + java.sql.Date dateDate = (java.sql.Date)GetTime.getDate(); //ùõǰʱ + placard.setDDate(dateDate); //ùʱ + String person =(String)session.getAttribute("username");//ù淢 + placard.setPerson(person); //ù + HibernateUtil.savePlacard(placard); //湫 +%> + + + + diff --git a/08/WebRoot/EveryDay/BBC/bbc_del.jsp b/08/WebRoot/EveryDay/BBC/bbc_del.jsp new file mode 100644 index 0000000..5bb4ea7 --- /dev/null +++ b/08/WebRoot/EveryDay/BBC/bbc_del.jsp @@ -0,0 +1,94 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ɾϢ + + + + + + + + + + + + +
    + + + + + + +
         ɾϢ
     
    + <% + int link=Integer.parseInt(request.getParameter("link")); + int currPage=Integer.parseInt(request.getParameter("currPage")); + String strid= request.getParameter("IDs"); + List listPlacard = HibernateUtil.finplacardId(Integer.parseInt(strid)); + if(!listPlacard.isEmpty()&&listPlacard.size()>0){ + for(int i=0;i +
    + + + + + + + + + + + + + + + <%}}%> + + + +
     ˣ + <%=placard.getPerson()%>
    ڣ
    <%=placard.getDDate()%>
    ݣ
    + + +
    +
    + + + + + diff --git a/08/WebRoot/EveryDay/BBC/bbc_del_ok.jsp b/08/WebRoot/EveryDay/BBC/bbc_del_ok.jsp new file mode 100644 index 0000000..4989b9f --- /dev/null +++ b/08/WebRoot/EveryDay/BBC/bbc_del_ok.jsp @@ -0,0 +1,77 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ɾϢɹ + + + + + + + + + +<% + int link=Integer.parseInt(request.getParameter("link")); + int currPage=Integer.parseInt(request.getParameter("currPage")); + Placard placard = (Placard)session.getAttribute("PL"); + HibernateUtil.delePlacard(placard); +%> + + + + + +
    + + + + + + +
         Ϣɾɹ
     
    +
    + + + + + + + + + + +
    +
    Ϣɾɹ
    + +
    +
    + + + + + diff --git a/08/WebRoot/EveryDay/BBC/bbc_detail.jsp b/08/WebRoot/EveryDay/BBC/bbc_detail.jsp new file mode 100644 index 0000000..5eac472 --- /dev/null +++ b/08/WebRoot/EveryDay/BBC/bbc_detail.jsp @@ -0,0 +1,91 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*,com.hiernate.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ϸϢ + + + + + + + + + + + <% + String strid= request.getParameter("id"); //ò + List listPlacard = HibernateUtil.finplacardId(Integer.parseInt(strid)); //ѯ + if(!listPlacard.isEmpty()&&listPlacard.size()>0){ + for(int i=0;i + + + + +
    +
    + + + + + +
         ϸϢ
     
    +
    + + + + + + + + + + + + + + + + + + +
     ˣ + <%=placard.getPerson()%>
    ڣ
    <%=placard.getDDate()%>
    +
    ݣ
    +
    + +
    + +
    +<%}} %> + + + + + diff --git a/08/WebRoot/EveryDay/BBC/bbc_index.jsp b/08/WebRoot/EveryDay/BBC/bbc_index.jsp new file mode 100644 index 0000000..51e0a53 --- /dev/null +++ b/08/WebRoot/EveryDay/BBC/bbc_index.jsp @@ -0,0 +1,162 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + + + + + + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +

          

     
     
     
    + + + + +
    + + + + + + + + + + + +
      
    + <% + String strpurview = (String)application.getAttribute("Purview"); + if(strpurview.equalsIgnoreCase("ֻ")){ + %> + ¹ + <%}else{ %> + ¹ + <%} %> +
     
    + + + + + + + + + <% + String currPage = request.getParameter("currPage"); + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 5 ; + allRecCount = HibernateUtil.findPlacardCount(); //ѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + } + List listPlacard =HibernateUtil.finplacard((iCurrPage - 1) * recPerPage, recPerPage);; + if(listPlacard.isEmpty()){ + out.println("Ϣ"); + } + if(!listPlacard.isEmpty() && listPlacard.size()>0){ + for(int i=0;i + + + + + + + <%}%> + <%if(purview.equalsIgnoreCase("ϵͳ")){ %> + + + + + <%}}}%> +
    ʱ
    ޸
    ɾ
    +  <%=placard.getSubject()%>
    <%=placard.getPerson()%>
    <%=placard.getDDate()%>
    + <% String purview = (String)application.getAttribute("Purview"); //ýapplicationеĵ¼ûȨ + if(purview.equalsIgnoreCase("ֻ")){ //ûȨ"ֻ"תmeeting_delno.jspҳ棬ܽɾ + %> + +
    + +
    + +
    +
    + + + + +
    + <% + if(recPerPage < allRecCount){ + String href = "  һҳ"); + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); //һҳ + } + %> + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%} %> +
    + + + + + diff --git a/08/WebRoot/EveryDay/BBC/bbc_modify.jsp b/08/WebRoot/EveryDay/BBC/bbc_modify.jsp new file mode 100644 index 0000000..fbcc0b4 --- /dev/null +++ b/08/WebRoot/EveryDay/BBC/bbc_modify.jsp @@ -0,0 +1,104 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*,com.hiernate.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ϸϢ + + + + + + + + + + + + <% + String strid= request.getParameter("ID"); // + List listPlacard = HibernateUtil.finplacardId(Integer.parseInt(strid)); //HibernateUtilidҹ + if(!listPlacard.isEmpty()&&listPlacard.size()>0){ //жlistPlacardǷΪ + for(int i=0;i + + + + +
    +

    + + + + +
         ޸ĹϢ
    +
    + + + + + + + + + + + + + + + + + +
     ˣ + <%=placard.getPerson()%>
    ڣ
    <%=placard.getDDate()%>
    +
    ݣ
    + + +
    +
    +<%}} %> + + + + + diff --git a/08/WebRoot/EveryDay/BBC/bbc_modifyCenter.jsp b/08/WebRoot/EveryDay/BBC/bbc_modifyCenter.jsp new file mode 100644 index 0000000..f3ea5c0 --- /dev/null +++ b/08/WebRoot/EveryDay/BBC/bbc_modifyCenter.jsp @@ -0,0 +1,50 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="com.hiernate.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + + <% + Placard placard = (Placard)session.getAttribute("placard"); //õsessionеPlacard + placard.setContent(request.getParameter("content")); //Placardֵ + placard.setSubject(request.getParameter("subject")); + HibernateUtil.updatePlacard(placard); //޸ķ +%> + + + + + +
    +
    + + + + + +
         Ϣ޸ijɹ
     
    +
    + + + + + + + + + + +
    +
    Ϣ޸ijɹ
    + +
    +
    + + + diff --git a/08/WebRoot/EveryDay/BBC/bbc_nomodify.jsp b/08/WebRoot/EveryDay/BBC/bbc_nomodify.jsp new file mode 100644 index 0000000..54576c2 --- /dev/null +++ b/08/WebRoot/EveryDay/BBC/bbc_nomodify.jsp @@ -0,0 +1,8 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + \ No newline at end of file diff --git a/08/WebRoot/EveryDay/BBC/noaddbbc.jsp b/08/WebRoot/EveryDay/BBC/noaddbbc.jsp new file mode 100644 index 0000000..2f9523f --- /dev/null +++ b/08/WebRoot/EveryDay/BBC/noaddbbc.jsp @@ -0,0 +1,9 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + \ No newline at end of file diff --git a/08/WebRoot/EveryDay/meeting/meeting_add.jsp b/08/WebRoot/EveryDay/meeting/meeting_add.jsp new file mode 100644 index 0000000..155899d --- /dev/null +++ b/08/WebRoot/EveryDay/meeting/meeting_add.jsp @@ -0,0 +1,120 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
         ¼¼
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    ʱ  䣺
    ϯˣ
    ˣص㣺
      ⣺
      ݣ
    + + + +
    +
    + + + + + diff --git a/08/WebRoot/EveryDay/meeting/meeting_add2.jsp b/08/WebRoot/EveryDay/meeting/meeting_add2.jsp new file mode 100644 index 0000000..06e8f2d --- /dev/null +++ b/08/WebRoot/EveryDay/meeting/meeting_add2.jsp @@ -0,0 +1,30 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + + + <% + Meeting meeting = new Meeting(); + meeting.setMTime(request.getParameter("mtime")); + meeting.setAddress(request.getParameter("address")); + meeting.setContent(request.getParameter("content")); + meeting.setCPerson(request.getParameter("CPerson")); + meeting.setZPerson(request.getParameter("ZPerson")); + meeting.setSubject(request.getParameter("subject")); + HibernateUtil.saveMeeting(meeting); + %> + + + + + + + diff --git a/08/WebRoot/EveryDay/meeting/meeting_addCenter.jsp b/08/WebRoot/EveryDay/meeting/meeting_addCenter.jsp new file mode 100644 index 0000000..df33af1 --- /dev/null +++ b/08/WebRoot/EveryDay/meeting/meeting_addCenter.jsp @@ -0,0 +1,25 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + <% + Meeting meeting = new Meeting(); //meeting + meeting.setMTime(request.getParameter("mtime")); //meetingתmeeting_addҳбֵ + meeting.setAddress(request.getParameter("address")); + meeting.setContent(request.getParameter("content")); + meeting.setCPerson(request.getParameter("CPerson")); + meeting.setZPerson(request.getParameter("ZPerson")); + meeting.setSubject(request.getParameter("subject")); + HibernateUtil.saveMeeting(meeting); //HibernateUtilг־û + %> + + + + + + diff --git a/08/WebRoot/EveryDay/meeting/meeting_del_ok.jsp b/08/WebRoot/EveryDay/meeting/meeting_del_ok.jsp new file mode 100644 index 0000000..9d3a03c --- /dev/null +++ b/08/WebRoot/EveryDay/meeting/meeting_del_ok.jsp @@ -0,0 +1,96 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ɾ¼Ϣ + + + + + + + + + + <% + + int link=Integer.parseInt(request.getParameter("link")); + int currPage=Integer.parseInt(request.getParameter("currPage")); + String strid = request.getParameter("ID"); //ò + List listid = HibernateUtil.findMeetingid(Integer.parseInt(strid)); //ѯ + if(!listid.isEmpty()&&listid.size()>0){ + for(int i=0;i + + + + +
    + + + + + + +
         ɾ¼Ϣ
     
    +
    + + + + + + + + + + +
    +
    ¼Ϣɾɹ
    + + + <% + if(link==1){ + if(currPage!=1){ + currPage=currPage-1; + }%> + + <%}else{%> + + <%} %> +
    +
    + + + + + diff --git a/08/WebRoot/EveryDay/meeting/meeting_delno.jsp b/08/WebRoot/EveryDay/meeting/meeting_delno.jsp new file mode 100644 index 0000000..2d6d477 --- /dev/null +++ b/08/WebRoot/EveryDay/meeting/meeting_delno.jsp @@ -0,0 +1,8 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + \ No newline at end of file diff --git a/08/WebRoot/EveryDay/meeting/meeting_detail.jsp b/08/WebRoot/EveryDay/meeting/meeting_detail.jsp new file mode 100644 index 0000000..3a48712 --- /dev/null +++ b/08/WebRoot/EveryDay/meeting/meeting_detail.jsp @@ -0,0 +1,102 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
         ¼ϸϢ
     
    +
    + + + <% + String strid = request.getParameter("ID"); //ò + List list =HibernateUtil.findMeetingid(Integer.parseInt(strid)); //ѯ + for(int i=0;i + + + + + + + + + + + + + + + + + + + <%} %> + + + + +
    ʱ  䣺
    ϯˣ
    ˣص㣺
      ⣺ +

    +    +
    + +
    +
    + + + + + diff --git a/08/WebRoot/EveryDay/meeting/meeting_index.jsp b/08/WebRoot/EveryDay/meeting/meeting_index.jsp new file mode 100644 index 0000000..2e44202 --- /dev/null +++ b/08/WebRoot/EveryDay/meeting/meeting_index.jsp @@ -0,0 +1,157 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + ¼ʾҳ + + + + + + + + +
    + +
    + + + + + + +
    + + + + + + +

          

     
     
     
    + + + + +
    + + + + + + + + <%} %> + + + + + +
      
    +
    + <% + String strpurview = (String)application.getAttribute("Purview"); + if(strpurview.equalsIgnoreCase("ֻ")){ + %> + ¼Ϣ + <%}else{ %> + ¼Ϣ
     
    + + + + +
    + + + + + + + + + <% + String currPage = request.getParameter("currPage"); //õǰҳ + int iCurrPage = 1 ; //ĿǰҳעʼֵΪ0 + int pages = 1 ; //ҳ + int allRecCount = 0 ; //ܵļ¼ + int recPerPage = 5 ; //ÿҳʾļ¼ + allRecCount = HibernateUtil.findMeetingCount(); //ùзѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ //жcurrpageǷΪ + iCurrPage = Integer.parseInt(currPage); //currpageֵiCurrpage + } + List listMeeting =HibernateUtil.finMeeting((iCurrPage - 1) * recPerPage, recPerPage); //÷ҳ + if(listMeeting.isEmpty()){ + out.println("Ϣ"); //ѯΪʱҳ"Ϣ" + } + if(!listMeeting.isEmpty() && listMeeting.size()>0){ + for(int i= 0;i + + + + + <% String purview = (String)application.getAttribute("Purview"); //ýapplicationеĵ¼ûȨ + if(purview.equalsIgnoreCase("ֻ")){ //ûȨ"ֻ"תmeeting_delno.jspҳ棬ܽɾ + %> + + <%} %> + <%if(purview.equalsIgnoreCase("ϵͳ")){ %> + + + <%}}}%> +
    ʱ
    +
    ɾ
    + <%=meeting.getSubject()%>
    <%=meeting.getCPerson()%>
    <%=meeting.getMTime()%>
    + +
    + +
    +
    + + + + +
    + <% + if(recPerPage < allRecCount){ + String href = "  һҳ"); + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ,ֵǰҳ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); //һҳ + } + %> + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%}%> +
    + + + + + diff --git a/08/WebRoot/EveryDay/meeting/noaddmeeting.jsp b/08/WebRoot/EveryDay/meeting/noaddmeeting.jsp new file mode 100644 index 0000000..e6e21ed --- /dev/null +++ b/08/WebRoot/EveryDay/meeting/noaddmeeting.jsp @@ -0,0 +1,9 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + \ No newline at end of file diff --git a/08/WebRoot/Images/3.gif b/08/WebRoot/Images/3.gif new file mode 100644 index 0000000..54b2b4a Binary files /dev/null and b/08/WebRoot/Images/3.gif differ diff --git a/08/WebRoot/Images/88.gif b/08/WebRoot/Images/88.gif new file mode 100644 index 0000000..8e264b4 Binary files /dev/null and b/08/WebRoot/Images/88.gif differ diff --git a/08/WebRoot/Images/Thumbs.db b/08/WebRoot/Images/Thumbs.db new file mode 100644 index 0000000..6552b8c Binary files /dev/null and b/08/WebRoot/Images/Thumbs.db differ diff --git a/08/WebRoot/Images/about.jpg b/08/WebRoot/Images/about.jpg new file mode 100644 index 0000000..fd21720 Binary files /dev/null and b/08/WebRoot/Images/about.jpg differ diff --git a/08/WebRoot/Images/add.gif b/08/WebRoot/Images/add.gif new file mode 100644 index 0000000..ba15f87 Binary files /dev/null and b/08/WebRoot/Images/add.gif differ diff --git a/08/WebRoot/Images/asasas.jpg b/08/WebRoot/Images/asasas.jpg new file mode 100644 index 0000000..e6bbd55 Binary files /dev/null and b/08/WebRoot/Images/asasas.jpg differ diff --git a/08/WebRoot/Images/bhj.jpg b/08/WebRoot/Images/bhj.jpg new file mode 100644 index 0000000..8d3362a Binary files /dev/null and b/08/WebRoot/Images/bhj.jpg differ diff --git a/08/WebRoot/Images/bj.gif b/08/WebRoot/Images/bj.gif new file mode 100644 index 0000000..bb5dac5 Binary files /dev/null and b/08/WebRoot/Images/bj.gif differ diff --git a/08/WebRoot/Images/close.jpg b/08/WebRoot/Images/close.jpg new file mode 100644 index 0000000..4925f2d Binary files /dev/null and b/08/WebRoot/Images/close.jpg differ diff --git a/08/WebRoot/Images/date.gif b/08/WebRoot/Images/date.gif new file mode 100644 index 0000000..a36ff93 Binary files /dev/null and b/08/WebRoot/Images/date.gif differ diff --git a/08/WebRoot/Images/del.gif b/08/WebRoot/Images/del.gif new file mode 100644 index 0000000..7343b48 Binary files /dev/null and b/08/WebRoot/Images/del.gif differ diff --git a/08/WebRoot/Images/detail.gif b/08/WebRoot/Images/detail.gif new file mode 100644 index 0000000..0132922 Binary files /dev/null and b/08/WebRoot/Images/detail.gif differ diff --git a/08/WebRoot/Images/dfff.jpg b/08/WebRoot/Images/dfff.jpg new file mode 100644 index 0000000..d2b612c Binary files /dev/null and b/08/WebRoot/Images/dfff.jpg differ diff --git a/08/WebRoot/Images/email.gif b/08/WebRoot/Images/email.gif new file mode 100644 index 0000000..d9b05c1 Binary files /dev/null and b/08/WebRoot/Images/email.gif differ diff --git a/08/WebRoot/Images/folder.gif b/08/WebRoot/Images/folder.gif new file mode 100644 index 0000000..f43d38a Binary files /dev/null and b/08/WebRoot/Images/folder.gif differ diff --git a/08/WebRoot/Images/home.jpg b/08/WebRoot/Images/home.jpg new file mode 100644 index 0000000..a0a6c76 Binary files /dev/null and b/08/WebRoot/Images/home.jpg differ diff --git a/08/WebRoot/Images/icon_smile.GIF b/08/WebRoot/Images/icon_smile.GIF new file mode 100644 index 0000000..0b5f385 Binary files /dev/null and b/08/WebRoot/Images/icon_smile.GIF differ diff --git a/08/WebRoot/Images/isexists.gif b/08/WebRoot/Images/isexists.gif new file mode 100644 index 0000000..c0711b8 Binary files /dev/null and b/08/WebRoot/Images/isexists.gif differ diff --git a/08/WebRoot/Images/jia.gif b/08/WebRoot/Images/jia.gif new file mode 100644 index 0000000..0ef3f4a Binary files /dev/null and b/08/WebRoot/Images/jia.gif differ diff --git a/08/WebRoot/Images/jian.gif b/08/WebRoot/Images/jian.gif new file mode 100644 index 0000000..eda6cd0 Binary files /dev/null and b/08/WebRoot/Images/jian.gif differ diff --git a/08/WebRoot/Images/jian_null.gif b/08/WebRoot/Images/jian_null.gif new file mode 100644 index 0000000..90d1eb5 Binary files /dev/null and b/08/WebRoot/Images/jian_null.gif differ diff --git a/08/WebRoot/Images/jian_s.gif b/08/WebRoot/Images/jian_s.gif new file mode 100644 index 0000000..59c0d20 Binary files /dev/null and b/08/WebRoot/Images/jian_s.gif differ diff --git a/08/WebRoot/Images/left.jpg b/08/WebRoot/Images/left.jpg new file mode 100644 index 0000000..0118d9f Binary files /dev/null and b/08/WebRoot/Images/left.jpg differ diff --git a/08/WebRoot/Images/left_bg.jpg b/08/WebRoot/Images/left_bg.jpg new file mode 100644 index 0000000..c247efb Binary files /dev/null and b/08/WebRoot/Images/left_bg.jpg differ diff --git a/08/WebRoot/Images/left_bg_bottom.jpg b/08/WebRoot/Images/left_bg_bottom.jpg new file mode 100644 index 0000000..0225fae Binary files /dev/null and b/08/WebRoot/Images/left_bg_bottom.jpg differ diff --git a/08/WebRoot/Images/main_bottom.jpg b/08/WebRoot/Images/main_bottom.jpg new file mode 100644 index 0000000..d188bd8 Binary files /dev/null and b/08/WebRoot/Images/main_bottom.jpg differ diff --git a/08/WebRoot/Images/main_center.jpg b/08/WebRoot/Images/main_center.jpg new file mode 100644 index 0000000..66cdc03 Binary files /dev/null and b/08/WebRoot/Images/main_center.jpg differ diff --git a/08/WebRoot/Images/main_top.JPG b/08/WebRoot/Images/main_top.JPG new file mode 100644 index 0000000..ce5fe01 Binary files /dev/null and b/08/WebRoot/Images/main_top.JPG differ diff --git a/08/WebRoot/Images/modify.gif b/08/WebRoot/Images/modify.gif new file mode 100644 index 0000000..c62ee4e Binary files /dev/null and b/08/WebRoot/Images/modify.gif differ diff --git a/08/WebRoot/Images/noword.jpg b/08/WebRoot/Images/noword.jpg new file mode 100644 index 0000000..1242eaa Binary files /dev/null and b/08/WebRoot/Images/noword.jpg differ diff --git a/08/WebRoot/Images/num/0.gif b/08/WebRoot/Images/num/0.gif new file mode 100644 index 0000000..9df6935 Binary files /dev/null and b/08/WebRoot/Images/num/0.gif differ diff --git a/08/WebRoot/Images/num/1.gif b/08/WebRoot/Images/num/1.gif new file mode 100644 index 0000000..b0e0884 Binary files /dev/null and b/08/WebRoot/Images/num/1.gif differ diff --git a/08/WebRoot/Images/num/2.gif b/08/WebRoot/Images/num/2.gif new file mode 100644 index 0000000..0742654 Binary files /dev/null and b/08/WebRoot/Images/num/2.gif differ diff --git a/08/WebRoot/Images/num/3.gif b/08/WebRoot/Images/num/3.gif new file mode 100644 index 0000000..9613ead Binary files /dev/null and b/08/WebRoot/Images/num/3.gif differ diff --git a/08/WebRoot/Images/num/4.gif b/08/WebRoot/Images/num/4.gif new file mode 100644 index 0000000..447795c Binary files /dev/null and b/08/WebRoot/Images/num/4.gif differ diff --git a/08/WebRoot/Images/num/5.gif b/08/WebRoot/Images/num/5.gif new file mode 100644 index 0000000..75ea7ea Binary files /dev/null and b/08/WebRoot/Images/num/5.gif differ diff --git a/08/WebRoot/Images/num/6.gif b/08/WebRoot/Images/num/6.gif new file mode 100644 index 0000000..82fa5f5 Binary files /dev/null and b/08/WebRoot/Images/num/6.gif differ diff --git a/08/WebRoot/Images/num/7.gif b/08/WebRoot/Images/num/7.gif new file mode 100644 index 0000000..4fcb69f Binary files /dev/null and b/08/WebRoot/Images/num/7.gif differ diff --git a/08/WebRoot/Images/num/8.gif b/08/WebRoot/Images/num/8.gif new file mode 100644 index 0000000..dba7521 Binary files /dev/null and b/08/WebRoot/Images/num/8.gif differ diff --git a/08/WebRoot/Images/num/9.gif b/08/WebRoot/Images/num/9.gif new file mode 100644 index 0000000..8f9436e Binary files /dev/null and b/08/WebRoot/Images/num/9.gif differ diff --git a/08/WebRoot/Images/num/Thumbs.db b/08/WebRoot/Images/num/Thumbs.db new file mode 100644 index 0000000..2d21523 Binary files /dev/null and b/08/WebRoot/Images/num/Thumbs.db differ diff --git a/08/WebRoot/Images/right.jpg b/08/WebRoot/Images/right.jpg new file mode 100644 index 0000000..972b5d7 Binary files /dev/null and b/08/WebRoot/Images/right.jpg differ diff --git a/08/WebRoot/Images/succ.gif b/08/WebRoot/Images/succ.gif new file mode 100644 index 0000000..ef29719 Binary files /dev/null and b/08/WebRoot/Images/succ.gif differ diff --git a/08/WebRoot/Images/swf/Thumbs.db b/08/WebRoot/Images/swf/Thumbs.db new file mode 100644 index 0000000..0c74184 Binary files /dev/null and b/08/WebRoot/Images/swf/Thumbs.db differ diff --git a/08/WebRoot/Images/swf/bgg.jpg b/08/WebRoot/Images/swf/bgg.jpg new file mode 100644 index 0000000..5d448c8 Binary files /dev/null and b/08/WebRoot/Images/swf/bgg.jpg differ diff --git a/08/WebRoot/Images/swf/bj.jpg b/08/WebRoot/Images/swf/bj.jpg new file mode 100644 index 0000000..dc82088 Binary files /dev/null and b/08/WebRoot/Images/swf/bj.jpg differ diff --git a/08/WebRoot/Images/swf/main.gif b/08/WebRoot/Images/swf/main.gif new file mode 100644 index 0000000..4af9d31 Binary files /dev/null and b/08/WebRoot/Images/swf/main.gif differ diff --git a/08/WebRoot/Images/swf/new.swf b/08/WebRoot/Images/swf/new.swf new file mode 100644 index 0000000..c3dbf2b Binary files /dev/null and b/08/WebRoot/Images/swf/new.swf differ diff --git a/08/WebRoot/Images/tiao.jpg b/08/WebRoot/Images/tiao.jpg new file mode 100644 index 0000000..f78b634 Binary files /dev/null and b/08/WebRoot/Images/tiao.jpg differ diff --git a/08/WebRoot/Images/top.jpg b/08/WebRoot/Images/top.jpg new file mode 100644 index 0000000..95c2075 Binary files /dev/null and b/08/WebRoot/Images/top.jpg differ diff --git a/08/WebRoot/Images/top_bg.jpg b/08/WebRoot/Images/top_bg.jpg new file mode 100644 index 0000000..132d8ea Binary files /dev/null and b/08/WebRoot/Images/top_bg.jpg differ diff --git a/08/WebRoot/Images/waichuan.gif b/08/WebRoot/Images/waichuan.gif new file mode 100644 index 0000000..f2a742b Binary files /dev/null and b/08/WebRoot/Images/waichuan.gif differ diff --git a/08/WebRoot/Images/waichuxiaojia.gif b/08/WebRoot/Images/waichuxiaojia.gif new file mode 100644 index 0000000..e4723d6 Binary files /dev/null and b/08/WebRoot/Images/waichuxiaojia.gif differ diff --git a/08/WebRoot/JS/DateTime2.js b/08/WebRoot/JS/DateTime2.js new file mode 100644 index 0000000..1bb774f --- /dev/null +++ b/08/WebRoot/JS/DateTime2.js @@ -0,0 +1,66 @@ +// ʾںʱ-------NQ +function ShowDate(Elements) +{ + var temp; + var datetime = new Date(); + var year = datetime.getYear(); + var month = datetime.getMonth() + 1; + var date = datetime.getDate(); + var day = datetime.getDay(); + temp = year+""+month+""+date+" "; + switch (day) + { + case 0: + temp = temp+""; + break; + case 1: + temp = temp+"һ"; + break; + case 2: + temp = temp+"ڶ"; + break; + case 3: + temp = temp+""; + break; + case 4: + temp = temp+""; + break; + case 5: + temp = temp+""; + break; + case 6: + temp = temp+""; + break; + } + Elements.innerHTML = temp; +} +function ShowTime(Elements) +{ + var temp = ""; + var datetime = new Date(); + var hour = datetime.getHours(); + var minu = datetime.getMinutes(); + var seco = datetime.getSeconds(); + if(hour < 10) + hour ="0" + hour; + if(minu < 10) + minu ="0" + minu; + if(seco < 10) + seco ="0" + seco; + temp = temp+" "+hour+":"+minu+":"+seco+" "; + if(hour >= 0 && hour < 5) + temp = temp + "㳿" + if(hour >= 5 && hour < 8) + temp = temp + "Ϻ" + if(hour >= 8 && hour < 11) + temp = temp + "" + if(hour >= 11 && hour < 13) + temp = temp + "" + if(hour >= 13 && hour < 17) + temp = temp + "" + if(hour >= 17 && hour < 24) + temp = temp + "Ϻ" + Elements.innerHTML = temp; //Elements()id + window.setTimeout("ShowTime(" + Elements.id + ")",1000) //Elements.nameElements.idElements + +} diff --git a/08/WebRoot/Kaoqin/_notes/waichu_add.jsp.mno b/08/WebRoot/Kaoqin/_notes/waichu_add.jsp.mno new file mode 100644 index 0000000..1d49e34 --- /dev/null +++ b/08/WebRoot/Kaoqin/_notes/waichu_add.jsp.mno @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/08/WebRoot/Kaoqin/calender.jsp b/08/WebRoot/Kaoqin/calender.jsp new file mode 100644 index 0000000..8107df1 --- /dev/null +++ b/08/WebRoot/Kaoqin/calender.jsp @@ -0,0 +1,238 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + +
    +
    + + + + + + + + + + + + + + + +
    + +
    + + + +
    + + + + + + + + + + <%for (int j=0;j<=5;j++){%> + + <%for(int k=0;k<=6;k++){%> + + <%}%> + + <%}%> +
    һ
    +
    +
    +
    + \ No newline at end of file diff --git a/08/WebRoot/Kaoqin/chuchai_add.jsp b/08/WebRoot/Kaoqin/chuchai_add.jsp new file mode 100644 index 0000000..f29e10e --- /dev/null +++ b/08/WebRoot/Kaoqin/chuchai_add.jsp @@ -0,0 +1,120 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ٵǼ + + + + + + + + + + +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
      
         Ǽ
    + + + + + + +
    ʱ
      
    + + + +
    + + + + +
    +
       +
    +
    + + + + + diff --git a/08/WebRoot/Kaoqin/chuchai_add_cl.jsp b/08/WebRoot/Kaoqin/chuchai_add_cl.jsp new file mode 100644 index 0000000..b9724f3 --- /dev/null +++ b/08/WebRoot/Kaoqin/chuchai_add_cl.jsp @@ -0,0 +1,27 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + <% + Chuchai chuchai = new Chuchai(); // + chuchai.setChuarea(request.getParameter("chuarea")); + chuchai.setDepartment(request.getParameter("department")); + chuchai.setName1(request.getParameter("name1")); + chuchai.setTime1(Date.valueOf(request.getParameter("time1"))); + chuchai.setTime2(Date.valueOf(request.getParameter("time2"))); + chuchai.setState("0"); + HibernateUtil.saveChuchai(chuchai); //ñϢ +%> + + \ No newline at end of file diff --git a/08/WebRoot/Kaoqin/chuchai_index.jsp b/08/WebRoot/Kaoqin/chuchai_index.jsp new file mode 100644 index 0000000..e831707 --- /dev/null +++ b/08/WebRoot/Kaoqin/chuchai_index.jsp @@ -0,0 +1,159 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> +<%@page import="com.hiernate.persistence.Chuchai"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + Ǽ + + + + + + + + + + + + + +
    + + + + +
    + + + + +
             Ǽ +

    Ǽ



    + + + + + + + + + + + + + + <%}} }%> + +
    + + + + + + + + + +
    ʼʱ
    ֹʱ
    Ƿع
    + <% + String currPage = request.getParameter("currPage"); + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 5 ; + allRecCount = HibernateUtil.findChuchaiCount(); //ѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + } + List listChuchai =HibernateUtil.findchuchai((iCurrPage - 1)* recPerPage,recPerPage); + if(listChuchai.isEmpty()){ + out.println("Ϣ"); + } + if(!listChuchai.isEmpty() && listChuchai.size()>0){ + for(int i= 0;i +
    <%=chuchai.getName1()%>
    <%=chuchai.getDepartment()%>
    <%=chuchai.getTime1()%>
    <%=chuchai.getTime2()%>
    + <%if( chuchai.getState().equals("1")){%> + ѻع + <% } %> + <%if(chuchai.getState().equals("0")){ + if(chuchai.getName1().equals(application.getAttribute("un"))){ + %> + ع + <% } + else{%> + ع + <%}%> +
    + + +
    + <% if(recPerPage < allRecCount){ + String href = "  һҳ"); //һҳ + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); //һҳ + } + %> + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%}%> +
    + + + + + diff --git a/08/WebRoot/Kaoqin/chuchai_update.jsp b/08/WebRoot/Kaoqin/chuchai_update.jsp new file mode 100644 index 0000000..6c2f787 --- /dev/null +++ b/08/WebRoot/Kaoqin/chuchai_update.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> +<%@page import="com.hiernate.persistence.Chuchai"%> + + + +<% + List listChuchai = HibernateUtil.findchuchai(Integer.parseInt(request.getParameter("id"))); //óѯ + if(!listChuchai.isEmpty() && listChuchai.size()>0){ + for(int j=0;j + + + + + diff --git a/08/WebRoot/Kaoqin/chuchai_xianshi.jsp b/08/WebRoot/Kaoqin/chuchai_xianshi.jsp new file mode 100644 index 0000000..cb39343 --- /dev/null +++ b/08/WebRoot/Kaoqin/chuchai_xianshi.jsp @@ -0,0 +1,89 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ϸϢ + + + + + + + + + + <% + String strid= request.getParameter("ID"); // + List listchuchai = HibernateUtil.findchuchai(Integer.parseInt(strid)); //ѯ + if(!listchuchai.isEmpty() && listchuchai.size()>0){ + for(int i=0;i + + + + +
    + + + + + + +
        

      ǼϸϢ
    + + + + + + + + + + + + + + + + <%}} %> +
    +
    +
    +    +
    +
         /ԭ:
    +           <%=chuchai.getChuarea()%>
    ʼʱ
    ֹʱ
    + + + + + +
    + + + + + + diff --git a/08/WebRoot/Kaoqin/onduty_add.jsp b/08/WebRoot/Kaoqin/onduty_add.jsp new file mode 100644 index 0000000..68d7d3f --- /dev/null +++ b/08/WebRoot/Kaoqin/onduty_add.jsp @@ -0,0 +1,123 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + °ǼǶԻ + + + + + +
    + + + + + +
    +
    + + + + + + + + + + + + + + + +
          
       °Ǽ
    +
    + + + + + +
    + + + + + + +
    Ǽ
    ǼDZע
    + + + + + + +
    +
    + + + + +
    + + + + +
    +
       +
     
     
    +
    + + + + + diff --git a/08/WebRoot/Kaoqin/onduty_add_cl.jsp b/08/WebRoot/Kaoqin/onduty_add_cl.jsp new file mode 100644 index 0000000..b9ed98f --- /dev/null +++ b/08/WebRoot/Kaoqin/onduty_add_cl.jsp @@ -0,0 +1,51 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + +<% + Onduty onduty = new Onduty(); //Onduty + onduty.setName1(request.getParameter("name1")); //νΪύϢ + onduty.setDepartment(request.getParameter("department")); + onduty.setEnroltype(request.getParameter("enroltype")); + onduty.setEnrolremark(request.getParameter("enrolremark")); + if(request.getParameter("enroltype").equals("ϰǼ")){ //жûеϰ°Ǽ + Date d = GetTime.getDate(); + SimpleDateFormat strup = new SimpleDateFormat("yyyy-MM-dd 08:20:00"); //˾涨ϰʱ + String strDate = strup.format(d); + String strEtime = GetTime.getDateTime(); //ǩʱ,ùз + boolean bb = GetTime.isDateBefore(strDate,strEtime); //ùбȽʱ䷽ + if(bb==true){ + onduty.setState("ٵ"); //Ǽʱ䳬涨ʱ䣬Ϊٵ + } + if(bb==false){ + onduty.setState(""); //Ǽʱڹ涨ʱ֮ǰ򱣴 + } + onduty.setDefinetime(strDate); //˾涨ϰʱondutyDefinetime + onduty.setEnroltime(strEtime); //ûǩʱondutyEnroltime + } + if(request.getParameter("enroltype").equals("°Ǽ")){ + Date dd = new Date(); + SimpleDateFormat sdfgo = new SimpleDateFormat("yyyy-MM-dd 17:10:00"); //˾涨°ʱ + String strDate = sdfgo.format(dd); + String strDatet = GetTime.getDateTime(); //ù෽õǰʱ + boolean b = GetTime.isDateBefore(strDate,strDatet); //ùжʱǰ󷽷 + if(b==true){ //ûǼʱ°ʱ֮ǰҳˡ + onduty.setState(""); + } + if(b==false){ + onduty.setState(""); //ûǼʱ°֮ҳʾ + } + onduty.setDefinetime(strDate); //ö°ʱ + onduty.setEnroltime(strDatet); //öĵǼʱ + } + HibernateUtil.saveOnduty(onduty); //ǼϢ + %> + + + + diff --git a/08/WebRoot/Kaoqin/onduty_index.jsp b/08/WebRoot/Kaoqin/onduty_index.jsp new file mode 100644 index 0000000..ec8e6de --- /dev/null +++ b/08/WebRoot/Kaoqin/onduty_index.jsp @@ -0,0 +1,124 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> +<%@page import="com.hiernate.persistence.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + °Ǽ + + + + + + + + + + +
    + + + +
    + + + + + +
             °Ǽ +

    Ǽ

    +


    + <% String currPage = request.getParameter("currPage"); + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 5 ; + allRecCount = HibernateUtil.findOndutyCount(); //ѯ°¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + } + List listOnduty =HibernateUtil.findOnduty((iCurrPage - 1) * recPerPage, recPerPage); + if(listOnduty.isEmpty()){ + out.println("Ϣ"); + } + %> + + + + + + + + + + + + + + <%}}%> + +
    + + + + + + + + + + + +
    Ǽ
    Ǽ
    涨ʱ
    Ǽʱ
    ǼDZע
    Ǽܽ
    + <% + if(!listOnduty.isEmpty()&& listOnduty.size()>0){ + for(int i=0;i +
    <%=onduty.getName1()%>
    <%=onduty.getDepartment()%>
    <%=onduty.getEnroltype()%>
    <%=onduty.getDefinetime()%>
    <%=onduty.getEnroltime()%> 
    <%=onduty.getState()%>
    + + + + +
    + <% + if(recPerPage < allRecCount){ + String href = "  һҳ"); + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ //һҳ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); + } + %> + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%} %> +
    +
    + + + + + diff --git a/08/WebRoot/Kaoqin/onduty_xianshi.jsp b/08/WebRoot/Kaoqin/onduty_xianshi.jsp new file mode 100644 index 0000000..5853a59 --- /dev/null +++ b/08/WebRoot/Kaoqin/onduty_xianshi.jsp @@ -0,0 +1,87 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + °ϸϢҳ + + + + + +<% + String strid= request.getParameter("ID"); // + List listonduty = HibernateUtil.findonduty(Integer.parseInt(strid)); //ѯ + if(!listonduty.isEmpty() && listonduty.size()>0){ + for(int i=0;i + + + + +
    +
    + + + + + +
          
    °ǼϸϢ
    + + + + + + + + + + + + + + + +
    +
    +
    +    +
    +
    Ǽ
    +    +   
         ǼDZע:
    +           <%=onduty.getEnrolremark()%>
    + <%}} %> +
    + + + + +
    + + + + + diff --git a/08/WebRoot/Kaoqin/qingjia_add.jsp b/08/WebRoot/Kaoqin/qingjia_add.jsp new file mode 100644 index 0000000..e7d40ac --- /dev/null +++ b/08/WebRoot/Kaoqin/qingjia_add.jsp @@ -0,0 +1,115 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ϸϢҳ + + + + + +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
          
       ٵǼ
    + + + + + + +
    ԭ
    ʱ  
    + + + +
    + + + + +
    +
       +
    +
    + + + + + diff --git a/08/WebRoot/Kaoqin/qingjia_add_cl.jsp b/08/WebRoot/Kaoqin/qingjia_add_cl.jsp new file mode 100644 index 0000000..738ae1e --- /dev/null +++ b/08/WebRoot/Kaoqin/qingjia_add_cl.jsp @@ -0,0 +1,33 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.sql.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + ϸϢҳ + +<% + Qingjia qingjia = new Qingjia(); + qingjia.setContent(request.getParameter("content")); + qingjia.setTime1(Date.valueOf(request.getParameter("time1"))); //ַתDate + qingjia.setTime2(Date.valueOf(request.getParameter("time2"))); + qingjia.setDepartment(request.getParameter("department")); + qingjia.setState("0"); + qingjia.setName1(request.getParameter("name1")); + HibernateUtil.saveQingjia(qingjia); + +%> + + + + + diff --git a/08/WebRoot/Kaoqin/qingjia_index.jsp b/08/WebRoot/Kaoqin/qingjia_index.jsp new file mode 100644 index 0000000..3184413 --- /dev/null +++ b/08/WebRoot/Kaoqin/qingjia_index.jsp @@ -0,0 +1,132 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ٵǼ + + + + + + + + + + + + diff --git a/14/WebRoot/images/222_10.gif b/14/WebRoot/images/222_10.gif new file mode 100644 index 0000000..204e088 Binary files /dev/null and b/14/WebRoot/images/222_10.gif differ diff --git a/14/WebRoot/images/222_13.gif b/14/WebRoot/images/222_13.gif new file mode 100644 index 0000000..7e0fcc9 Binary files /dev/null and b/14/WebRoot/images/222_13.gif differ diff --git a/14/WebRoot/images/222_22.gif b/14/WebRoot/images/222_22.gif new file mode 100644 index 0000000..755c86e Binary files /dev/null and b/14/WebRoot/images/222_22.gif differ diff --git a/14/WebRoot/images/222_30.gif b/14/WebRoot/images/222_30.gif new file mode 100644 index 0000000..a272b09 Binary files /dev/null and b/14/WebRoot/images/222_30.gif differ diff --git a/14/WebRoot/images/Thumbs.db b/14/WebRoot/images/Thumbs.db new file mode 100644 index 0000000..c1ca7ee Binary files /dev/null and b/14/WebRoot/images/Thumbs.db differ diff --git a/14/WebRoot/images/ad.JPG b/14/WebRoot/images/ad.JPG new file mode 100644 index 0000000..653494d Binary files /dev/null and b/14/WebRoot/images/ad.JPG differ diff --git a/14/WebRoot/images/admin_bar.gif b/14/WebRoot/images/admin_bar.gif new file mode 100644 index 0000000..1071a34 Binary files /dev/null and b/14/WebRoot/images/admin_bar.gif differ diff --git a/14/WebRoot/images/admin_bg.gif b/14/WebRoot/images/admin_bg.gif new file mode 100644 index 0000000..78778bc Binary files /dev/null and b/14/WebRoot/images/admin_bg.gif differ diff --git a/14/WebRoot/images/admin_ico.gif b/14/WebRoot/images/admin_ico.gif new file mode 100644 index 0000000..9df3f02 Binary files /dev/null and b/14/WebRoot/images/admin_ico.gif differ diff --git a/14/WebRoot/images/admin_top.gif b/14/WebRoot/images/admin_top.gif new file mode 100644 index 0000000..92c890b Binary files /dev/null and b/14/WebRoot/images/admin_top.gif differ diff --git a/14/WebRoot/images/admin_top1.gif b/14/WebRoot/images/admin_top1.gif new file mode 100644 index 0000000..f17315b Binary files /dev/null and b/14/WebRoot/images/admin_top1.gif differ diff --git a/14/WebRoot/images/affiche.JPG b/14/WebRoot/images/affiche.JPG new file mode 100644 index 0000000..db7c4a3 Binary files /dev/null and b/14/WebRoot/images/affiche.JPG differ diff --git a/14/WebRoot/images/announce.gif b/14/WebRoot/images/announce.gif new file mode 100644 index 0000000..591a5a4 Binary files /dev/null and b/14/WebRoot/images/announce.gif differ diff --git a/14/WebRoot/images/arrow.gif b/14/WebRoot/images/arrow.gif new file mode 100644 index 0000000..1ba2e68 Binary files /dev/null and b/14/WebRoot/images/arrow.gif differ diff --git a/14/WebRoot/images/ashline_foot.gif b/14/WebRoot/images/ashline_foot.gif new file mode 100644 index 0000000..bfa11a2 Binary files /dev/null and b/14/WebRoot/images/ashline_foot.gif differ diff --git a/14/WebRoot/images/ashline_head.gif b/14/WebRoot/images/ashline_head.gif new file mode 100644 index 0000000..06325d2 Binary files /dev/null and b/14/WebRoot/images/ashline_head.gif differ diff --git a/14/WebRoot/images/banner_bg.gif b/14/WebRoot/images/banner_bg.gif new file mode 100644 index 0000000..f3dc624 Binary files /dev/null and b/14/WebRoot/images/banner_bg.gif differ diff --git a/14/WebRoot/images/bg.GIF b/14/WebRoot/images/bg.GIF new file mode 100644 index 0000000..6d818cc Binary files /dev/null and b/14/WebRoot/images/bg.GIF differ diff --git a/14/WebRoot/images/bg_ad.GIF b/14/WebRoot/images/bg_ad.GIF new file mode 100644 index 0000000..4df350b Binary files /dev/null and b/14/WebRoot/images/bg_ad.GIF differ diff --git a/14/WebRoot/images/bg_navigation.GIF b/14/WebRoot/images/bg_navigation.GIF new file mode 100644 index 0000000..38fd37a Binary files /dev/null and b/14/WebRoot/images/bg_navigation.GIF differ diff --git a/14/WebRoot/images/blank_bg.gif b/14/WebRoot/images/blank_bg.gif new file mode 100644 index 0000000..455f9b5 Binary files /dev/null and b/14/WebRoot/images/blank_bg.gif differ diff --git a/14/WebRoot/images/bullion.gif b/14/WebRoot/images/bullion.gif new file mode 100644 index 0000000..d2ec61b Binary files /dev/null and b/14/WebRoot/images/bullion.gif differ diff --git a/14/WebRoot/images/close.gif b/14/WebRoot/images/close.gif new file mode 100644 index 0000000..61a4f77 Binary files /dev/null and b/14/WebRoot/images/close.gif differ diff --git a/14/WebRoot/images/del.gif b/14/WebRoot/images/del.gif new file mode 100644 index 0000000..91c63ee Binary files /dev/null and b/14/WebRoot/images/del.gif differ diff --git a/14/WebRoot/images/download.gif b/14/WebRoot/images/download.gif new file mode 100644 index 0000000..1851f25 Binary files /dev/null and b/14/WebRoot/images/download.gif differ diff --git a/14/WebRoot/images/email.gif b/14/WebRoot/images/email.gif new file mode 100644 index 0000000..6733448 Binary files /dev/null and b/14/WebRoot/images/email.gif differ diff --git a/14/WebRoot/images/exit.gif b/14/WebRoot/images/exit.gif new file mode 100644 index 0000000..8f95c7d Binary files /dev/null and b/14/WebRoot/images/exit.gif differ diff --git a/14/WebRoot/images/guestboard.JPG b/14/WebRoot/images/guestboard.JPG new file mode 100644 index 0000000..590772c Binary files /dev/null and b/14/WebRoot/images/guestboard.JPG differ diff --git a/14/WebRoot/images/home.gif b/14/WebRoot/images/home.gif new file mode 100644 index 0000000..312601d Binary files /dev/null and b/14/WebRoot/images/home.gif differ diff --git a/14/WebRoot/images/ico/01.gif b/14/WebRoot/images/ico/01.gif new file mode 100644 index 0000000..1b5c808 Binary files /dev/null and b/14/WebRoot/images/ico/01.gif differ diff --git a/14/WebRoot/images/ico/08.gif b/14/WebRoot/images/ico/08.gif new file mode 100644 index 0000000..971c2b0 Binary files /dev/null and b/14/WebRoot/images/ico/08.gif differ diff --git a/14/WebRoot/images/ico/Thumbs.db b/14/WebRoot/images/ico/Thumbs.db new file mode 100644 index 0000000..428835a Binary files /dev/null and b/14/WebRoot/images/ico/Thumbs.db differ diff --git a/14/WebRoot/images/ico/select.gif b/14/WebRoot/images/ico/select.gif new file mode 100644 index 0000000..13a186b Binary files /dev/null and b/14/WebRoot/images/ico/select.gif differ diff --git a/14/WebRoot/images/icon.gif b/14/WebRoot/images/icon.gif new file mode 100644 index 0000000..7ee4d3c Binary files /dev/null and b/14/WebRoot/images/icon.gif differ diff --git a/14/WebRoot/images/index_02.gif b/14/WebRoot/images/index_02.gif new file mode 100644 index 0000000..e1f4500 Binary files /dev/null and b/14/WebRoot/images/index_02.gif differ diff --git a/14/WebRoot/images/index_07.gif b/14/WebRoot/images/index_07.gif new file mode 100644 index 0000000..b49bf41 Binary files /dev/null and b/14/WebRoot/images/index_07.gif differ diff --git a/14/WebRoot/images/index_10.gif b/14/WebRoot/images/index_10.gif new file mode 100644 index 0000000..0b20988 Binary files /dev/null and b/14/WebRoot/images/index_10.gif differ diff --git a/14/WebRoot/images/index_separate.gif b/14/WebRoot/images/index_separate.gif new file mode 100644 index 0000000..44450d9 Binary files /dev/null and b/14/WebRoot/images/index_separate.gif differ diff --git a/14/WebRoot/images/index_type.gif b/14/WebRoot/images/index_type.gif new file mode 100644 index 0000000..bc5388f Binary files /dev/null and b/14/WebRoot/images/index_type.gif differ diff --git a/14/WebRoot/images/left_ico.GIF b/14/WebRoot/images/left_ico.GIF new file mode 100644 index 0000000..3fdd018 Binary files /dev/null and b/14/WebRoot/images/left_ico.GIF differ diff --git a/14/WebRoot/images/left_title_gjbdxzph.GIF b/14/WebRoot/images/left_title_gjbdxzph.GIF new file mode 100644 index 0000000..2cddceb Binary files /dev/null and b/14/WebRoot/images/left_title_gjbdxzph.GIF differ diff --git a/14/WebRoot/images/left_title_rjxzph.GIF b/14/WebRoot/images/left_title_rjxzph.GIF new file mode 100644 index 0000000..e513e98 Binary files /dev/null and b/14/WebRoot/images/left_title_rjxzph.GIF differ diff --git a/14/WebRoot/images/left_title_wzgg.GIF b/14/WebRoot/images/left_title_wzgg.GIF new file mode 100644 index 0000000..8c5f478 Binary files /dev/null and b/14/WebRoot/images/left_title_wzgg.GIF differ diff --git a/14/WebRoot/images/left_title_yqlj.GIF b/14/WebRoot/images/left_title_yqlj.GIF new file mode 100644 index 0000000..9bc98c5 Binary files /dev/null and b/14/WebRoot/images/left_title_yqlj.GIF differ diff --git a/14/WebRoot/images/logo.gif b/14/WebRoot/images/logo.gif new file mode 100644 index 0000000..8d53ca4 Binary files /dev/null and b/14/WebRoot/images/logo.gif differ diff --git a/14/WebRoot/images/male.gif b/14/WebRoot/images/male.gif new file mode 100644 index 0000000..7d42082 Binary files /dev/null and b/14/WebRoot/images/male.gif differ diff --git a/14/WebRoot/images/modify.gif b/14/WebRoot/images/modify.gif new file mode 100644 index 0000000..0ee4190 Binary files /dev/null and b/14/WebRoot/images/modify.gif differ diff --git a/14/WebRoot/images/more.gif b/14/WebRoot/images/more.gif new file mode 100644 index 0000000..1da04a1 Binary files /dev/null and b/14/WebRoot/images/more.gif differ diff --git a/14/WebRoot/images/picture_newsNotice.gif b/14/WebRoot/images/picture_newsNotice.gif new file mode 100644 index 0000000..b2f3e77 Binary files /dev/null and b/14/WebRoot/images/picture_newsNotice.gif differ diff --git a/14/WebRoot/images/rect.gif b/14/WebRoot/images/rect.gif new file mode 100644 index 0000000..3986ac6 Binary files /dev/null and b/14/WebRoot/images/rect.gif differ diff --git a/14/WebRoot/images/reply.gif b/14/WebRoot/images/reply.gif new file mode 100644 index 0000000..338e07d Binary files /dev/null and b/14/WebRoot/images/reply.gif differ diff --git a/14/WebRoot/images/resolvent/Thumbs.db b/14/WebRoot/images/resolvent/Thumbs.db new file mode 100644 index 0000000..4b73d19 Binary files /dev/null and b/14/WebRoot/images/resolvent/Thumbs.db differ diff --git a/14/WebRoot/images/resolvent/_2676648875979061543.jpg b/14/WebRoot/images/resolvent/_2676648875979061543.jpg new file mode 100644 index 0000000..1db87fa Binary files /dev/null and b/14/WebRoot/images/resolvent/_2676648875979061543.jpg differ diff --git a/14/WebRoot/images/search.gif b/14/WebRoot/images/search.gif new file mode 100644 index 0000000..18c44ea Binary files /dev/null and b/14/WebRoot/images/search.gif differ diff --git a/14/WebRoot/images/soft/Thumbs.db b/14/WebRoot/images/soft/Thumbs.db new file mode 100644 index 0000000..d660eb4 Binary files /dev/null and b/14/WebRoot/images/soft/Thumbs.db differ diff --git a/14/WebRoot/images/soft/download.gif b/14/WebRoot/images/soft/download.gif new file mode 100644 index 0000000..89d2c03 Binary files /dev/null and b/14/WebRoot/images/soft/download.gif differ diff --git a/14/WebRoot/images/star.gif b/14/WebRoot/images/star.gif new file mode 100644 index 0000000..8310bc5 Binary files /dev/null and b/14/WebRoot/images/star.gif differ diff --git a/14/WebRoot/images/submit.gif b/14/WebRoot/images/submit.gif new file mode 100644 index 0000000..a6b4231 Binary files /dev/null and b/14/WebRoot/images/submit.gif differ diff --git a/14/WebRoot/images/title_introduce.GIF b/14/WebRoot/images/title_introduce.GIF new file mode 100644 index 0000000..ead514e Binary files /dev/null and b/14/WebRoot/images/title_introduce.GIF differ diff --git a/14/WebRoot/images/title_newsNotice.gif b/14/WebRoot/images/title_newsNotice.gif new file mode 100644 index 0000000..97938c0 Binary files /dev/null and b/14/WebRoot/images/title_newsNotice.gif differ diff --git a/14/WebRoot/images/top_about.gif b/14/WebRoot/images/top_about.gif new file mode 100644 index 0000000..7110697 Binary files /dev/null and b/14/WebRoot/images/top_about.gif differ diff --git a/14/WebRoot/images/top_contact.GIF b/14/WebRoot/images/top_contact.GIF new file mode 100644 index 0000000..0f42a2e Binary files /dev/null and b/14/WebRoot/images/top_contact.GIF differ diff --git a/14/WebRoot/images/top_favorite.GIF b/14/WebRoot/images/top_favorite.GIF new file mode 100644 index 0000000..45032dc Binary files /dev/null and b/14/WebRoot/images/top_favorite.GIF differ diff --git a/14/WebRoot/images/top_homepage.GIF b/14/WebRoot/images/top_homepage.GIF new file mode 100644 index 0000000..f196a81 Binary files /dev/null and b/14/WebRoot/images/top_homepage.GIF differ diff --git a/14/WebRoot/images/vip.gif b/14/WebRoot/images/vip.gif new file mode 100644 index 0000000..e349a06 Binary files /dev/null and b/14/WebRoot/images/vip.gif differ diff --git a/14/WebRoot/images/whiteline_head.gif b/14/WebRoot/images/whiteline_head.gif new file mode 100644 index 0000000..b25f9a9 Binary files /dev/null and b/14/WebRoot/images/whiteline_head.gif differ diff --git a/14/WebRoot/index.jsp b/14/WebRoot/index.jsp new file mode 100644 index 0000000..4742d55 --- /dev/null +++ b/14/WebRoot/index.jsp @@ -0,0 +1,34 @@ +<%@ page contentType="text/html; charset=GBK"%> + + + +âƼ + + + +
    + + + + + + + + + +
    + + + + +
            ٵǼ +

    Ǽ



    + + + + + + + + + + + + + + + <%}}}%> + + + +
    + + + + + + + + + +
    ʼʱ
    ֹʱ
    ԭ
    Ƿ
    + <% + String currPage = request.getParameter("currPage"); + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 5 ; + allRecCount = HibernateUtil.findQingjiaCount(); //ѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + + } + List listQingjia =HibernateUtil.findQingjia((iCurrPage - 1) * recPerPage, recPerPage); + if(listQingjia.isEmpty()){ + out.println("Ϣ"); + } + if(!listQingjia.isEmpty() && listQingjia.size()>0){ + for(int i= 0;i +
    <%=qingjia.getName1()%>
    <%=qingjia.getDepartment()%>
    <%=qingjia.getTime1()%>
    <%=qingjia.getTime2()%>
    + <%if(qingjia.getState().equals("1")){%> + + <% }%> + <%if(qingjia.getState().equals("0")){ + if(qingjia.getName1().equals(application.getAttribute("un"))){ //ֻ˺͵¼ͬſɽٲ + %> + + <%}else{%> + + <%}%>
    + + + +
    + <% if(recPerPage < allRecCount){ + String href = "  һҳ"); + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ //һҳ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); + } + %> + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%}%> +
    + + + + + + diff --git a/08/WebRoot/Kaoqin/qingjia_indexCenter.jsp b/08/WebRoot/Kaoqin/qingjia_indexCenter.jsp new file mode 100644 index 0000000..32a404d --- /dev/null +++ b/08/WebRoot/Kaoqin/qingjia_indexCenter.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + + +<% + List listQing = HibernateUtil.findQingjia(Integer.parseInt(request.getParameter("id"))); + if(!listQing.isEmpty() && listQing.size()>0){ + for(int j=0;j + \ No newline at end of file diff --git a/08/WebRoot/Kaoqin/qingjia_xianshi.jsp b/08/WebRoot/Kaoqin/qingjia_xianshi.jsp new file mode 100644 index 0000000..b9f055f --- /dev/null +++ b/08/WebRoot/Kaoqin/qingjia_xianshi.jsp @@ -0,0 +1,82 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ϸϢҳ + + + + +<% + String strid= request.getParameter("ID"); + List listqingjia = HibernateUtil.findQingjia(Integer.parseInt(strid)); + if(!listqingjia.isEmpty() && listqingjia.size()>0){ + for(int i=0;i + + + + +
    + + + + + + +
        
      ٵǼϸϢ
    + + + + + + + + + + + + + + + +
    +
    +
    +    +
    +
         ԭ:
    +           <%=qingjia.getContent()%>
    ʼʱ
    ֹʱ
    + <%}} %> + + + + +
    + + + + + diff --git a/08/WebRoot/Kaoqin/waichu.jsp b/08/WebRoot/Kaoqin/waichu.jsp new file mode 100644 index 0000000..2b3e1b6 --- /dev/null +++ b/08/WebRoot/Kaoqin/waichu.jsp @@ -0,0 +1,165 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + +
            Ǽ +

    Ǽ



    + + + + + + <% + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 5 ; + allRecCount = HibernateUtil.findWaichuCount(); //ѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + String currPage = request.getParameter("currPage"); + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + } + List listWaichu =HibernateUtil.finWaichu((iCurrPage - 1) * recPerPage, recPerPage); + if(listWaichu.isEmpty()){ + out.println("Ϣ"); + } + if(!listWaichu.isEmpty() && listWaichu.size()>0){ + for(int i= 0;i + + + + + + + + + <%}}}%> + + + + +
    + + + + + + + + + +
    ʼʱ
    ֹʱ
    ԭ
    Ƿ
    +
    <%=waichu.getName1()%>
    <%=waichu.getDepartment()%>
    <%=waichu.getTime1()%>
    <%=waichu.getTime2()%>
    + +
    + <%if(waichu.getState()==1){%> + + <%}%> + <%if (waichu.getState()==0){ + if(waichu.getName1().equals(application.getAttribute("un"))){ + %> + + <%}else{%> + + <%}%> +
    + +
    +
    + <% if(recPerPage < allRecCount){ + String href = "  һҳ"); //һҳ + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); //һҳ + } + %> + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%} %> +
    +
    + +
    + + + + + diff --git a/08/WebRoot/Kaoqin/waichuCenter.jsp b/08/WebRoot/Kaoqin/waichuCenter.jsp new file mode 100644 index 0000000..ab7a272 --- /dev/null +++ b/08/WebRoot/Kaoqin/waichuCenter.jsp @@ -0,0 +1,23 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + <% + List listWai = HibernateUtil.finwaichuId(Integer.parseInt(request.getParameter("id"))); //ѯǼԱ + if(!listWai.isEmpty() && listWai.size()>0){ //жϼǷΪ + for(int j=0;j + \ No newline at end of file diff --git a/08/WebRoot/Kaoqin/waichu_add.jsp b/08/WebRoot/Kaoqin/waichu_add.jsp new file mode 100644 index 0000000..a5b4511 --- /dev/null +++ b/08/WebRoot/Kaoqin/waichu_add.jsp @@ -0,0 +1,117 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ǼҳԻ + + + + + + + + + + +
    + + + + + +

           Ǽ

    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    ԭ
    ʱ  
    + + + +
    + + + + +
       +
    +
    + + + + + diff --git a/08/WebRoot/Kaoqin/waichu_add_cl.jsp b/08/WebRoot/Kaoqin/waichu_add_cl.jsp new file mode 100644 index 0000000..0e5c5f7 --- /dev/null +++ b/08/WebRoot/Kaoqin/waichu_add_cl.jsp @@ -0,0 +1,28 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + +<% + Waichu waichu = new Waichu(); //Ϣ + waichu.setContent(request.getParameter("content")); //öԭ + waichu.setDepartment(request.getParameter("department")); + waichu.setName1(request.getParameter("name1")); //ö + waichu.setState(0); //öijʼ״̬ + waichu.setTime1(Date.valueOf(request.getParameter("time1"))); //öʱ + waichu.setTime2(Date.valueOf(request.getParameter("time2"))); //öĻعʱ + HibernateUtil.saveWaichu(waichu); //ñֶ󷽷 +%> + + \ No newline at end of file diff --git a/08/WebRoot/Kaoqin/waichu_xianshi.jsp b/08/WebRoot/Kaoqin/waichu_xianshi.jsp new file mode 100644 index 0000000..c5929fa --- /dev/null +++ b/08/WebRoot/Kaoqin/waichu_xianshi.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ϸϢ + + + + + + + + + + <% + String strid= request.getParameter("ID"); + List listwaichu = HibernateUtil.finwaichuId(Integer.parseInt(strid)); //ѯ + if(!listwaichu.isEmpty() && listwaichu.size()>0){ + for(int i=0;i + + + + + +
    + + + + + + +
        

      ǼϸϢ
    + + + + + + + + + + + + + + + +
    +
    +
    +    +
    +
         ԭ:
    +           <%=waichu.getContent()%>
    ʼʱ
    ֹʱ
    + + + + +
    +<%}} %> + + + + + diff --git a/08/WebRoot/META-INF/MANIFEST.MF b/08/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/08/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/08/WebRoot/Planmanage/bm_add.jsp b/08/WebRoot/Planmanage/bm_add.jsp new file mode 100644 index 0000000..067ec77 --- /dev/null +++ b/08/WebRoot/Planmanage/bm_add.jsp @@ -0,0 +1,126 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + żƻҳ + + + + + + + + + + + + + + + +
    + +
    + + + +
     
    żƻ
    +
    + + + + + + + +
      
    + + + + + + + + + + + + + + + +
    ƻ
    + + + + +
    ƻ
    + + + + + +
    + + + + + + +
    +
    + +
    +
    +    + +    + +   + +
    +
    + + + + + diff --git a/08/WebRoot/Planmanage/bm_add_cl.jsp b/08/WebRoot/Planmanage/bm_add_cl.jsp new file mode 100644 index 0000000..3f0f8e2 --- /dev/null +++ b/08/WebRoot/Planmanage/bm_add_cl.jsp @@ -0,0 +1,20 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + <% + Bm bm = new Bm(); + bm.setName1(request.getParameter("name1")); + bm.setContent(request.getParameter("content")); + bm.setTitle(request.getParameter("title")); + bm.setTime1(Date.valueOf(request.getParameter("time1"))); + HibernateUtil.savebm(bm); + %> + + + \ No newline at end of file diff --git a/08/WebRoot/Planmanage/bm_del.jsp b/08/WebRoot/Planmanage/bm_del.jsp new file mode 100644 index 0000000..048ebc9 --- /dev/null +++ b/08/WebRoot/Planmanage/bm_del.jsp @@ -0,0 +1,37 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ҵƻҳ +<% + + int link=Integer.parseInt(request.getParameter("link")); + int currPage=Integer.parseInt(request.getParameter("currPage")); + + if(link==1){ + if(currPage!=1){ + currPage=currPage-1; + + }} + String strid = request.getParameter("id"); + List listbm = HibernateUtil.findbmid(Integer.parseInt(strid)); //ҷҲŶ + if(!listbm.isEmpty()&&listbm.size()>0){ + for(int i=0; i + +<% + response.sendRedirect("bm_index.jsp?currPage="+currPage); //ض²żƻҳ +%> + \ No newline at end of file diff --git a/08/WebRoot/Planmanage/bm_index.jsp b/08/WebRoot/Planmanage/bm_index.jsp new file mode 100644 index 0000000..6b1078c --- /dev/null +++ b/08/WebRoot/Planmanage/bm_index.jsp @@ -0,0 +1,167 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + żƻҳ + + + + + + + + + + + + +
    + + + +
    + + + + + +
    + + + + + + +

          

     żƻ
     
    + + + + + + + + + +
    + + + +
    + + + + + + <%} %> + +
      
      + <% + String strpurview = (String)application.getAttribute("Purview"); + if(strpurview.equalsIgnoreCase("ֻ")){ + %> + Ӳżƻ + <%}else{ %> + Ӳżƻ
    + <% + String currPage = request.getParameter("currPage"); + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 5 ; + allRecCount = HibernateUtil.findBmCount(); //ѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + + } + List bmlist =HibernateUtil.findbm((iCurrPage - 1) * recPerPage, recPerPage);; + if(bmlist.isEmpty()){ + out.println("Ϣ"); + }%> + + + + + + + + + <% + if(!bmlist.isEmpty()&& bmlist.size()>0){ + for(int i=0;i < bmlist.size();i++){ + Bm bm = (Bm)bmlist.get(i); + %> + + + + + + + + <%}%> + <%if(purview.equalsIgnoreCase("ϵͳ")){ %> + + + <% + }} + } + %> +
    ƻ
    ƻ
    ɾ
    <%=bm.getName1()%> 
    + <%if(bm.getTitle().length()>6){%> + <%=bm.getTitle().substring(0,6)+"...."%> + <%}else{%> + <%=bm.getTitle()%> + <%}%> +   +
    + <%if(bm.getContent().length()>10){%> + <%=bm.getContent().substring(0,10)+"...."%> + <%} + else{%> + <%=bm.getContent()%>  + <%}%> +
    <%=bm.getTime1()%> 
    + <% String purview = (String)application.getAttribute("Purview"); + if(purview.equalsIgnoreCase("ֻ")){ + %> + +
    + + + + +
    + <% + if(recPerPage < allRecCount){ + String href = "  һҳ"); + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + + if(iCurrPage < pages){ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); //һҳ + } + %> + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%} %> +
    + + + + + diff --git a/08/WebRoot/Planmanage/bm_xianshi.jsp b/08/WebRoot/Planmanage/bm_xianshi.jsp new file mode 100644 index 0000000..87c8976 --- /dev/null +++ b/08/WebRoot/Planmanage/bm_xianshi.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ҵƻҳ + + + + + + + + + + + <% + String strid= request.getParameter("ID"); + List listbm = HibernateUtil.findbmid(Integer.parseInt(strid)); + if(!listbm.isEmpty() && listbm.size()>0){ + for(int i=0;i + + + + + <%} + } %> +
    + + + + + + +
        żƻϸϢ
    + + + + + + + + + + + + + + + +
    +
    ƻ
    +
    + +
    +
       +
    ƻ
    +
    ʱ
    +
    + +
    +
     
    +
    + + + + +
    + + + + + diff --git a/08/WebRoot/Planmanage/bmnodel.jsp b/08/WebRoot/Planmanage/bmnodel.jsp new file mode 100644 index 0000000..3e73648 --- /dev/null +++ b/08/WebRoot/Planmanage/bmnodel.jsp @@ -0,0 +1,8 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + \ No newline at end of file diff --git a/08/WebRoot/Planmanage/calender.jsp b/08/WebRoot/Planmanage/calender.jsp new file mode 100644 index 0000000..8107df1 --- /dev/null +++ b/08/WebRoot/Planmanage/calender.jsp @@ -0,0 +1,238 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + +
    +
    + + + + + + + + + + + + + + + +
    + +
    + + + +
    + + + + + + + + + + <%for (int j=0;j<=5;j++){%> + + <%for(int k=0;k<=6;k++){%> + + <%}%> + + <%}%> +
    һ
    +
    +
    +
    + \ No newline at end of file diff --git a/08/WebRoot/Planmanage/noaddbumen.jsp b/08/WebRoot/Planmanage/noaddbumen.jsp new file mode 100644 index 0000000..b0542a2 --- /dev/null +++ b/08/WebRoot/Planmanage/noaddbumen.jsp @@ -0,0 +1,9 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + \ No newline at end of file diff --git a/08/WebRoot/Planmanage/noaddqiye.jsp b/08/WebRoot/Planmanage/noaddqiye.jsp new file mode 100644 index 0000000..34f9437 --- /dev/null +++ b/08/WebRoot/Planmanage/noaddqiye.jsp @@ -0,0 +1,9 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + \ No newline at end of file diff --git a/08/WebRoot/Planmanage/onmodify.jsp b/08/WebRoot/Planmanage/onmodify.jsp new file mode 100644 index 0000000..2d8c0e3 --- /dev/null +++ b/08/WebRoot/Planmanage/onmodify.jsp @@ -0,0 +1,8 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + \ No newline at end of file diff --git a/08/WebRoot/Planmanage/person_add.jsp b/08/WebRoot/Planmanage/person_add.jsp new file mode 100644 index 0000000..706c18c --- /dev/null +++ b/08/WebRoot/Planmanage/person_add.jsp @@ -0,0 +1,126 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ˼ƻҳ + + + + + + + + + + + + + + + + + +
    + + + + + +
     
    ˼ƻ
    +
    + + + + + + + +
      
    + + + + + + + + + + + + + + + +
    ƻ
    + + + + +
    ƻ
    + + + + + +
    + + + + + + +
    +
    + +
    +
    +    + +    + +   + +
    +
    + + + + + diff --git a/08/WebRoot/Planmanage/person_add_cl.jsp b/08/WebRoot/Planmanage/person_add_cl.jsp new file mode 100644 index 0000000..f99db7d --- /dev/null +++ b/08/WebRoot/Planmanage/person_add_cl.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + <% + Person person = new Person(); + person.setName1(request.getParameter("name1")); + person.setTitle(request.getParameter("title")); + person.setContent(request.getParameter("content")); + person.setTime1(Date.valueOf(request.getParameter("time1"))); + HibernateUtil.saveperson(person); +%> + + \ No newline at end of file diff --git a/08/WebRoot/Planmanage/person_del.jsp b/08/WebRoot/Planmanage/person_del.jsp new file mode 100644 index 0000000..913c1fd --- /dev/null +++ b/08/WebRoot/Planmanage/person_del.jsp @@ -0,0 +1,35 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ҵƻҳ +<% + int link=Integer.parseInt(request.getParameter("link")); + int currPage=Integer.parseInt(request.getParameter("currPage")); + + if(link==1){ + if(currPage!=1){ + currPage=currPage-1; + + }} + String strid = request.getParameter("id"); + List listperson = HibernateUtil.findPerson(Integer.parseInt(strid)); + if(!listperson.isEmpty()&&listperson.size()>0){ + for(int i=0; i + +<% + response.sendRedirect("person_index.jsp?currPage="+currPage); +%> + \ No newline at end of file diff --git a/08/WebRoot/Planmanage/person_index.jsp b/08/WebRoot/Planmanage/person_index.jsp new file mode 100644 index 0000000..21336d8 --- /dev/null +++ b/08/WebRoot/Planmanage/person_index.jsp @@ -0,0 +1,152 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + żƻҳ + + + + + + + + + + + + +
    + + + +
    + + + + + +
    + + + + + + + +

          

     ˼ƻ
     
    + + + + + + +
    + + + +
    + + + + + +
      
     Ӹ˼ƻ +
    + <% + String currPage = request.getParameter("currPage"); + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 5 ; + allRecCount = HibernateUtil.findPersonCount(); //ѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + } + List listPerson =HibernateUtil.findperson((iCurrPage - 1) * recPerPage, recPerPage); + if(listPerson.isEmpty()){ + out.println("Ϣ");} + + %> + + + + + + + + + <% + if(!listPerson.isEmpty()&&listPerson.size()>0){ + for(int i=0;i + + + + + + + <%} %> + <%if(purview.equalsIgnoreCase("ϵͳ")){ %> + + + <%}}}%> +
    ƻ
    ƻ
    ɾ
    <%=person.getName1()%> 
    + <%if(person.getTitle().length()>6){%> + <%=person.getTitle().substring(0,6)+"...."%> + <%}else{%> + <%=person.getTitle()%> + <%}%> +   +
    + <%if(person.getContent().length()>8){%> + <%=person.getContent().substring(0,8)+"...."%> + <%}else{%> + <%=person.getContent()%>  + <%}%> +
    <%=person.getTime1()%> 
    + <% String purview = (String)application.getAttribute("Purview"); + if(!purview.equalsIgnoreCase("ϵͳ")){ + %> + +
    + + + + +
    + + <% + + if(recPerPage < allRecCount){ + String href = "  һҳ"); + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ //һҳ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); + } %> + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%}%> +
    +
    + + + + + diff --git a/08/WebRoot/Planmanage/person_xianshi.jsp b/08/WebRoot/Planmanage/person_xianshi.jsp new file mode 100644 index 0000000..48c64b6 --- /dev/null +++ b/08/WebRoot/Planmanage/person_xianshi.jsp @@ -0,0 +1,93 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ҵƻҳ + + + + + + + + + + <% + String strid= request.getParameter("ID"); + List listperson = HibernateUtil.findPerson(Integer.parseInt(strid)); + if(!listperson.isEmpty() && listperson.size()>0){ + for(int i=0;i + + + + +
    + + + + + + +
        ˼ƻϸϢ
    + + + + + + + + + + + + + + + +
    +
    ƻ
    +
    + +
    +
       +
    ƻ
    +
    ʱ
    +
    + +
    +
     
    +
    + + + + +
    +<%}} %> + + + + + diff --git a/08/WebRoot/Planmanage/personodel.jsp b/08/WebRoot/Planmanage/personodel.jsp new file mode 100644 index 0000000..f976838 --- /dev/null +++ b/08/WebRoot/Planmanage/personodel.jsp @@ -0,0 +1,8 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + \ No newline at end of file diff --git a/08/WebRoot/Planmanage/qiye_del.jsp b/08/WebRoot/Planmanage/qiye_del.jsp new file mode 100644 index 0000000..d9837b7 --- /dev/null +++ b/08/WebRoot/Planmanage/qiye_del.jsp @@ -0,0 +1,38 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ҵƻҳ +<% + int link=Integer.parseInt(request.getParameter("link")); + int currPage=Integer.parseInt(request.getParameter("currPage")); + + if(link==1){ + if(currPage!=1){ + currPage=currPage-1; + + }} + String strid = request.getParameter("Id"); + System.out.print(strid); + List listqiye = HibernateUtil.findqiye(Integer.parseInt(strid)); + if(!listqiye.isEmpty()&&listqiye.size()>0){ + for(int i=0; i + +<% + response.sendRedirect("qiye_planindex.jsp?currPage="+currPage); +%> + \ No newline at end of file diff --git a/08/WebRoot/Planmanage/qiye_plan.jsp b/08/WebRoot/Planmanage/qiye_plan.jsp new file mode 100644 index 0000000..db35a5d --- /dev/null +++ b/08/WebRoot/Planmanage/qiye_plan.jsp @@ -0,0 +1,176 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> + + + + ҵƻ + + + + + + + + + + + + + + + + +
    + + + + + +
      + + +    
    ҵƻ
    +
    +
    + + + + + + + +
    +    +
    + + + + + + + + + + + + + + + + +
    +
    + ҵ +
    +
    + + +
    + ƻ +
    +
    + +
    + + + + + +
    +
    + ƻ +
    +
    + +
    +
    + + + + + + +
    +
    + +
    +
    + + + +
    +
    + + + + + + + +
    +
    + +
    +
    +    + +    + +   + +
    +
    +
    +
    +
    + + + + + diff --git a/08/WebRoot/Planmanage/qiye_planadd.jsp b/08/WebRoot/Planmanage/qiye_planadd.jsp new file mode 100644 index 0000000..8630dfd --- /dev/null +++ b/08/WebRoot/Planmanage/qiye_planadd.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@page import="com.hiernate.persistence.*,com.hiernate.util.*" %> + + + +<% + + Qiye qiye = new Qiye(); + qiye.setName1(request.getParameter("name1")); + qiye.setRiqi(Date.valueOf(request.getParameter("riqi"))); + qiye.setContent(request.getParameter("content")); + qiye.setTitle(request.getParameter("title")); + HibernateUtil.saveqiye(qiye); + +%> + + + + + + + diff --git a/08/WebRoot/Planmanage/qiye_planindex.jsp b/08/WebRoot/Planmanage/qiye_planindex.jsp new file mode 100644 index 0000000..13827d4 --- /dev/null +++ b/08/WebRoot/Planmanage/qiye_planindex.jsp @@ -0,0 +1,167 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + żƻҳ + + + + + + + + + + + + +
    + + + + + + + + + + +
    + + + + + +
    + + + + + + +

          

     ҵƻ
     
    + + + + + + + + + +
    + + + +
    + + + + + + <%} %> + +
      
      + <% + String strpurview = (String)application.getAttribute("Purview"); + if(strpurview.equalsIgnoreCase("ֻ")){ + %> + ҵƻ + <%}else{ %> + ҵƻ
    + <% + String currPage = request.getParameter("currPage"); + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 5 ; + allRecCount = HibernateUtil.findQiyeCount(); //ѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + } + List listQiye =HibernateUtil.findqiye((iCurrPage - 1) * recPerPage, recPerPage);; + if(listQiye.isEmpty()){ + out.println("Ϣ"); + } + %> + + + + + + + + + + + <% + if(!listQiye.isEmpty()&& listQiye.size()>0){ + for(int i=0;i + + + + + + <% String purview = (String)application.getAttribute("Purview"); + if(!purview.equalsIgnoreCase("ϵͳ")){ + %> + + <%} %> + <%if(purview.equalsIgnoreCase("ϵͳ")){ %> + + + <%}} }%> +
    ҵ
    ƻ
    ƻ
    ɾ
    <%=qiye.getName1()%> 
    + <%if(qiye.getTitle().length()>5){ %> + <%=qiye.getTitle().substring(0,5)+"...."%> + <% } + else{ + %> + <%=qiye.getTitle()%> + <%} %> +   +
    + <%if (qiye.getContent().length()>8){%> + <%=qiye.getContent().substring(0,8)+"...."%> + <%} + else{%> + <%=qiye.getContent()%>  + <%}%> +
    <%=qiye.getRiqi()%> 
    + +
    + + + + +
    + <% + if(recPerPage < allRecCount){ + String href = "  һҳ"); + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ //һҳ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); + } + %> + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%} %> +
    + + + + + diff --git a/08/WebRoot/Planmanage/qiye_xianshi.jsp b/08/WebRoot/Planmanage/qiye_xianshi.jsp new file mode 100644 index 0000000..9c1c662 --- /dev/null +++ b/08/WebRoot/Planmanage/qiye_xianshi.jsp @@ -0,0 +1,93 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ҵƻҳ + + + + + + + + + + <% + String strid= request.getParameter("ID"); + List listqiye = HibernateUtil.findqiye(Integer.parseInt(strid)); + if(!listqiye.isEmpty() && listqiye.size()>0){ + for(int i=0;i + + + + +
    + + + + + + +
        ҵƻϸϢ
    + + + + + + + + + + + + + + + +
    ҵ
    +
    ƻ
    +
    + +
    +
       +
    ƻ
    +
    ʱ
    +
    + +
    +
     
    + <%}} %> +
    + + + + +
    + + + + + diff --git a/08/WebRoot/Shenhe/chenggong.htm b/08/WebRoot/Shenhe/chenggong.htm new file mode 100644 index 0000000..0baec15 --- /dev/null +++ b/08/WebRoot/Shenhe/chenggong.htm @@ -0,0 +1,52 @@ + + + + +ɹҳ + + + + + + +
    + + + + + + +
    +

     

    + + + + + +
    + + + +
    + ɹ + ! +
    +

    طҳ

    +

     

    +
    +
    + + diff --git a/08/WebRoot/Shenhe/del.jsp b/08/WebRoot/Shenhe/del.jsp new file mode 100644 index 0000000..7ef871a --- /dev/null +++ b/08/WebRoot/Shenhe/del.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@page import="com.hiernate.persistence.*"%> + + + + +<% + int link=Integer.parseInt(request.getParameter("link")); + int currPage=Integer.parseInt(request.getParameter("currPage")); + + if(link==1){ + if(currPage!=1){ + currPage=currPage-1; + + }} + + String strid = request.getParameter("id"); + List listShenhe =(List)HibernateUtil.findShenheId(Integer.parseInt(strid)); + if(!listShenhe.isEmpty() && listShenhe.size()>0){ + for(int i=0;i + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + + + + + + + + + + + + +
    + + + + + +
    +
    +
    + +
    ݣ
    +
    + + +
    +
    +
    + + + + + diff --git a/08/WebRoot/Shenhe/fa_add.jsp b/08/WebRoot/Shenhe/fa_add.jsp new file mode 100644 index 0000000..901c447 --- /dev/null +++ b/08/WebRoot/Shenhe/fa_add.jsp @@ -0,0 +1,16 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@page import="com.hiernate.persistence.*"%> + + + + + <% + Shenhe shehe = new Shenhe(); + shehe.setTitle(request.getParameter("title")); + shehe.setContent(request.getParameter("content")); + shehe.setTime1((java.sql.Date)GetTime.getDate()); + shehe.setShen("0"); + HibernateUtil.saveshenhe(shehe); + response.sendRedirect("chenggong.htm"); + %> + \ No newline at end of file diff --git a/08/WebRoot/Shenhe/piguan.jsp b/08/WebRoot/Shenhe/piguan.jsp new file mode 100644 index 0000000..11f7422 --- /dev/null +++ b/08/WebRoot/Shenhe/piguan.jsp @@ -0,0 +1,152 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> +<%@page import="com.hiernate.persistence.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + piguan.jsp + + + + + + + + <% + String purview = (String)application.getAttribute("Purview"); + if(!purview.equalsIgnoreCase("ϵͳ")){ + %> + + <%} %> + <%if(purview.equalsIgnoreCase("ϵͳ")){ %> + + + + + + + +
    + + + + + + + + + +
    +
    +
    + + + + + + + + +
    +
    + +
    + +
    + + + + + +

          

     ʾ
     
    + + + + + +   +
    +
    + + + + + + + + + +
    +
    + +
    + +
    + + + + + +
    + + + + + + + + +
     
    + <% + String currPage = request.getParameter("currPage"); + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 5 ; + allRecCount = HibernateUtil.findShenheCount(); //ѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + + } + List listSh =HibernateUtil.findshenhe((iCurrPage - 1) * recPerPage, recPerPage);; + if(listSh.isEmpty()){ + out.println("Ϣ"); + } + %> + + + + + + + + <% + if(!listSh.isEmpty() && listSh.size()>0){ + for(int j=0;j + + + + + + + + + <%}}%> + +
         + <%=shehe.getTitle()%> +
    + <%if(shehe.getContent().length()>8){%> + <%=shehe.getContent().substring(0,8)+"...."%> + <%}else{%> + <%=shehe.getContent()%>  + <%}%> +
    <%=shehe.getTime1()%>
    + <%if(shehe.getShen().equalsIgnoreCase("1")){%> + + <% } %> + <%if(shehe.getShen().equalsIgnoreCase("0")){%> + + <%}%> +
    + <%if (shehe.getShen().equalsIgnoreCase("1")){ %> + ޸ + <%}%> + <%if(shehe.getShen().equalsIgnoreCase("0")){%> + + ޸ + <%}%> +
    + ɾ
    + + + + +
    + <% + if(recPerPage < allRecCount){ + String href = "  һҳ"); + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); // һҳ + } + %> +
    + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%}}%> +
    + + + + + diff --git a/08/WebRoot/Shenhe/piguanCenter.jsp b/08/WebRoot/Shenhe/piguanCenter.jsp new file mode 100644 index 0000000..4e210eb --- /dev/null +++ b/08/WebRoot/Shenhe/piguanCenter.jsp @@ -0,0 +1,10 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + +<% + String str = request.getParameter("IDd"); + session.setAttribute("stid",str); + response.sendRedirect("update.jsp"); +%> + + diff --git a/08/WebRoot/Shenhe/up.jsp b/08/WebRoot/Shenhe/up.jsp new file mode 100644 index 0000000..0f8086c --- /dev/null +++ b/08/WebRoot/Shenhe/up.jsp @@ -0,0 +1,19 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@page import="com.hiernate.persistence.*"%> + + + + + +<% + String strid = request.getParameter("Idd"); + List listShenhe =(List)HibernateUtil.findShenheId(Integer.parseInt(strid)); + if(!listShenhe.isEmpty() && listShenhe.size()>0){ + for(int i=0;i + \ No newline at end of file diff --git a/08/WebRoot/Shenhe/update.jsp b/08/WebRoot/Shenhe/update.jsp new file mode 100644 index 0000000..0a7bdc6 --- /dev/null +++ b/08/WebRoot/Shenhe/update.jsp @@ -0,0 +1,110 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> +<%@page import="com.hiernate.persistence.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + ޸ + + + + + + + + + + + + +
    +<% + String strID = (String)session.getAttribute("stid"); + List listSid = (List)HibernateUtil.findShenheId(Integer.parseInt(strID)); + if(!listSid.isEmpty() && listSid.size()>0){ + for(int i=0;i + + + + + +
    + + + + + + +
        ޸
    + + + + + + + + + + + + + +
    +
    + +
    +
       +

    +
       
    + +     + + +
    + + +

     

    +<%}} %> + + + + + + diff --git a/08/WebRoot/Shenhe/updateShen.jsp b/08/WebRoot/Shenhe/updateShen.jsp new file mode 100644 index 0000000..65101e4 --- /dev/null +++ b/08/WebRoot/Shenhe/updateShen.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@page import="com.hiernate.persistence.*"%> + + + + + + +<% + Shenhe shenhe = (Shenhe)session.getAttribute("Shenhe"); + shenhe.setTitle(request.getParameter("title")); + shenhe.setContent(request.getParameter("content")); + shenhe.setTime1((java.sql.Date)GetTime.getDate()); + Integer curr = (Integer)session.getAttribute("CU"); + HibernateUtil.updateshenhe(shenhe); + %> + + \ No newline at end of file diff --git a/08/WebRoot/Shenhe/xianshi.jsp b/08/WebRoot/Shenhe/xianshi.jsp new file mode 100644 index 0000000..b5c33e3 --- /dev/null +++ b/08/WebRoot/Shenhe/xianshi.jsp @@ -0,0 +1,89 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> +<%@page import="com.hiernate.persistence.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + ϸϢҳ + + + + + + <% + String strid = request.getParameter("ID"); + List listSid = HibernateUtil.findShenheId(Integer.parseInt(strid)); + if(!listSid.isEmpty() && listSid.size()>0){ + for(int i=0;i + + + + +
    + + + + + + +
        ϸϢ
    + + + + + + + + + + + + + +
    +
    + +
    +
       +

    +
    +
    + +
    +
     
    +
    + + + + +
    +<%}} %> + + + + + diff --git a/08/WebRoot/TongXunManage/calender.jsp b/08/WebRoot/TongXunManage/calender.jsp new file mode 100644 index 0000000..8107df1 --- /dev/null +++ b/08/WebRoot/TongXunManage/calender.jsp @@ -0,0 +1,238 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + +
    +
    + + + + + + + + + + + + + + + +
    + +
    + + + +
    + + + + + + + + + + <%for (int j=0;j<=5;j++){%> + + <%for(int k=0;k<=6;k++){%> + + <%}%> + + <%}%> +
    һ
    +
    +
    +
    + \ No newline at end of file diff --git a/08/WebRoot/TongXunManage/del.jsp b/08/WebRoot/TongXunManage/del.jsp new file mode 100644 index 0000000..d132076 --- /dev/null +++ b/08/WebRoot/TongXunManage/del.jsp @@ -0,0 +1,21 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + + + +<% + String strid = request.getParameter("IDS"); + System.out.print(strid); + List listTx = HibernateUtil.findTonId(Integer.parseInt(strid)); + if(!listTx.isEmpty() && listTx.size()>0){ + for(int i =0;i + <% + response.sendRedirect("tongxun_xianshi.jsp"); + %> + \ No newline at end of file diff --git a/08/WebRoot/TongXunManage/lianxianshi.jsp b/08/WebRoot/TongXunManage/lianxianshi.jsp new file mode 100644 index 0000000..3fb1997 --- /dev/null +++ b/08/WebRoot/TongXunManage/lianxianshi.jsp @@ -0,0 +1,146 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ʾְϢ + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%}} %> + + + +
    ͨѶϸϢ
    ͨѶ
    + <% + String strId = request.getParameter("IDd"); + System.out.print(strId); + List listTx = HibernateUtil.findTonId(Integer.parseInt(strId)); + if(!listTx.isEmpty() && listTx.size()>0){ + for(int i=0;i + <%=txa.getDepartment()%>
        
    <%=txa.getName11()%>
    ڣ
    <%=txa.getBirthday()%> 
        
    <%=txa.getSex()%> 
    ״
    <%=txa.getHy()%> 
    ţ
    <%=txa.getDepartment()%> 
    ְ    
    <%=txa.getZw()%> 
    ʡݣ
    <%=txa.getCf()%> 
    ڳУ
    <%=txa.getCs()%> 
    칫绰
    <%=txa.getPhone()%> 
    ƶ绰
    <%=txa.getPhone1()%>
    ַͥ
    <%=txa.getAddress()%>
    OICQ
    <%=txa.getOICQ()%>
    ͥ绰
    <%=txa.getFamily()%> 
    <%=txa.getPostcode()%> 
    email:
    <%=txa.getEmail()%>
        ע
    +
    +
    + + + + + diff --git a/08/WebRoot/TongXunManage/tongxun_add.jsp b/08/WebRoot/TongXunManage/tongxun_add.jsp new file mode 100644 index 0000000..dcc1214 --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_add.jsp @@ -0,0 +1,78 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ʾͨѶ + + + + + + + + + + +
    + + + + +
    + + + + + + +
          

       ͨѶ
    + + + + + + + +
    ͨѶ
    + + + + + +
              + + + +
    +
    + + + + + diff --git a/08/WebRoot/TongXunManage/tongxun_addWork.jsp b/08/WebRoot/TongXunManage/tongxun_addWork.jsp new file mode 100644 index 0000000..49f6182 --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_addWork.jsp @@ -0,0 +1,16 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + <% + String strName = request.getParameter("name1"); + Tongxun tongxun = new Tongxun(); + tongxun.setName1(strName); + HibernateUtil.saveTx(tongxun); + %> + + + \ No newline at end of file diff --git a/08/WebRoot/TongXunManage/tongxun_del.jsp b/08/WebRoot/TongXunManage/tongxun_del.jsp new file mode 100644 index 0000000..6c30c17 --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_del.jsp @@ -0,0 +1,40 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + + + + <% + + + + int link=Integer.parseInt(request.getParameter("link")); + int currPage=Integer.parseInt(request.getParameter("currPage")); + + if(link==1){ + if(currPage!=1){ + currPage=currPage-1; + + }} + + + String strid = request.getParameter("id"); + System.out.print(strid); + List list = HibernateUtil.findT(Integer.parseInt(strid)); + if(list != null){ + for(int i=0;i + +<% + +response.sendRedirect("tongxun_index.jsp?currPage="+currPage); + +%> + \ No newline at end of file diff --git a/08/WebRoot/TongXunManage/tongxun_index.jsp b/08/WebRoot/TongXunManage/tongxun_index.jsp new file mode 100644 index 0000000..627e1b3 --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_index.jsp @@ -0,0 +1,177 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> + + + ʾͨѶ + + + + + + + + + + +   +
    +
    + + + + + + + +
    + + + + + +
    + + + + + + + + + + + +
    + + + + + + +
           ʾͨѶ 
    +
        + + + + + + + + <%}%> + <%if(strpurview.equalsIgnoreCase("ϵͳ")){ %> + ͨѶ + <%}%> + +
        + + <% String strpurview = (String)application.getAttribute("Purview"); + if(strpurview.equalsIgnoreCase("ֻ")){ //ûȨΪֻתtongxun_nomodify.jspʾûȨ޸ĺɾ + %> + ͨѶ
    +
         + + + <% + String currPage = request.getParameter("currPage"); + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 6; + allRecCount = HibernateUtil.findTCount(); //ѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + + } + %> + + + + + <% + List list = HibernateUtil.findT((iCurrPage - 1) * recPerPage, recPerPage); //÷ҳѯ + if(!list.isEmpty()&&list.size()>0){ + for(int j=0;j + + + + + <%}}else{ //Ϊҳʾ + %> +  <%=0%> + <%} %> + + + <%} %> + <%if(purview.equalsIgnoreCase("ϵͳ")){ %> + + ޸ + + + + + <%}}%> +
    ͨѶ
    ͨѶ
    ͨѶ
    +
    + <% + List listTx = HibernateUtil.findTongxun(tx.getId()); //ѯͨѶ. + if(!listTx.isEmpty() && listTx.size()>0){ //ϲΪս² + for(int k=0;k +  <%=intename1%> + +
    + <% + String purview = (String)application.getAttribute("Purview"); + if(purview.equalsIgnoreCase("ֻ")){ //ûȨΪֻתtongxun_nomodify.jspʾûȨ޸ĺɾ + %> + +
    + +
    + ɾ
    + + + + + +
    + <% + if(recPerPage < allRecCount){ + String href = "  һҳ"); + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); // һҳ + } + %> + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%}} %> +
    +
    +
    + + + + + diff --git a/08/WebRoot/TongXunManage/tongxun_modify.jsp b/08/WebRoot/TongXunManage/tongxun_modify.jsp new file mode 100644 index 0000000..0856739 --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_modify.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ޸ͨѶ + + + + + + + + + + +
    + + + + + + +   + +
    + + + + + + +
           
      ޸ͨѶ
    + + + + <% + String stridd = (String) request.getParameter("Idd"); + List listtongxun = HibernateUtil.findT(Integer.parseInt(stridd)); + if(!listtongxun.isEmpty()&& listtongxun.size()>0){ + for(int i=0;i + + <%}}%> + + + + +
    ͨѶ
    + + + +
        + + + +
    + + + + + diff --git a/08/WebRoot/TongXunManage/tongxun_modifySave.jsp b/08/WebRoot/TongXunManage/tongxun_modifySave.jsp new file mode 100644 index 0000000..c21bb18 --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_modifySave.jsp @@ -0,0 +1,24 @@ +<%@ page language="java" pageEncoding="gb2312"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + +<% + Tongxun tx = (Tongxun)session.getAttribute("Tongxun"); + tx.setName1(request.getParameter("name1")); + HibernateUtil.updateTx(tx); +%> + + + + + + diff --git a/08/WebRoot/TongXunManage/tongxun_modifyurl.jsp b/08/WebRoot/TongXunManage/tongxun_modifyurl.jsp new file mode 100644 index 0000000..0bb2527 --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_modifyurl.jsp @@ -0,0 +1,13 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + +<% + String strid = request.getParameter("Idd"); + session.setAttribute("IDD",strid); + response.sendRedirect("tongxun_modifySave.jsp?cP="+request.getParameter("cP")); + %> + + + + + diff --git a/08/WebRoot/TongXunManage/tongxun_noadd.jsp b/08/WebRoot/TongXunManage/tongxun_noadd.jsp new file mode 100644 index 0000000..19071ef --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_noadd.jsp @@ -0,0 +1,9 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + \ No newline at end of file diff --git a/08/WebRoot/TongXunManage/tongxun_nomodify.jsp b/08/WebRoot/TongXunManage/tongxun_nomodify.jsp new file mode 100644 index 0000000..1d22858 --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_nomodify.jsp @@ -0,0 +1,9 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + \ No newline at end of file diff --git a/08/WebRoot/TongXunManage/tongxun_nomodifys.jsp b/08/WebRoot/TongXunManage/tongxun_nomodifys.jsp new file mode 100644 index 0000000..140d6d8 --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_nomodifys.jsp @@ -0,0 +1,9 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + \ No newline at end of file diff --git a/08/WebRoot/TongXunManage/tongxun_xianshi.jsp b/08/WebRoot/TongXunManage/tongxun_xianshi.jsp new file mode 100644 index 0000000..4986a66 --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_xianshi.jsp @@ -0,0 +1,102 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ʾְϢ + + + + + + + + + <% + String strid =(String)session.getAttribute("idd"); + List listTong = HibernateUtil.findTX(Integer.parseInt(strid)); + if(!listTong.isEmpty() && listTong.size()>0){ + %> + + + +
    ͨѶϢ
    +
    + + + + + + + + <% + for(int i=0;i + + + + + + + + <%}%> + <%if(purview.equalsIgnoreCase("ϵͳ")){ %> + ޸ + + +
    +
    QQ
    +
    E-mail
    +
    <%=txa.getPhone1()%>
    <%=txa.getOICQ()%>
    + <% + String purview = (String)application.getAttribute("Purview"); + if(!purview.equalsIgnoreCase("ϵͳ")){ + %> + ޸ +
    +
    ɾ + <%}}}else {%> +
    + Ϣ +
    + <%}%> + + + + + + diff --git a/08/WebRoot/TongXunManage/tongxun_xianxi.jsp b/08/WebRoot/TongXunManage/tongxun_xianxi.jsp new file mode 100644 index 0000000..4c3fa7f --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_xianxi.jsp @@ -0,0 +1,196 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + ϸϢҳ + + + + + + + + + + + <% + String strpurview = (String)application.getAttribute("Purview"); + if(strpurview.equalsIgnoreCase("ֻ")){ //ûȨΪֻתtongxun_nomodify.jspʾûȨ޸ĺɾ + %> + + <%}else{ %> + + + + + + +
    ͨѶϢ
    + + + + + + + + +
    ѡͨѶ 
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + +
    ա
    ԡ
    ״
    ְ
    ʡ
    ڳ
    칫绰
    ƶ绰
    OICQ
    ͥ绰
    ͥסַ
    ע
    + + + +
    + +
    + + + <%}%> +
    + + + + + diff --git a/08/WebRoot/TongXunManage/tongxun_xianxiadd.jsp b/08/WebRoot/TongXunManage/tongxun_xianxiadd.jsp new file mode 100644 index 0000000..ca5b84b --- /dev/null +++ b/08/WebRoot/TongXunManage/tongxun_xianxiadd.jsp @@ -0,0 +1,79 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ϸϢҳ + <% + List listTongxun = HibernateUtil.findTonName(request.getParameter("name11")); + if(listTongxun.isEmpty()){ + TongXunAdd txa = new TongXunAdd(); + if(request.getParameter("address")!=null){ + txa.setAddress(request.getParameter("address")); + } + if(request.getParameter("birthday")!=null){ + txa.setBirthday(Date.valueOf(request.getParameter("birthday"))); + } + if(request.getParameter("sf")!=null){ + txa.setCf(request.getParameter("sf")); + } + if(request.getParameter("cs")!=null){ + txa.setCs(request.getParameter("cs")); + } + if(request.getParameter("department")!=null){ + txa.setDepartment(request.getParameter("department")); + } + if(request.getParameter("email")!=null){ + txa.setEmail(request.getParameter("email")); + } + if(request.getParameter("family")!=null){ + txa.setFamily(request.getParameter("family")); + } + if(request.getParameter("zw")!=null){ + txa.setZw(request.getParameter("zw")); + } + if(request.getParameter("sex")!=null){ + txa.setSex(request.getParameter("sex")); + } + if(request.getParameter("remark")!=null){ + txa.setRemark(request.getParameter("remark")); + } + if(request.getParameter("postcode")!=null){ + txa.setPostcode(request.getParameter("postcode")); + } + if(request.getParameter("phone1")!=null){ + txa.setPhone1(request.getParameter("phone1")); + } + if(request.getParameter("phone")!=null){ + txa.setPhone(request.getParameter("phone")); + } + if(request.getParameter("OICQ")!=null){ + txa.setOICQ(request.getParameter("OICQ")); + } + txa.setName11(request.getParameter("name11")); + txa.setName1(Integer.parseInt(request.getParameter("name1"))); + if(request.getParameter("hy")!=null){ + txa.setHy(request.getParameter("hy")); + } + HibernateUtil.saveTongxun(txa); + %> + + <%}else{%> + +<%} %> + + + + + diff --git a/08/WebRoot/TongXunManage/update.jsp b/08/WebRoot/TongXunManage/update.jsp new file mode 100644 index 0000000..f45ed2b --- /dev/null +++ b/08/WebRoot/TongXunManage/update.jsp @@ -0,0 +1,234 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + + + + ޸ԱϢ + + + + + + + + + + +
    + +<% + String strid = request.getParameter("ID"); //ҳ + List listTong = HibernateUtil.findTonId(Integer.parseInt(strid)); //ѯĶ + if(!listTong.isEmpty() && listTong.size()>0){ + for(int i=0 ;i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ޸ͨѶϸϢ
        
    ڣ
        
    ״
    +
    ţ
    ְ    
    ʡݣ
    ڳУ
    칫绰
    ƶ绰
    ַͥ
    OICQ
    email
    ͥ绰
        ע
    + +    + +    + +
    + <%}} %> +

     

    + + + + + + diff --git a/08/WebRoot/TongXunManage/updateurl.jsp b/08/WebRoot/TongXunManage/updateurl.jsp new file mode 100644 index 0000000..01ae155 --- /dev/null +++ b/08/WebRoot/TongXunManage/updateurl.jsp @@ -0,0 +1,36 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + <% + TongXunAdd txa = (TongXunAdd)session.getAttribute("TXA"); + txa.setAddress(request.getParameter("address")); + txa.setBirthday(Date.valueOf(request.getParameter("birthday"))); + txa.setCf(request.getParameter("sf")); + txa.setCs(request.getParameter("cs")); + txa.setDepartment(request.getParameter("department")); + txa.setEmail(request.getParameter("email")); + txa.setFamily(request.getParameter("family")); + txa.setZw(request.getParameter("zw")); + txa.setSex(request.getParameter("sex")); + txa.setRemark(request.getParameter("remark")); + txa.setPostcode(request.getParameter("postcode")); + txa.setPhone1(request.getParameter("phone1")); + txa.setPhone(request.getParameter("phone")); + txa.setOICQ(request.getParameter("OICQ")); + txa.setName11(request.getParameter("name11")); + txa.setHy(request.getParameter("hy")); + HibernateUtil.updateTongxun(txa); + %> + + + \ No newline at end of file diff --git a/08/WebRoot/TongXunManage/url.jsp b/08/WebRoot/TongXunManage/url.jsp new file mode 100644 index 0000000..a882e0a --- /dev/null +++ b/08/WebRoot/TongXunManage/url.jsp @@ -0,0 +1,10 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + +<% + String strid = request.getParameter("idd"); + session.setAttribute("idd",strid); + System.out.print(strid); + response.sendRedirect("tongxun_xianshi.jsp"); +%> + \ No newline at end of file diff --git a/08/WebRoot/UserManage/personnel_add.jsp b/08/WebRoot/UserManage/personnel_add.jsp new file mode 100644 index 0000000..e8b5efe --- /dev/null +++ b/08/WebRoot/UserManage/personnel_add.jsp @@ -0,0 +1,125 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + Աҳ + + + + + +<% + String purview = (String)application.getAttribute("Purview"); + if(!purview.equalsIgnoreCase("ϵͳ")){ + %> + + <%} %> + <%if(purview.equalsIgnoreCase("ϵͳ")){ %> + + + + + + +
    Ա
    +


    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%} %> + +
    +
    û
    ţ
    Ա
    Ա
    +
    ְ
    +
    Ȩޣ
    E-mail
    ַ
    + + +
    +
    + +
    + + + + + diff --git a/08/WebRoot/UserManage/personnel_add2.jsp b/08/WebRoot/UserManage/personnel_add2.jsp new file mode 100644 index 0000000..b76a057 --- /dev/null +++ b/08/WebRoot/UserManage/personnel_add2.jsp @@ -0,0 +1,29 @@ +<%@ page language="java" pageEncoding="gb2312"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ҵƻҳ +<% + User user = new User(); + user.setBestMan(0); + user.setAddress(request.getParameter("address")); + user.setEmail(request.getParameter("email")); + user.setJob(request.getParameter("job")); + user.setUserName(request.getParameter("username")); + user.setName(request.getParameter("name")); + user.setBranch(request.getParameter("branch")); + user.setPwd(request.getParameter("PWD")); + user.setPurview(request.getParameter("purview")); + user.setTel(request.getParameter("tel")); + user.setSex(request.getParameter("sex")); + HibernateUtil.saveUser(user); + %> + + \ No newline at end of file diff --git a/08/WebRoot/UserManage/personnel_best.jsp b/08/WebRoot/UserManage/personnel_best.jsp new file mode 100644 index 0000000..73f2ce9 --- /dev/null +++ b/08/WebRoot/UserManage/personnel_best.jsp @@ -0,0 +1,92 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> +<%@page import="com.hiernate.persistence.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + Ա + + + + + + + + + + + + + + +
    + + + +
     
    + + + + + + + + + <% + List listU = HibernateUtil.findU(); + int Mycount=1; + if(!listU.isEmpty() && listU.size()>0){ + for(int i =0 ;i + + + + + + + <% + }} + %> +
    û
    Ա
    [ + <%=Mycount++%> ]
    <%=user.getUserName()%>
    <%=user.getName()%>
    + + + + + + + +
    +
    + +
    + + + + + diff --git a/08/WebRoot/UserManage/personnel_del.jsp b/08/WebRoot/UserManage/personnel_del.jsp new file mode 100644 index 0000000..3563688 --- /dev/null +++ b/08/WebRoot/UserManage/personnel_del.jsp @@ -0,0 +1,41 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.List"%> +<%@page import="com.hiernate.persistence.*"%> + + + + + ɾûҳ + + + + + + + + +<% + + int link=Integer.parseInt(request.getParameter("link")); + int currPage=Integer.parseInt(request.getParameter("currPage")); + + if(link==1){ + if(currPage!=1){ + currPage=currPage-1; + + }} + String strid = request.getParameter("ID"); + List listUser =(List)HibernateUtil.findUserId(Integer.parseInt(strid)); + if(!listUser.isEmpty() && listUser.size()>0){ + for(int i=0;i + +<% +response.sendRedirect("personnel_top.jsp?currPage="+currPage); +%> + \ No newline at end of file diff --git a/08/WebRoot/UserManage/personnel_deluser.jsp b/08/WebRoot/UserManage/personnel_deluser.jsp new file mode 100644 index 0000000..f7c5008 --- /dev/null +++ b/08/WebRoot/UserManage/personnel_deluser.jsp @@ -0,0 +1,38 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.List"%> +<%@page import="com.hiernate.persistence.*"%> + + + + + ɾûҳ + + + + + + + + <% + int link=Integer.parseInt(request.getParameter("link")); + int currPage=Integer.parseInt(request.getParameter("currPage")); + + if(link==1){ + if(currPage!=1){ + currPage=currPage-1; + + }} + String strid = request.getParameter("ID"); + List listUser =(List)HibernateUtil.findUserId(Integer.parseInt(strid)); + if(!listUser.isEmpty() && listUser.size()>0){ + for(int i=0;i + + + \ No newline at end of file diff --git a/08/WebRoot/UserManage/personnel_detail.jsp b/08/WebRoot/UserManage/personnel_detail.jsp new file mode 100644 index 0000000..97e456a --- /dev/null +++ b/08/WebRoot/UserManage/personnel_detail.jsp @@ -0,0 +1,101 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> +<%@page import="com.hiernate.persistence.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ԱϸϢ + + + + + + + + + + + + + + + +
    + + + + + + +
           
       ԱϸϢ
     
    +
    + <% + String strid = request.getParameter("ID"); + List listUser = HibernateUtil.findUserId(Integer.parseInt(strid)); + if(!listUser.isEmpty()&&listUser.size()>0){ + for(int i=0;i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    û
    +
    ţ
    Ȩޣ
     <%=user.getPurview()%>Ա<%=user.getSex()%>
    ְ
    Email
    ַ
    +
    + +
    + <%}} %> +
    + + + + + diff --git a/08/WebRoot/UserManage/personnel_info.jsp b/08/WebRoot/UserManage/personnel_info.jsp new file mode 100644 index 0000000..d449720 --- /dev/null +++ b/08/WebRoot/UserManage/personnel_info.jsp @@ -0,0 +1,170 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> +<%@page import="com.hiernate.persistence.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +

          

     
     
    + <% + String currPage = request.getParameter("currPage"); + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 5 ; + String branch = (String)session.getAttribute("Branch"); + session.setAttribute("branch",branch); + allRecCount = HibernateUtil.findUserCount(branch); //ѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; //ܵҳ + if(pages == 0){ //ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + } + List listUser =HibernateUtil.findUser(branch,(iCurrPage - 1) * recPerPage, recPerPage);; + if(listUser.isEmpty()){ + %> + + + + +
    ԱϢ
    + <%}if(!listUser.isEmpty()&&listUser.size()>0){%> + +







    + + +
    + + + + + + + + + + + <% + for(int i=0;i + + + + + + + + + + <%} %> + <%if(purview.equalsIgnoreCase("ϵͳ")){ %> + + + + <%}}}%> +
    û
    Ȩ
    ְ
    ϸ
    ޸
    ɾ
     <%=user.getName()%>
     <%=user.getName()%>
     <%=user.getPurview()%>
     <%=user.getBranch()%>
     <%=user.getJob()%>
    + <% + String purview = (String)application.getAttribute("Purview"); + if(purview.equalsIgnoreCase("ֻ")){ + %> + +
    + +
    + +
    + + + + +
    + + <% + if(recPerPage < allRecCount){ + String href = "  һҳ"); + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ //һҳ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); + } + %> + <%=sbf.toString()%> + <%} %> +
    +
    + + + + + diff --git a/08/WebRoot/UserManage/personnel_info1.jsp b/08/WebRoot/UserManage/personnel_info1.jsp new file mode 100644 index 0000000..08da2ba --- /dev/null +++ b/08/WebRoot/UserManage/personnel_info1.jsp @@ -0,0 +1,15 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + +<% + String strbranch = request.getParameter("branch"); + session.setAttribute("Branch",strbranch); + response.sendRedirect("personnel_info.jsp"); +%> + + + + + diff --git a/08/WebRoot/UserManage/personnel_modify.jsp b/08/WebRoot/UserManage/personnel_modify.jsp new file mode 100644 index 0000000..3dca9af --- /dev/null +++ b/08/WebRoot/UserManage/personnel_modify.jsp @@ -0,0 +1,184 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> +<%@page import="com.hiernate.persistence.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + ޸ԱϢ + + + + + + + + + + + + + + + +
    + + + +
    + + + + + + +
        
      ޸ԱϢ
     
    + <% + String strid = request.getParameter("ID"); + session.setAttribute("idd",strid); + List listUser = HibernateUtil.findUserId(Integer.parseInt(strid)); + if(!listUser.isEmpty()&&listUser.size()>0){ + for(int i=0;i +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%}} %> + + + +
     û<%=user.getUserName()%> + +
    + +
    Ȩޣ
    Ա
    + +
    ţ
    ְ
    +
    E-mail
    ַ
    +
    + +    + +
    +
    + + + + + diff --git a/08/WebRoot/UserManage/personnel_modifyPWD.jsp b/08/WebRoot/UserManage/personnel_modifyPWD.jsp new file mode 100644 index 0000000..ad4201a --- /dev/null +++ b/08/WebRoot/UserManage/personnel_modifyPWD.jsp @@ -0,0 +1,154 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> +<%@page import="com.hiernate.persistence.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + ޸ԱϢ + + + + + + + + + + + + + + + + +
    + + + +
    +

    + + + + + +
         ޸ĸϢ
     
    + <% + String strid = request.getParameter("ID"); + session.setAttribute("ids",strid); + List listUser = HibernateUtil.findUserId(Integer.parseInt(strid)); + if(!listUser.isEmpty()&& listUser.size()>0){ + for(int i=0 ;i +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%}} %> + + + +
      û<%=user.getUserName()%>
    ԭ룺 +
    Ա
    +
    ȷ룺
    E-mail
    ַ
    + + + +
    +
    + + + + + + diff --git a/08/WebRoot/UserManage/personnel_nomodify.jsp b/08/WebRoot/UserManage/personnel_nomodify.jsp new file mode 100644 index 0000000..faff90d --- /dev/null +++ b/08/WebRoot/UserManage/personnel_nomodify.jsp @@ -0,0 +1,10 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + + diff --git a/08/WebRoot/UserManage/personnel_nomodifys.jsp b/08/WebRoot/UserManage/personnel_nomodifys.jsp new file mode 100644 index 0000000..e5f3b32 --- /dev/null +++ b/08/WebRoot/UserManage/personnel_nomodifys.jsp @@ -0,0 +1,10 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + + diff --git a/08/WebRoot/UserManage/personnel_top.jsp b/08/WebRoot/UserManage/personnel_top.jsp new file mode 100644 index 0000000..4574a62 --- /dev/null +++ b/08/WebRoot/UserManage/personnel_top.jsp @@ -0,0 +1,227 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.List"%> +<%@page import="com.hiernate.persistence.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + ԱϢѯ + + + + + + + + + + + + + + + + + +

    +

     

    +
    + + + +
    + + + + + +
    + + + + + + +

          

     Աά
     
    + + + + +

    + + + + +
    + + + + + + + + + +
     
    + <% + String currPage = request.getParameter("currPage"); + int iCurrPage = 1 ; + int pages = 1 ; + int allRecCount = 0 ; + int recPerPage = 5 ; + allRecCount = HibernateUtil.findUserCount(); // ѯܵļ¼ + pages = (allRecCount - 1)/recPerPage + 1 ; // ܵҳ + if(pages == 0){ // ҳЧԴ,ʹҳСֵ1 + pages = 1; + } + if(currPage != null && !currPage.equalsIgnoreCase("")){ + iCurrPage = Integer.parseInt(currPage); + } + List listUser = HibernateUtil.findUser((iCurrPage - 1) * recPerPage, recPerPage); + if(!listUser.isEmpty()&& listUser.size()>0){ + for(int j=0;j + <%}}%>޸ĸϢ +
    + + + + +
    + + + + + + + + + +
      Աڲţ +   
    + +
    +
    + + + + +
    + <%if(listUser.isEmpty()){%> + + +
    ԱϢ
    + <%}else{%> + + + + + + + + + + + + <% + if(!listUser.isEmpty()&& listUser.size()>0){ + for(int i=0;i + + + + + + + + + + <%} %> + <%if(purview.equalsIgnoreCase("ϵͳ")){ %> + + + + + + + <%}}}%> +
    û
    Ȩ
    ְ
    ϸ
    ޸
    ɾ
     <%=users.getUserName()%>
     <%=users.getName()%>
     <%=users.getPurview()%>
     <%=users.getBranch()%>
     <%=users.getJob()%>
    + +
    + <% + String purview = (String)application.getAttribute("Purview"); + if(!purview.equalsIgnoreCase("ϵͳ")){ + %> + +
    + +
    + + + + +
    + + + <% + if(recPerPage < allRecCount){ + String href = "  һҳ"); //һҳ + } + for(int i = 1 ; i <= pages ; i ++){ + if(i == iCurrPage){ + sbf.append(href+i+"'>["+i+"]"); //׷Ӵ + } + else{ + sbf.append(href+i+"'>"+i+""); + } + } + if(iCurrPage < pages){ + sbf.append(href+(iCurrPage + 1)+"'>һҳ"); //һҳ + } + %> + <%out.print("ǰҳ:["+iCurrPage+"/"+pages+"]");%> + <%=sbf.toString()%> + <%} }%> +
    +  
    + + + + + + + + diff --git a/08/WebRoot/UserManage/personnel_update.jsp b/08/WebRoot/UserManage/personnel_update.jsp new file mode 100644 index 0000000..aea4708 --- /dev/null +++ b/08/WebRoot/UserManage/personnel_update.jsp @@ -0,0 +1,34 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ޸ûϢҳ +<% + String strid = (String)session.getAttribute("idd"); + List listU = HibernateUtil.findUserId(Integer.parseInt(strid)); + if(!listU.isEmpty()&& listU.size()>0){ + for(int j=0 ;j +<%}}%> + + \ No newline at end of file diff --git a/08/WebRoot/UserManage/personnel_updateCenter.jsp b/08/WebRoot/UserManage/personnel_updateCenter.jsp new file mode 100644 index 0000000..3094fff --- /dev/null +++ b/08/WebRoot/UserManage/personnel_updateCenter.jsp @@ -0,0 +1,35 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ޸ûϢҳ +<% + String strid = (String)session.getAttribute("ids"); + List listU = HibernateUtil.findUserId(Integer.parseInt(strid)); + if(!listU.isEmpty()&& listU.size()>0){ + for(int j=0 ;j + + <% + + } + } +%> + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Bm.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Bm.class new file mode 100644 index 0000000..28fe3a8 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Bm.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Bm.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Bm.hbm.xml new file mode 100644 index 0000000..9659805 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Bm.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Chuchai.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Chuchai.class new file mode 100644 index 0000000..19cb929 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Chuchai.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Chuchai.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Chuchai.hbm.xml new file mode 100644 index 0000000..31d2a3a --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Chuchai.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Meeting.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Meeting.class new file mode 100644 index 0000000..dc3fe7d Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Meeting.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Meeting.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Meeting.hbm.xml new file mode 100644 index 0000000..8cd0d39 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Meeting.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Menu.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Menu.class new file mode 100644 index 0000000..281b67a Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Menu.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Menu.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Menu.hbm.xml new file mode 100644 index 0000000..250fcf6 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Menu.hbm.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Onduty.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Onduty.class new file mode 100644 index 0000000..96591de Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Onduty.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Onduty.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Onduty.hbm.xml new file mode 100644 index 0000000..5a7b0c3 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Onduty.hbm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Person.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Person.class new file mode 100644 index 0000000..663ee92 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Person.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Person.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Person.hbm.xml new file mode 100644 index 0000000..da480f9 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Person.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Placard.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Placard.class new file mode 100644 index 0000000..c6d7d96 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Placard.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Placard.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Placard.hbm.xml new file mode 100644 index 0000000..5198718 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Placard.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qingjia.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qingjia.class new file mode 100644 index 0000000..70b5def Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qingjia.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qingjia.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qingjia.hbm.xml new file mode 100644 index 0000000..a9f2857 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qingjia.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qiye.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qiye.class new file mode 100644 index 0000000..cf991cf Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qiye.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qiye.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qiye.hbm.xml new file mode 100644 index 0000000..e0c5a1a --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Qiye.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Shenhe.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Shenhe.class new file mode 100644 index 0000000..6a04e17 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Shenhe.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Shenhe.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Shenhe.hbm.xml new file mode 100644 index 0000000..6855d08 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Shenhe.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/TongXunAdd.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/TongXunAdd.class new file mode 100644 index 0000000..b8bc976 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/TongXunAdd.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/TongXunAdd.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/TongXunAdd.hbm.xml new file mode 100644 index 0000000..47595cb --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/TongXunAdd.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Tongxun.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Tongxun.class new file mode 100644 index 0000000..096b253 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Tongxun.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Tongxun.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Tongxun.hbm.xml new file mode 100644 index 0000000..3fd6c71 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Tongxun.hbm.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/User.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/User.class new file mode 100644 index 0000000..f42bbe8 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/User.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/User.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/User.hbm.xml new file mode 100644 index 0000000..6195517 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/User.hbm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Waichu.class b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Waichu.class new file mode 100644 index 0000000..fed475d Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Waichu.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Waichu.hbm.xml b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Waichu.hbm.xml new file mode 100644 index 0000000..7db3a6c --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/hiernate/persistence/Waichu.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/util/GetHibernate.class b/08/WebRoot/WEB-INF/classes/com/hiernate/util/GetHibernate.class new file mode 100644 index 0000000..7b24022 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/util/GetHibernate.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/util/GetTime.class b/08/WebRoot/WEB-INF/classes/com/hiernate/util/GetTime.class new file mode 100644 index 0000000..c28aa58 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/util/GetTime.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/util/HibernateUtil.class b/08/WebRoot/WEB-INF/classes/com/hiernate/util/HibernateUtil.class new file mode 100644 index 0000000..6ed6035 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/util/HibernateUtil.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/hiernate/util/Test.class b/08/WebRoot/WEB-INF/classes/com/hiernate/util/Test.class new file mode 100644 index 0000000..5a237ca Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/hiernate/util/Test.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/struts/action/FindMenuAction.class b/08/WebRoot/WEB-INF/classes/com/struts/action/FindMenuAction.class new file mode 100644 index 0000000..2a1c41a Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/struts/action/FindMenuAction.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/struts/action/FindUserAction.class b/08/WebRoot/WEB-INF/classes/com/struts/action/FindUserAction.class new file mode 100644 index 0000000..2ce03e6 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/struts/action/FindUserAction.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/struts/filter/MyFilter.class b/08/WebRoot/WEB-INF/classes/com/struts/filter/MyFilter.class new file mode 100644 index 0000000..c1b078d Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/struts/filter/MyFilter.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/struts/form/UserForm.class b/08/WebRoot/WEB-INF/classes/com/struts/form/UserForm.class new file mode 100644 index 0000000..f499ff6 Binary files /dev/null and b/08/WebRoot/WEB-INF/classes/com/struts/form/UserForm.class differ diff --git a/08/WebRoot/WEB-INF/classes/com/yourcompany/struts/ApplicationResources.properties b/08/WebRoot/WEB-INF/classes/com/yourcompany/struts/ApplicationResources.properties new file mode 100644 index 0000000..954d333 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/com/yourcompany/struts/ApplicationResources.properties @@ -0,0 +1,2 @@ +# Resources for parameter 'com.yourcompany.struts.ApplicationResources' +# Project work \ No newline at end of file diff --git a/08/WebRoot/WEB-INF/classes/hibernate.properties b/08/WebRoot/WEB-INF/classes/hibernate.properties new file mode 100644 index 0000000..30f6576 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/hibernate.properties @@ -0,0 +1,7 @@ +hibernate.dialect=org.hibernate.dialect.SQLServerDialect +hibernate.connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver +hibernate.connection.url=jdbc:sqlserver://localhost:1433;DatabaseName=db_work; +hibernate.connection.username=sa +hibernate.connection.password= +hibernate.show_sql=true +hibernate.hbm2ddl.auto=none diff --git a/08/WebRoot/WEB-INF/classes/log4j.properties b/08/WebRoot/WEB-INF/classes/log4j.properties new file mode 100644 index 0000000..3490c95 --- /dev/null +++ b/08/WebRoot/WEB-INF/classes/log4j.properties @@ -0,0 +1,33 @@ +### direct log messages to stdout ### +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +### direct messages to file hibernate.log ### +#log4j.appender.file=org.apache.log4j.FileAppender +#log4j.appender.file.File=hibernate.log +#log4j.appender.file.layout=org.apache.log4j.PatternLayout +#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +### set log levels - for more verbose logging change 'info' to 'debug' ### + +log4j.rootLogger=warn, stdout + +log4j.logger.net.sf.hibernate=info + +### log just the SQL +#log4j.logger.net.sf.hibernate.SQL=debug + +### log JDBC bind parameters ### +log4j.logger.net.sf.hibernate.type=info + +### log schema export/update ### +log4j.logger.net.sf.hibernate.tool.hbm2ddl=debug + +### log cache activity ### +#log4j.logger.net.sf.hibernate.cache=debug + +### enable the following line if you want to track down connection ### +### leakages when using DriverManagerConnectionProvider ### +#log4j.logger.net.sf.hibernate.connection.DriverManagerConnectionProvider=trace diff --git a/08/WebRoot/WEB-INF/lib/antlr-2.7.5H3.jar b/08/WebRoot/WEB-INF/lib/antlr-2.7.5H3.jar new file mode 100644 index 0000000..d931262 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/antlr-2.7.5H3.jar differ diff --git a/08/WebRoot/WEB-INF/lib/asm-attrs.jar b/08/WebRoot/WEB-INF/lib/asm-attrs.jar new file mode 100644 index 0000000..6f3643d Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/asm-attrs.jar differ diff --git a/08/WebRoot/WEB-INF/lib/asm.jar b/08/WebRoot/WEB-INF/lib/asm.jar new file mode 100644 index 0000000..3daf7b3 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/asm.jar differ diff --git a/08/WebRoot/WEB-INF/lib/c3p0-0.9.0.jar b/08/WebRoot/WEB-INF/lib/c3p0-0.9.0.jar new file mode 100644 index 0000000..ae7597f Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/c3p0-0.9.0.jar differ diff --git a/08/WebRoot/WEB-INF/lib/cglib-2.1.3.jar b/08/WebRoot/WEB-INF/lib/cglib-2.1.3.jar new file mode 100644 index 0000000..a2325b5 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/cglib-2.1.3.jar differ diff --git a/08/WebRoot/WEB-INF/lib/commons-beanutils.jar b/08/WebRoot/WEB-INF/lib/commons-beanutils.jar new file mode 100644 index 0000000..d6b8f94 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/commons-beanutils.jar differ diff --git a/08/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar b/08/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar new file mode 100644 index 0000000..29b81a6 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar differ diff --git a/08/WebRoot/WEB-INF/lib/commons-collections.jar b/08/WebRoot/WEB-INF/lib/commons-collections.jar new file mode 100644 index 0000000..9675566 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/commons-collections.jar differ diff --git a/08/WebRoot/WEB-INF/lib/commons-digester.jar b/08/WebRoot/WEB-INF/lib/commons-digester.jar new file mode 100644 index 0000000..3337d4a Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/commons-digester.jar differ diff --git a/08/WebRoot/WEB-INF/lib/commons-fileupload.jar b/08/WebRoot/WEB-INF/lib/commons-fileupload.jar new file mode 100644 index 0000000..fcd3652 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/commons-fileupload.jar differ diff --git a/08/WebRoot/WEB-INF/lib/commons-lang.jar b/08/WebRoot/WEB-INF/lib/commons-lang.jar new file mode 100644 index 0000000..1cc8baf Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/commons-lang.jar differ diff --git a/08/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar b/08/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar new file mode 100644 index 0000000..c37b922 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar differ diff --git a/08/WebRoot/WEB-INF/lib/commons-logging.jar b/08/WebRoot/WEB-INF/lib/commons-logging.jar new file mode 100644 index 0000000..769c140 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/commons-logging.jar differ diff --git a/08/WebRoot/WEB-INF/lib/commons-validator.jar b/08/WebRoot/WEB-INF/lib/commons-validator.jar new file mode 100644 index 0000000..c8e248f Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/commons-validator.jar differ diff --git a/08/WebRoot/WEB-INF/lib/concurrent-1.3.2.jar b/08/WebRoot/WEB-INF/lib/concurrent-1.3.2.jar new file mode 100644 index 0000000..d1a78e2 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/concurrent-1.3.2.jar differ diff --git a/08/WebRoot/WEB-INF/lib/connector.jar b/08/WebRoot/WEB-INF/lib/connector.jar new file mode 100644 index 0000000..2835f32 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/connector.jar differ diff --git a/08/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar b/08/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..b078f16 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/08/WebRoot/WEB-INF/lib/ehcache-1.1.jar b/08/WebRoot/WEB-INF/lib/ehcache-1.1.jar new file mode 100644 index 0000000..333afa4 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/ehcache-1.1.jar differ diff --git a/08/WebRoot/WEB-INF/lib/hibernate3.jar b/08/WebRoot/WEB-INF/lib/hibernate3.jar new file mode 100644 index 0000000..5b28a23 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/hibernate3.jar differ diff --git a/08/WebRoot/WEB-INF/lib/jaas.jar b/08/WebRoot/WEB-INF/lib/jaas.jar new file mode 100644 index 0000000..91d0b47 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/jaas.jar differ diff --git a/08/WebRoot/WEB-INF/lib/jacc-1_0-fr.jar b/08/WebRoot/WEB-INF/lib/jacc-1_0-fr.jar new file mode 100644 index 0000000..3ca2b95 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/jacc-1_0-fr.jar differ diff --git a/08/WebRoot/WEB-INF/lib/jakarta-oro.jar b/08/WebRoot/WEB-INF/lib/jakarta-oro.jar new file mode 100644 index 0000000..27b7fa9 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/jakarta-oro.jar differ diff --git a/08/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar b/08/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar new file mode 100644 index 0000000..b5a9dbd Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar differ diff --git a/08/WebRoot/WEB-INF/lib/jboss-cache.jar b/08/WebRoot/WEB-INF/lib/jboss-cache.jar new file mode 100644 index 0000000..d10588d Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/jboss-cache.jar differ diff --git a/08/WebRoot/WEB-INF/lib/jboss-common.jar b/08/WebRoot/WEB-INF/lib/jboss-common.jar new file mode 100644 index 0000000..1a67c92 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/jboss-common.jar differ diff --git a/08/WebRoot/WEB-INF/lib/jboss-jmx.jar b/08/WebRoot/WEB-INF/lib/jboss-jmx.jar new file mode 100644 index 0000000..63d395f Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/jboss-jmx.jar differ diff --git a/08/WebRoot/WEB-INF/lib/jboss-system.jar b/08/WebRoot/WEB-INF/lib/jboss-system.jar new file mode 100644 index 0000000..1d907cc Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/jboss-system.jar differ diff --git a/08/WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar b/08/WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar new file mode 100644 index 0000000..d3b979b Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar differ diff --git a/08/WebRoot/WEB-INF/lib/jgroups-2.2.8.jar b/08/WebRoot/WEB-INF/lib/jgroups-2.2.8.jar new file mode 100644 index 0000000..9618646 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/jgroups-2.2.8.jar differ diff --git a/08/WebRoot/WEB-INF/lib/jta.jar b/08/WebRoot/WEB-INF/lib/jta.jar new file mode 100644 index 0000000..15db86b Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/jta.jar differ diff --git a/08/WebRoot/WEB-INF/lib/log4j-1.2.11.jar b/08/WebRoot/WEB-INF/lib/log4j-1.2.11.jar new file mode 100644 index 0000000..7822c83 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/log4j-1.2.11.jar differ diff --git a/08/WebRoot/WEB-INF/lib/oscache-2.1.jar b/08/WebRoot/WEB-INF/lib/oscache-2.1.jar new file mode 100644 index 0000000..43b4d5c Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/oscache-2.1.jar differ diff --git a/08/WebRoot/WEB-INF/lib/proxool-0.8.3.jar b/08/WebRoot/WEB-INF/lib/proxool-0.8.3.jar new file mode 100644 index 0000000..d2da792 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/proxool-0.8.3.jar differ diff --git a/08/WebRoot/WEB-INF/lib/sqljdbc.jar b/08/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/08/WebRoot/WEB-INF/lib/struts-legacy.jar b/08/WebRoot/WEB-INF/lib/struts-legacy.jar new file mode 100644 index 0000000..d5bc3c2 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/struts-legacy.jar differ diff --git a/08/WebRoot/WEB-INF/lib/struts.jar b/08/WebRoot/WEB-INF/lib/struts.jar new file mode 100644 index 0000000..e26b71c Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/struts.jar differ diff --git a/08/WebRoot/WEB-INF/lib/swarmcache-1.0rc2.jar b/08/WebRoot/WEB-INF/lib/swarmcache-1.0rc2.jar new file mode 100644 index 0000000..cacf28d Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/swarmcache-1.0rc2.jar differ diff --git a/08/WebRoot/WEB-INF/lib/xerces-2.6.2.jar b/08/WebRoot/WEB-INF/lib/xerces-2.6.2.jar new file mode 100644 index 0000000..2a18016 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/xerces-2.6.2.jar differ diff --git a/08/WebRoot/WEB-INF/lib/xml-apis.jar b/08/WebRoot/WEB-INF/lib/xml-apis.jar new file mode 100644 index 0000000..2c11ad7 Binary files /dev/null and b/08/WebRoot/WEB-INF/lib/xml-apis.jar differ diff --git a/08/WebRoot/WEB-INF/struts-bean.tld b/08/WebRoot/WEB-INF/struts-bean.tld new file mode 100644 index 0000000..ba159d9 --- /dev/null +++ b/08/WebRoot/WEB-INF/struts-bean.tld @@ -0,0 +1,382 @@ + + + + + + + + + + +1.0 +1.1 +bean +http://jakarta.apache.org/struts/tags-bean + +cookie +org.apache.struts.taglib.bean.CookieTag +org.apache.struts.taglib.bean.CookieTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +define +org.apache.struts.taglib.bean.DefineTag +org.apache.struts.taglib.bean.DefineTei +JSP + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +header +org.apache.struts.taglib.bean.HeaderTag +org.apache.struts.taglib.bean.HeaderTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +include +org.apache.struts.taglib.bean.IncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.struts.taglib.bean.MessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.struts.taglib.bean.PageTag +org.apache.struts.taglib.bean.PageTei +empty + +id +true +false + + +property +true +true + + + +parameter +org.apache.struts.taglib.bean.ParameterTag +org.apache.struts.taglib.bean.ParameterTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +resource +org.apache.struts.taglib.bean.ResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.struts.taglib.bean.SizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.struts.taglib.bean.StrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + +write +org.apache.struts.taglib.bean.WriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +true +true + + +property +false +true + + +scope +false +true + + + + + + diff --git a/08/WebRoot/WEB-INF/struts-config.xml b/08/WebRoot/WEB-INF/struts-config.xml new file mode 100644 index 0000000..35ae426 --- /dev/null +++ b/08/WebRoot/WEB-INF/struts-config.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/08/WebRoot/WEB-INF/struts-html.tld b/08/WebRoot/WEB-INF/struts-html.tld new file mode 100644 index 0000000..e461c73 --- /dev/null +++ b/08/WebRoot/WEB-INF/struts-html.tld @@ -0,0 +1,2972 @@ + + + + + + + + + + +1.0 +1.1 +html +http://jakarta.apache.org/struts/tags-html + +base +org.apache.struts.taglib.html.BaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.struts.taglib.html.ButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.struts.taglib.html.CancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.struts.taglib.html.CheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.html.ErrorsTag +empty + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + + +file +org.apache.struts.taglib.html.FileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.html.FormTag +JSP + +action +true +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +name +false +true + + +onreset +false +true + + +onsubmit +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + +type +false +true + + + +frame +org.apache.struts.taglib.html.FrameTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.struts.taglib.html.HiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.struts.taglib.html.HtmlTag +JSP + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.struts.taglib.html.ImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.html.ImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.struts.taglib.html.JavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + + +link +org.apache.struts.taglib.html.LinkTag + +accesskey +false +true + + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +messages +org.apache.struts.taglib.html.MessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.html.MultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.struts.taglib.html.OptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.struts.taglib.html.OptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.html.OptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.html.PasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.html.RadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.struts.taglib.html.ResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.struts.taglib.html.RewriteTag +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + + +select +org.apache.struts.taglib.html.SelectTag +JSP + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.html.SubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.html.TextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.html.TextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +cols +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + diff --git a/08/WebRoot/WEB-INF/struts-logic.tld b/08/WebRoot/WEB-INF/struts-logic.tld new file mode 100644 index 0000000..dcc9c34 --- /dev/null +++ b/08/WebRoot/WEB-INF/struts-logic.tld @@ -0,0 +1,642 @@ + + + + + + + + + +1.0 +1.1 +logic +http://jakarta.apache.org/struts/tags-logic + +empty +org.apache.struts.taglib.logic.EmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.logic.EqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +forward +org.apache.struts.taglib.logic.ForwardTag +empty + +name +true +true + + + +greaterEqual +org.apache.struts.taglib.logic.GreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.logic.GreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.logic.IterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.logic.LessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.logic.LessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.logic.MatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.logic.MessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.logic.MessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.logic.NotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.logic.NotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.logic.NotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.logic.NotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.logic.PresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.struts.taglib.logic.RedirectTag + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + + + + + diff --git a/08/WebRoot/WEB-INF/struts-nested.tld b/08/WebRoot/WEB-INF/struts-nested.tld new file mode 100644 index 0000000..36ed0b8 --- /dev/null +++ b/08/WebRoot/WEB-INF/struts-nested.tld @@ -0,0 +1,2870 @@ + + + + + + + + + +1.0 +1.1 +nested +http://jakarta.apache.org/struts/tags-nested + +nest +org.apache.struts.taglib.nested.NestedPropertyTag +JSP + +property +false +true + + + +writeNesting +org.apache.struts.taglib.nested.NestedWriteNestingTag +JSP + +property +false +true + + +filter +false +true + + + +root +org.apache.struts.taglib.nested.NestedRootTag +JSP + +name +false +true + + + +define +org.apache.struts.taglib.nested.bean.NestedDefineTag +org.apache.struts.taglib.nested.bean.NestedDefineTei +empty + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +message +org.apache.struts.taglib.nested.bean.NestedMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +size +org.apache.struts.taglib.nested.bean.NestedSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +write +org.apache.struts.taglib.nested.bean.NestedWriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +checkbox +org.apache.struts.taglib.nested.html.NestedCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.nested.html.NestedErrorsTag +empty + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + + +file +org.apache.struts.taglib.nested.html.NestedFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.nested.html.NestedFormTag +JSP + +action +true +true + + +enctype +false +true + + +focus +false +true + + +method +false +true + + +name +false +true + + +onreset +false +true + + +onsubmit +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + +type +false +true + + + +hidden +org.apache.struts.taglib.nested.html.NestedHiddenTag + +alt +false +true + + +altKey +false +true + + +indexed +false +true + + +name +false +true + + +property +true +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +image +org.apache.struts.taglib.nested.html.NestedImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.nested.html.NestedImgTag +empty + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +link +org.apache.struts.taglib.nested.html.NestedLinkTag + +accesskey +false +true + + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +messages +org.apache.struts.taglib.nested.html.NestedMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +true + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.nested.html.NestedMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +options +org.apache.struts.taglib.nested.html.NestedOptionsTag +empty + +collection +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.nested.html.NestedOptionsCollectionTag +empty + +label +false +true + + +name +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.nested.html.NestedPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.nested.html.NestedRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + + +select +org.apache.struts.taglib.nested.html.NestedSelectTag +JSP + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.nested.html.NestedSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.nested.html.NestedTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.nested.html.NestedTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +cols +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +empty +org.apache.struts.taglib.nested.logic.NestedEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.nested.logic.NestedEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterEqual +org.apache.struts.taglib.nested.logic.NestedGreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.nested.logic.NestedGreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.nested.logic.NestedIterateTag +org.apache.struts.taglib.nested.logic.NestedIterateTei +JSP + +collection +false +true + + +id +false +true + + +indexId +false +true + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.nested.logic.NestedLessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.nested.logic.NestedLessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.nested.logic.NestedMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.nested.logic.NestedMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.nested.logic.NestedNotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.nested.logic.NestedNotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.nested.logic.NestedNotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.nested.logic.NestedNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.nested.logic.NestedPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + + + + diff --git a/08/WebRoot/WEB-INF/struts-template.tld b/08/WebRoot/WEB-INF/struts-template.tld new file mode 100644 index 0000000..3789b84 --- /dev/null +++ b/08/WebRoot/WEB-INF/struts-template.tld @@ -0,0 +1,73 @@ + + + + + + + + + + +1.0 +1.1 +template +http://jakarta.apache.org/struts/tags-template + +insert +org.apache.struts.taglib.template.InsertTag +JSP + +template +true +true + + + +put +org.apache.struts.taglib.template.PutTag +JSP + +name +true +true + + +role +false +true + + +content +false +true + + +direct +false +true + + + +get +org.apache.struts.taglib.template.GetTag +empty + +flush +false +true + + +name +true +true + + +role +false +true + + + + + + diff --git a/08/WebRoot/WEB-INF/struts-tiles.tld b/08/WebRoot/WEB-INF/struts-tiles.tld new file mode 100644 index 0000000..024b6f0 --- /dev/null +++ b/08/WebRoot/WEB-INF/struts-tiles.tld @@ -0,0 +1,344 @@ + + + + + + + + + + +1.0 +1.1 +tiles +http://jakarta.apache.org/struts/tags-tiles + +insert +org.apache.struts.taglib.tiles.InsertTag +JSP + +template +false +true + + +component +false +true + + +page +false +true + + +definition +false +true + + +attribute +false +false + + +name +false +true + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +flush +false +false + + +ignore +false +true + + +role +false +true + + +controllerUrl +false +true + + +controllerClass +false +true + + + +definition +org.apache.struts.taglib.tiles.DefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.struts.taglib.tiles.PutTag +JSP + +name +false +false + + +value +false +true + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +putList +org.apache.struts.taglib.tiles.PutListTag +JSP + +name +true +false + + + +add +org.apache.struts.taglib.tiles.AddTag +JSP + +value +false +false + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +get +org.apache.struts.taglib.tiles.GetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.struts.taglib.tiles.GetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.struts.taglib.tiles.UseAttributeTag +org.apache.struts.taglib.tiles.UseAttributeTei +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.struts.taglib.tiles.ImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.struts.taglib.tiles.InitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + diff --git a/08/WebRoot/WEB-INF/validator-rules.xml b/08/WebRoot/WEB-INF/validator-rules.xml new file mode 100644 index 0000000..4bc3ab7 --- /dev/null +++ b/08/WebRoot/WEB-INF/validator-rules.xml @@ -0,0 +1,1044 @@ + + + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (trim(value).length == 0) { + + if (i == 0) { + focusField = field; + } + fields[i++] = oRequired[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + } + + // Trim whitespace from left and right sides of s. + function trim(s) { + return s.replace( /^\s*/, "" ).replace( /\s*$/, "" ); + } + + ]]> + + + + + + + + + + 0) && (field.value.length < iMin)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oMinLength[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + + iMax) { + if (i == 0) { + focusField = field; + } + fields[i++] = oMaxLength[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + + 0)) { + + if (!matchPattern(field.value, oMasked[x][2]("mask"))) { + if (i == 0) { + focusField = field; + } + fields[i++] = oMasked[x][1]; + isValid = false; + } + } + } + + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + } + + function matchPattern(value, mask) { + return mask.exec(value); + }]]> + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oByte[x][1]; + + } else { + + var iValue = parseInt(value); + if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oByte[x][1]; + bValid = false; + } + } + } + + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + }]]> + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oShort[x][1]; + + } else { + + var iValue = parseInt(value); + if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oShort[x][1]; + bValid = false; + } + } + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + }]]> + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oInteger[x][1]; + + } else { + var iValue = parseInt(value); + if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oInteger[x][1]; + bValid = false; + } + } + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + function isAllDigits(argvalue) { + argvalue = argvalue.toString(); + var validChars = "0123456789"; + var startFrom = 0; + if (argvalue.substring(0, 2) == "0x") { + validChars = "0123456789abcdefABCDEF"; + startFrom = 2; + } else if (argvalue.charAt(0) == "0") { + validChars = "01234567"; + startFrom = 1; + } else if (argvalue.charAt(0) == "-") { + startFrom = 1; + } + + for (var n = startFrom; n < argvalue.length; n++) { + if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false; + } + return true; + }]]> + + + + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + // remove '.' before checking digits + var tempArray = value.split('.'); + var joinedString= tempArray.join(''); + + if (!isAllDigits(joinedString)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oFloat[x][1]; + + } else { + var iValue = parseFloat(value); + if (isNaN(iValue)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oFloat[x][1]; + bValid = false; + } + } + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + }]]> + + + + + + + + + + + 0) && + (datePattern.length > 0)) { + var MONTH = "MM"; + var DAY = "dd"; + var YEAR = "yyyy"; + var orderMonth = datePattern.indexOf(MONTH); + var orderDay = datePattern.indexOf(DAY); + var orderYear = datePattern.indexOf(YEAR); + if ((orderDay < orderYear && orderDay > orderMonth)) { + var iDelim1 = orderMonth + MONTH.length; + var iDelim2 = orderDay + DAY.length; + var delim1 = datePattern.substring(iDelim1, iDelim1 + 1); + var delim2 = datePattern.substring(iDelim2, iDelim2 + 1); + if (iDelim1 == orderDay && iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$"); + } else if (iDelim1 == orderDay) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$"); + } else if (iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$"); + } else { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$"); + } + var matched = dateRegexp.exec(value); + if(matched != null) { + if (!isValidDate(matched[2], matched[1], matched[3])) { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else if ((orderMonth < orderYear && orderMonth > orderDay)) { + var iDelim1 = orderDay + DAY.length; + var iDelim2 = orderMonth + MONTH.length; + var delim1 = datePattern.substring(iDelim1, iDelim1 + 1); + var delim2 = datePattern.substring(iDelim2, iDelim2 + 1); + if (iDelim1 == orderMonth && iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$"); + } else if (iDelim1 == orderMonth) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$"); + } else if (iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$"); + } else { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$"); + } + var matched = dateRegexp.exec(value); + if(matched != null) { + if (!isValidDate(matched[1], matched[2], matched[3])) { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else if ((orderMonth > orderYear && orderMonth < orderDay)) { + var iDelim1 = orderYear + YEAR.length; + var iDelim2 = orderMonth + MONTH.length; + var delim1 = datePattern.substring(iDelim1, iDelim1 + 1); + var delim2 = datePattern.substring(iDelim2, iDelim2 + 1); + if (iDelim1 == orderMonth && iDelim2 == orderDay) { + dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$"); + } else if (iDelim1 == orderMonth) { + dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$"); + } else if (iDelim2 == orderDay) { + dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$"); + } else { + dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$"); + } + var matched = dateRegexp.exec(value); + if(matched != null) { + if (!isValidDate(matched[3], matched[2], matched[1])) { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + function isValidDate(day, month, year) { + if (month < 1 || month > 12) { + return false; + } + if (day < 1 || day > 31) { + return false; + } + if ((month == 4 || month == 6 || month == 9 || month == 11) && + (day == 31)) { + return false; + } + if (month == 2) { + var leap = (year % 4 == 0 && + (year % 100 != 0 || year % 400 == 0)); + if (day>29 || (day == 29 && !leap)) { + return false; + } + } + return true; + }]]> + + + + + + + + + + + + + + + 0)) { + + var iMin = parseInt(oRange[x][2]("min")); + var iMax = parseInt(oRange[x][2]("max")); + var iValue = parseInt(field.value); + if (!(iValue >= iMin && iValue <= iMax)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oRange[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + 0)) { + + var fMin = parseFloat(oRange[x][2]("min")); + var fMax = parseFloat(oRange[x][2]("max")); + var fValue = parseFloat(field.value); + if (!(fValue >= fMin && fValue <= fMax)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oRange[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + 0)) { + if (!luhnCheck(form[oCreditCard[x][0]].value)) { + if (i == 0) { + focusField = form[oCreditCard[x][0]]; + } + fields[i++] = oCreditCard[x][1]; + bValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + /** + * Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl + */ + function luhnCheck(cardNumber) { + if (isLuhnNum(cardNumber)) { + var no_digit = cardNumber.length; + var oddoeven = no_digit & 1; + var sum = 0; + for (var count = 0; count < no_digit; count++) { + var digit = parseInt(cardNumber.charAt(count)); + if (!((count & 1) ^ oddoeven)) { + digit *= 2; + if (digit > 9) digit -= 9; + }; + sum += digit; + }; + if (sum == 0) return false; + if (sum % 10 == 0) return true; + }; + return false; + } + + function isLuhnNum(argvalue) { + argvalue = argvalue.toString(); + if (argvalue.length == 0) { + return false; + } + for (var n = 0; n < argvalue.length; n++) { + if ((argvalue.substring(n, n+1) < "0") || + (argvalue.substring(n,n+1) > "9")) { + return false; + } + } + return true; + }]]> + + + + + + + + 0)) { + if (!checkEmail(form[oEmail[x][0]].value)) { + if (i == 0) { + focusField = form[oEmail[x][0]]; + } + fields[i++] = oEmail[x][1]; + bValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + /** + * Reference: Sandeep V. Tamhankar (stamhankar@hotmail.com), + * http://javascript.internet.com + */ + function checkEmail(emailStr) { + if (emailStr.length == 0) { + return true; + } + var emailPat=/^(.+)@(.+)$/; + var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"; + var validChars="\[^\\s" + specialChars + "\]"; + var quotedUser="(\"[^\"]*\")"; + var ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/; + var atom=validChars + '+'; + var word="(" + atom + "|" + quotedUser + ")"; + var userPat=new RegExp("^" + word + "(\\." + word + ")*$"); + var domainPat=new RegExp("^" + atom + "(\\." + atom + ")*$"); + var matchArray=emailStr.match(emailPat); + if (matchArray == null) { + return false; + } + var user=matchArray[1]; + var domain=matchArray[2]; + if (user.match(userPat) == null) { + return false; + } + var IPArray = domain.match(ipDomainPat); + if (IPArray != null) { + for (var i = 1; i <= 4; i++) { + if (IPArray[i] > 255) { + return false; + } + } + return true; + } + var domainArray=domain.match(domainPat); + if (domainArray == null) { + return false; + } + var atomPat=new RegExp(atom,"g"); + var domArr=domain.match(atomPat); + var len=domArr.length; + if ((domArr[domArr.length-1].length < 2) || + (domArr[domArr.length-1].length > 3)) { + return false; + } + if (len < 2) { + return false; + } + return true; + }]]> + + + + + + + diff --git a/08/WebRoot/WEB-INF/web.xml b/08/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..a4b275f --- /dev/null +++ b/08/WebRoot/WEB-INF/web.xml @@ -0,0 +1,52 @@ + + + + + myfilter + com.struts.filter.MyFilter + + + myfilter + /* + + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts-config.xml + + + debug + 3 + + + detail + 3 + + 0 + + + action + *.do + + + /WEB-INF/struts-html.tld + /WEB-INF/struts-html.tld + + + /WEB-INF/struts-bean.tld + /WEB-INF/struts-bean.tld + + + /WEB-INF/struts-logic.tld + /WEB-INF/struts-logic.tld + + + /WEB-INF/struts-tiles.tld + /WEB-INF/struts-tiles.tld + + + diff --git a/08/WebRoot/default.jsp b/08/WebRoot/default.jsp new file mode 100644 index 0000000..649a613 --- /dev/null +++ b/08/WebRoot/default.jsp @@ -0,0 +1,32 @@ +<%@ page language="java" pageEncoding="gbk"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + +ҳ + + + + + + + + + + + + + + + + + +
    + +
    diff --git a/08/WebRoot/index.jsp b/08/WebRoot/index.jsp new file mode 100644 index 0000000..31fcefc --- /dev/null +++ b/08/WebRoot/index.jsp @@ -0,0 +1,135 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + index.jsp + + + + + + + + + + + +
    +
    +
    +
    + + + + +
    +
    + + + + + + + + +










    + + + + + + + + + + + + + + + +
    + û + + +
    +   룺 + +
    + ֤룺 + + + <% + int intmethod = (int)( (((Math.random())*11))-1); + int intmethod2 = (int)( (((Math.random())*11))-1); + int intmethod3 = (int)( (((Math.random())*11))-1); + int intmethod4 = (int)( (((Math.random())*11))-1); + String intsum = intmethod+""+intmethod2+intmethod3+intmethod4; + //õ + %> + + .gif> .gif> + + .gif> .gif> +
            +   + +
    +
    +
    + + + + + diff --git a/08/WebRoot/left.jsp b/08/WebRoot/left.jsp new file mode 100644 index 0000000..d75404f --- /dev/null +++ b/08/WebRoot/left.jsp @@ -0,0 +1,34 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + + + + + + + + + + + + + + +
     <%@ include file="menu.jsp"%>
    + +
    diff --git a/08/WebRoot/main.jsp b/08/WebRoot/main.jsp new file mode 100644 index 0000000..60c91b4 --- /dev/null +++ b/08/WebRoot/main.jsp @@ -0,0 +1,31 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + + + + + + + + +
    + + + + + +
     ҳ 
    +


    + + +
    + ӭ¼칫Զϵͳ
    + +
    diff --git a/08/WebRoot/menu.jsp b/08/WebRoot/menu.jsp new file mode 100644 index 0000000..dbf5354 --- /dev/null +++ b/08/WebRoot/menu.jsp @@ -0,0 +1,90 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ page import="java.util.*,com.hiernate.persistence.Menu"%> + + +<% + List listfather = (List)session.getAttribute("menulist"); //˵ + if(listfather.isEmpty()){ //ж˵ǷΪ +%> + + + + <%} + else{ //˵Ϊգ² + int m=1; + for(int j=0;j + + + <% + if(listsun.size()>0){ // жӲ˵ϵijǷڣ + %> + + + <%}%> + + <%}}%> +
    ޹ܷϢ!
    + <% + if(listsun.isEmpty()){ + for(int i=1;i +   + + <%=menufather.getMenuName()%> + <%}} + else{%> +   + չ + + + <%=menufather.getMenuName()%> + + <%}%> +
    + \ No newline at end of file diff --git a/08/WebRoot/top.jsp b/08/WebRoot/top.jsp new file mode 100644 index 0000000..a40cb03 --- /dev/null +++ b/08/WebRoot/top.jsp @@ -0,0 +1,68 @@ +<%@ page language="java" pageEncoding="gb2312"%> + +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + ҳ + + + + +<% + if((UserForm) session.getAttribute("uform") == null){ //sessionڣʾûµ¼ϵͳ + %> + + <%}else{ //sessionûйڣִ´ + UserForm uf =(UserForm) session.getAttribute("uform"); + application.setAttribute("Purview",uf.getUserPurview()); + application.setAttribute("un",uf.getUserName()); + %> + + + + + + + + + +
     
    + + + + + + + + + + +
      + + + + + + +
       ҳ    µ¼  ˳
      û <%=uf.getUserName()%>      Ȩޣ<%=uf.getUserPurview()%>        ڲţ<%=uf.getUserbranch()%>  
    +<%} %> + + diff --git a/08/WebRoot/unsuccess.jsp b/08/WebRoot/unsuccess.jsp new file mode 100644 index 0000000..4ba7a6a --- /dev/null +++ b/08/WebRoot/unsuccess.jsp @@ -0,0 +1,40 @@ +<%@ page contentType="text/html;charset=gb2312"%> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + ¼ʧҳ + + + + + + + + + + + + + + + +
    +
    +

    + ʾ +

    +
    +
    + ĵ¼ʧ +
    + û! +
    +
    + ˴ص¼ҳ +
    +
    + + diff --git a/08/src/com/hiernate/persistence/Bm.hbm.xml b/08/src/com/hiernate/persistence/Bm.hbm.xml new file mode 100644 index 0000000..9659805 --- /dev/null +++ b/08/src/com/hiernate/persistence/Bm.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Bm.java b/08/src/com/hiernate/persistence/Bm.java new file mode 100644 index 0000000..4704fe4 --- /dev/null +++ b/08/src/com/hiernate/persistence/Bm.java @@ -0,0 +1,41 @@ +package com.hiernate.persistence; + +import java.sql.Date; + +public class Bm { + private int id; + private String name1; + private String title; + private String content; + private Date time1; +public String getContent() { + return content; +} +public void setContent(String content) { + this.content = content; +} +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getName1() { + return name1; +} +public void setName1(String name1) { + this.name1 = name1; +} +public Date getTime1() { + return time1; +} +public void setTime1(Date time1) { + this.time1 = time1; +} +public String getTitle() { + return title; +} +public void setTitle(String title) { + this.title = title; +} +} diff --git a/08/src/com/hiernate/persistence/Chuchai.hbm.xml b/08/src/com/hiernate/persistence/Chuchai.hbm.xml new file mode 100644 index 0000000..31d2a3a --- /dev/null +++ b/08/src/com/hiernate/persistence/Chuchai.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Chuchai.java b/08/src/com/hiernate/persistence/Chuchai.java new file mode 100644 index 0000000..01b5ffd --- /dev/null +++ b/08/src/com/hiernate/persistence/Chuchai.java @@ -0,0 +1,57 @@ +package com.hiernate.persistence; + +import java.sql.Date; + +public class Chuchai { + private int id; + private String chuarea; + private Date time1; + private Date time2; + private String name1; + private String department; + private String state; +public String getState() { + return state; +} +public void setState(String state) { + this.state = state; +} +public String getChuarea() { + return chuarea; +} +public void setChuarea(String chuarea) { + this.chuarea = chuarea; +} +public String getDepartment() { + return department; +} +public void setDepartment(String department) { + this.department = department; +} +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getName1() { + return name1; +} +public void setName1(String name1) { + this.name1 = name1; +} +public Date getTime1() { + return time1; +} +public void setTime1(Date time1) { + this.time1 = time1; +} +public Date getTime2() { + return time2; +} +public void setTime2(Date time2) { + this.time2 = time2; +} + + +} diff --git a/08/src/com/hiernate/persistence/Meeting.hbm.xml b/08/src/com/hiernate/persistence/Meeting.hbm.xml new file mode 100644 index 0000000..8cd0d39 --- /dev/null +++ b/08/src/com/hiernate/persistence/Meeting.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Meeting.java b/08/src/com/hiernate/persistence/Meeting.java new file mode 100644 index 0000000..636bc3e --- /dev/null +++ b/08/src/com/hiernate/persistence/Meeting.java @@ -0,0 +1,59 @@ +package com.hiernate.persistence; + +import java.sql.Date; + +public class Meeting { + private int id; + private String MTime; + private String ZPerson; + private String CPerson; + private String subject; + private String address; + private String content; +public String getAddress() { + return address; +} +public void setAddress(String address) { + this.address = address; +} +public String getContent() { + return content; +} +public void setContent(String content) { + this.content = content; +} + +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} + +public String getSubject() { + return subject; +} +public void setSubject(String subject) { + this.subject = subject; +} +public String getCPerson() { + return CPerson; +} +public void setCPerson(String person) { + CPerson = person; +} +public String getZPerson() { + return ZPerson; +} +public void setZPerson(String person) { + ZPerson = person; +} +public String getMTime() { + return MTime; +} +public void setMTime(String time) { + MTime = time; +} + + +} diff --git a/08/src/com/hiernate/persistence/Menu.hbm.xml b/08/src/com/hiernate/persistence/Menu.hbm.xml new file mode 100644 index 0000000..250fcf6 --- /dev/null +++ b/08/src/com/hiernate/persistence/Menu.hbm.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Menu.java b/08/src/com/hiernate/persistence/Menu.java new file mode 100644 index 0000000..4241d2e --- /dev/null +++ b/08/src/com/hiernate/persistence/Menu.java @@ -0,0 +1,33 @@ +package com.hiernate.persistence; + +public class Menu { + private Long id; + private Long modeId; + private String linkurl; + private String menuName; +public String getMenuName() { + return menuName; +} +public void setMenuName(String menuName) { + this.menuName = menuName; +} +public Long getId() { + return id; +} +public void setId(Long id) { + this.id = id; +} +public String getLinkurl() { + return linkurl; +} +public void setLinkurl(String linkurl) { + this.linkurl = linkurl; +} +public Long getModeId() { + return modeId; +} +public void setModeId(Long modeId) { + this.modeId = modeId; +} + +} diff --git a/08/src/com/hiernate/persistence/Onduty.hbm.xml b/08/src/com/hiernate/persistence/Onduty.hbm.xml new file mode 100644 index 0000000..5a7b0c3 --- /dev/null +++ b/08/src/com/hiernate/persistence/Onduty.hbm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Onduty.java b/08/src/com/hiernate/persistence/Onduty.java new file mode 100644 index 0000000..9267389 --- /dev/null +++ b/08/src/com/hiernate/persistence/Onduty.java @@ -0,0 +1,59 @@ +package com.hiernate.persistence; +public class Onduty { + private int id; + private String name1; + private String department; + private String enroltype; + private String definetime; + private String enroltime; + private String enrolremark; + private String state; +public void setDepartment(String department) { + this.department = department; +} +public String getEnrolremark() { + return enrolremark; +} +public void setEnrolremark(String enrolremark) { + this.enrolremark = enrolremark; +} +public String getDefinetime() { + return definetime; +} +public void setDefinetime(String definetime) { + this.definetime = definetime; +} +public String getEnroltime() { + return enroltime; +} +public void setEnroltime(String enroltime) { + this.enroltime = enroltime; +} +public String getDepartment() { + return department; +} +public String getEnroltype() { + return enroltype; +} +public void setEnroltype(String enroltype) { + this.enroltype = enroltype; +} +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getName1() { + return name1; +} +public void setName1(String name1) { + this.name1 = name1; +} +public String getState() { + return state; +} +public void setState(String state) { + this.state = state; +} +} diff --git a/08/src/com/hiernate/persistence/Person.hbm.xml b/08/src/com/hiernate/persistence/Person.hbm.xml new file mode 100644 index 0000000..da480f9 --- /dev/null +++ b/08/src/com/hiernate/persistence/Person.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Person.java b/08/src/com/hiernate/persistence/Person.java new file mode 100644 index 0000000..f536120 --- /dev/null +++ b/08/src/com/hiernate/persistence/Person.java @@ -0,0 +1,41 @@ +package com.hiernate.persistence; + +import java.sql.Date; + +public class Person { + private int id; + private String name1; + private String title; + private String content; + private Date time1; +public String getContent() { + return content; +} +public void setContent(String content) { + this.content = content; +} +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getName1() { + return name1; +} +public void setName1(String name1) { + this.name1 = name1; +} +public Date getTime1() { + return time1; +} +public void setTime1(Date time1) { + this.time1 = time1; +} +public String getTitle() { + return title; +} +public void setTitle(String title) { + this.title = title; +} +} diff --git a/08/src/com/hiernate/persistence/Placard.hbm.xml b/08/src/com/hiernate/persistence/Placard.hbm.xml new file mode 100644 index 0000000..5198718 --- /dev/null +++ b/08/src/com/hiernate/persistence/Placard.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Placard.java b/08/src/com/hiernate/persistence/Placard.java new file mode 100644 index 0000000..b7c9c59 --- /dev/null +++ b/08/src/com/hiernate/persistence/Placard.java @@ -0,0 +1,41 @@ +package com.hiernate.persistence; +import java.sql.*; +public class Placard { + private int id; + private String subject; + private String person; + private Date DDate; + private String content; +public String getContent() { + return content; +} +public void setContent(String content) { + this.content = content; +} + +public Date getDDate() { + return DDate; +} +public void setDDate(Date date) { + DDate = date; +} +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getPerson() { + return person; +} +public void setPerson(String person) { + this.person = person; +} +public String getSubject() { + return subject; +} +public void setSubject(String subject) { + this.subject = subject; +} + +} diff --git a/08/src/com/hiernate/persistence/Qingjia.hbm.xml b/08/src/com/hiernate/persistence/Qingjia.hbm.xml new file mode 100644 index 0000000..a9f2857 --- /dev/null +++ b/08/src/com/hiernate/persistence/Qingjia.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Qingjia.java b/08/src/com/hiernate/persistence/Qingjia.java new file mode 100644 index 0000000..34f0a65 --- /dev/null +++ b/08/src/com/hiernate/persistence/Qingjia.java @@ -0,0 +1,57 @@ +package com.hiernate.persistence; + +import java.sql.Date; + +public class Qingjia { + private int id; + private String name1; + private String department; + private String content; + private Date time1; + private Date time2; + private String state; +public String getContent() { + return content; +} +public void setContent(String content) { + this.content = content; +} +public String getDepartment() { + return department; +} +public void setDepartment(String department) { + this.department = department; +} +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getName1() { + return name1; +} +public void setName1(String name1) { + this.name1 = name1; +} +public String getState() { + return state; +} +public void setState(String state) { + this.state = state; +} +public Date getTime1() { + return time1; +} +public void setTime1(Date time1) { + this.time1 = time1; +} +public Date getTime2() { + return time2; +} +public void setTime2(Date time2) { + this.time2 = time2; +} + + +} diff --git a/08/src/com/hiernate/persistence/Qiye.hbm.xml b/08/src/com/hiernate/persistence/Qiye.hbm.xml new file mode 100644 index 0000000..e0c5a1a --- /dev/null +++ b/08/src/com/hiernate/persistence/Qiye.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Qiye.java b/08/src/com/hiernate/persistence/Qiye.java new file mode 100644 index 0000000..19ee3cb --- /dev/null +++ b/08/src/com/hiernate/persistence/Qiye.java @@ -0,0 +1,41 @@ +package com.hiernate.persistence; + +import java.sql.Date; + +public class Qiye { + private int id; + private Date riqi; + private String title; + private String content; + private String name1; +public String getContent() { + return content; +} +public void setContent(String content) { + this.content = content; +} +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getName1() { + return name1; +} +public void setName1(String name1) { + this.name1 = name1; +} +public Date getRiqi() { + return riqi; +} +public void setRiqi(Date riqi) { + this.riqi = riqi; +} +public String getTitle() { + return title; +} +public void setTitle(String title) { + this.title = title; +} +} diff --git a/08/src/com/hiernate/persistence/Shenhe.hbm.xml b/08/src/com/hiernate/persistence/Shenhe.hbm.xml new file mode 100644 index 0000000..6855d08 --- /dev/null +++ b/08/src/com/hiernate/persistence/Shenhe.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Shenhe.java b/08/src/com/hiernate/persistence/Shenhe.java new file mode 100644 index 0000000..de526bd --- /dev/null +++ b/08/src/com/hiernate/persistence/Shenhe.java @@ -0,0 +1,42 @@ +package com.hiernate.persistence; + +import java.sql.Date; + +public class Shenhe { + private int id; + private String title; + private String content; + private String shen; + private Date time1; +public String getContent() { + return content; +} +public void setContent(String content) { + this.content = content; +} +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getShen() { + return shen; +} +public void setShen(String shen) { + this.shen = shen; +} + +public Date getTime1() { + return time1; +} +public void setTime1(Date time1) { + this.time1 = time1; +} +public String getTitle() { + return title; +} +public void setTitle(String title) { + this.title = title; +} +} diff --git a/08/src/com/hiernate/persistence/TongXunAdd.hbm.xml b/08/src/com/hiernate/persistence/TongXunAdd.hbm.xml new file mode 100644 index 0000000..47595cb --- /dev/null +++ b/08/src/com/hiernate/persistence/TongXunAdd.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/08/src/com/hiernate/persistence/TongXunAdd.java b/08/src/com/hiernate/persistence/TongXunAdd.java new file mode 100644 index 0000000..8d01b4b --- /dev/null +++ b/08/src/com/hiernate/persistence/TongXunAdd.java @@ -0,0 +1,133 @@ +package com.hiernate.persistence; + +import java.sql.Date; + +public class TongXunAdd { + private int id; + private String name11; + private Date birthday; + private String Sex; + private String hy; + private String department; + private String zw; + private String cf; + private String cs; + private String phone; + private String phone1; + private String email; + private String postcode; + private String OICQ; + private String family; + private String address; + private String remark; + private int name1; +public String getAddress() { + return address; +} +public void setAddress(String address) { + this.address = address; +} +public Date getBirthday() { + return birthday; +} +public void setBirthday(Date birthday) { + this.birthday = birthday; +} +public String getCf() { + return cf; +} +public void setCf(String cf) { + this.cf = cf; +} +public String getCs() { + return cs; +} +public void setCs(String cs) { + this.cs = cs; +} +public String getDepartment() { + return department; +} +public void setDepartment(String department) { + this.department = department; +} +public String getEmail() { + return email; +} +public void setEmail(String email) { + this.email = email; +} +public String getFamily() { + return family; +} +public void setFamily(String family) { + this.family = family; +} +public String getHy() { + return hy; +} +public void setHy(String hy) { + this.hy = hy; +} +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} + +public int getName1() { + return name1; +} +public void setName1(int name1) { + this.name1 = name1; +} +public String getName11() { + return name11; +} +public void setName11(String name11) { + this.name11 = name11; +} +public String getOICQ() { + return OICQ; +} +public void setOICQ(String oicq) { + OICQ = oicq; +} +public String getPhone() { + return phone; +} +public void setPhone(String phone) { + this.phone = phone; +} +public String getPhone1() { + return phone1; +} +public void setPhone1(String phone1) { + this.phone1 = phone1; +} +public String getPostcode() { + return postcode; +} +public void setPostcode(String postcode) { + this.postcode = postcode; +} +public String getRemark() { + return remark; +} +public void setRemark(String remark) { + this.remark = remark; +} +public String getSex() { + return Sex; +} +public void setSex(String sex) { + Sex = sex; +} +public String getZw() { + return zw; +} +public void setZw(String zw) { + this.zw = zw; +} +} diff --git a/08/src/com/hiernate/persistence/Tongxun.hbm.xml b/08/src/com/hiernate/persistence/Tongxun.hbm.xml new file mode 100644 index 0000000..3fd6c71 --- /dev/null +++ b/08/src/com/hiernate/persistence/Tongxun.hbm.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Tongxun.java b/08/src/com/hiernate/persistence/Tongxun.java new file mode 100644 index 0000000..deb9e5f --- /dev/null +++ b/08/src/com/hiernate/persistence/Tongxun.java @@ -0,0 +1,18 @@ +package com.hiernate.persistence; + +public class Tongxun { + private int id; + private String name1; +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getName1() { + return name1; +} +public void setName1(String name1) { + this.name1 = name1; +} +} diff --git a/08/src/com/hiernate/persistence/User.hbm.xml b/08/src/com/hiernate/persistence/User.hbm.xml new file mode 100644 index 0000000..6195517 --- /dev/null +++ b/08/src/com/hiernate/persistence/User.hbm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/08/src/com/hiernate/persistence/User.java b/08/src/com/hiernate/persistence/User.java new file mode 100644 index 0000000..62aa8dd --- /dev/null +++ b/08/src/com/hiernate/persistence/User.java @@ -0,0 +1,93 @@ +package com.hiernate.persistence; +/** + * û־û + * + */ +public class User { + private int id; //ûid + private String userName; //û¼ϵͳʱõû + private String pwd; //û + private String name; //ûʵ + private String purview; //ûȨ + private String branch; //ûڵIJ + private String job; //û + private String sex; //ûԱ + private String email; //ûE-mailַ + private String tel; //û绰 + private String address; //ûַ + private int bestMan; //Ա + +public int getBestMan() { + return bestMan; +} +public void setBestMan(int bestMan) { + this.bestMan = bestMan; +} +public String getAddress() { + return address; +} +public void setAddress(String address) { + this.address = address; +} + +public String getBranch() { + return branch; +} +public void setBranch(String branch) { + this.branch = branch; +} +public String getEmail() { + return email; +} +public void setEmail(String email) { + this.email = email; +} +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getJob() { + return job; +} +public void setJob(String job) { + this.job = job; +} +public String getName() { + return name; +} +public void setName(String name) { + this.name = name; +} +public String getPurview() { + return purview; +} +public void setPurview(String purview) { + this.purview = purview; +} +public String getPwd() { + return pwd; +} +public void setPwd(String pwd) { + this.pwd = pwd; +} +public String getSex() { + return sex; +} +public void setSex(String sex) { + this.sex = sex; +} +public String getTel() { + return tel; +} +public void setTel(String tel) { + this.tel = tel; +} +public String getUserName() { + return userName; +} +public void setUserName(String userName) { + this.userName = userName; +} +} \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Waichu.hbm.xml b/08/src/com/hiernate/persistence/Waichu.hbm.xml new file mode 100644 index 0000000..7db3a6c --- /dev/null +++ b/08/src/com/hiernate/persistence/Waichu.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/08/src/com/hiernate/persistence/Waichu.java b/08/src/com/hiernate/persistence/Waichu.java new file mode 100644 index 0000000..d7ff8ec --- /dev/null +++ b/08/src/com/hiernate/persistence/Waichu.java @@ -0,0 +1,58 @@ +package com.hiernate.persistence; + +import java.sql.Date; + +public class Waichu { + private int id; + private String content; + private Date time1; + private Date time2; + private String name1; + private String department; + private int state; +public String getContent() { + return content; +} +public void setContent(String content) { + this.content = content; +} +public String getDepartment() { + return department; +} +public void setDepartment(String department) { + this.department = department; +} +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getName1() { + return name1; +} +public void setName1(String name1) { + this.name1 = name1; +} + +public int getState() { + return state; +} +public void setState(int state) { + this.state = state; +} +public Date getTime1() { + return time1; +} +public void setTime1(Date time1) { + this.time1 = time1; +} +public Date getTime2() { + return time2; +} +public void setTime2(Date time2) { + this.time2 = time2; +} + + +} diff --git a/08/src/com/hiernate/util/GetHibernate.java b/08/src/com/hiernate/util/GetHibernate.java new file mode 100644 index 0000000..cfd7910 --- /dev/null +++ b/08/src/com/hiernate/util/GetHibernate.java @@ -0,0 +1,51 @@ +package com.hiernate.util; //ཨcom.hibernate.util +import org.hibernate.Session; //org.hibernate.Session +import org.hibernate.SessionFactory; //org.hibernate.SessionFactory +import org.hibernate.cfg.Configuration; //org.hibernate.cfg.Configuration +import com.hiernate.persistence.Bm; //com.hiernate.persistence.Bm +import com.hiernate.persistence.Chuchai; //com.hiernate.persistence.Chuchai +import com.hiernate.persistence.Meeting; //com.hiernate.persistence.Meeting +import com.hiernate.persistence.Menu; //com.hiernate.persistence.Menu +import com.hiernate.persistence.Onduty; //com.hiernate.persistence.Onduty +import com.hiernate.persistence.Person; //com.hiernate.persistence.Person +import com.hiernate.persistence.Placard; //com.hiernate.persistence.Placard +import com.hiernate.persistence.Qingjia; //com.hiernate.persistence.Qingjia +import com.hiernate.persistence.Qiye; //com.hiernate.persistence.Qiye +import com.hiernate.persistence.Shenhe; //com.hiernate.persistence.Shenhe +import com.hiernate.persistence.TongXunAdd; //com.hiernate.persistence.TongXunAdd +import com.hiernate.persistence.Tongxun; //com.hiernate.persistence.Tongxun +import com.hiernate.persistence.User; //com.hiernate.persistence.User +import com.hiernate.persistence.Waichu; //com.hiernate.persistence.Waichu +public class GetHibernate { + + private static SessionFactory sf = null;//SessionFactoryʵ + Session sessionHib = null; + static { + try { + Configuration conf = new Configuration().addClass(User.class) + .addClass(Menu.class).addClass(Meeting.class) + .addClass(Placard.class).addClass(Waichu.class) + .addClass(Qingjia.class).addClass(Chuchai.class) + .addClass(Onduty.class).addClass(Qiye.class) + .addClass(Bm.class).addClass(Person.class) + .addClass(Shenhe.class).addClass(TongXunAdd.class) + .addClass(Tongxun.class); + sf = conf.buildSessionFactory(); + } catch (Exception e) { + e.printStackTrace(); + } + } + //HibernateļΪXMLʽֻļӳļڳвصConfiguration + //addClassӳļ£ + // SessionFactory sf = new Configuration() + // .configure().buildSessionFactory() + public Session openSession(){ //SessionΪֵSession + sessionHib = sf.openSession(); //SessionFactoryopenSession()Sessionʵ + return sessionHib; + } + public void closeSession(Session session){ //رSessionΪSessionʵ + if(session != null){ //close()رsession + session.close(); + } + } + } diff --git a/08/src/com/hiernate/util/GetTime.java b/08/src/com/hiernate/util/GetTime.java new file mode 100644 index 0000000..dfdcba8 --- /dev/null +++ b/08/src/com/hiernate/util/GetTime.java @@ -0,0 +1,38 @@ +package com.hiernate.util; //ౣcom.hibernate.util +import java.text.DateFormat; //java.text.DateFormat +import java.text.ParseException; //java.text.ParseException +import java.text.SimpleDateFormat; //java.text.SimpleDateFormat +import java.util.Calendar; //java.util.Calendar +import java.util.Date; //java.util.Date +public class GetTime { + +// жdate1Ƿdate2֮ǰ + public static boolean isDateBefore(String date1,String date) { + boolean b = true; //ݸ÷ķֵñ + DateFormat df = DateFormat.getDateTimeInstance(); //ʱʽΪϵͳĬϵĸʽ + try { + b=df.parse(date1).before(df.parse(date)); //жdate1Ƿdate2֮ǰ + } catch (ParseException e) { + + e.printStackTrace(); + } + return b; + } + //дϵͳڵķ + public static Date getDate(){ //DateΪֵgetDate() + Date dateU = new Date(); //Date + java.sql.Date date= new java.sql.Date(dateU.getTime()); //getTime()ɵõǰϵͳ + return date; + } + //дںʱķ + public static String getDateTime(){ //÷ֵΪString + SimpleDateFormat format; //simpleDateFormatʹÿѡκû-ʱʽģʽ + Date date = null; + Calendar myDate = Calendar.getInstance(); //Calendar ķ getInstanceԻô͵һͨõĶ + myDate.setTime(new java.util.Date()); //ʹø Date ô Calendar ʱ + date = myDate.getTime(); //һʾ Calendar ʱֵԪڵĺƫ Date + format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //ʱʽΪꡢ¡աʱ֡ + String strRtn = format.format(date); // Date ʽΪ/ʱֵַ String + return strRtn; + } +} diff --git a/08/src/com/hiernate/util/HibernateUtil.java b/08/src/com/hiernate/util/HibernateUtil.java new file mode 100644 index 0000000..686200a --- /dev/null +++ b/08/src/com/hiernate/util/HibernateUtil.java @@ -0,0 +1,1304 @@ +package com.hiernate.util; +import java.util.List; +import org.hibernate.Query; +import org.hibernate.Session; +import org.hibernate.Transaction; +import com.hiernate.persistence.*; +//hibernate࣬ݿ⽻ +public class HibernateUtil { + static Session session; + static GetHibernate hib = new GetHibernate(); // + +// ûѰû + public static List findUser(String strUserName, String strPwd) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); //ùĿsession + tx = (Transaction) session.beginTransaction(); // + Query query = session.createQuery("from User as u where u.userName=:strUserName and u.pwd=:strPwd"); //ӦHQLļ + query.setString("strUserName", strUserName); //̬󶨲 + query.setString("strPwd", strPwd); + list = query.list(); //listִHQL + tx.commit(); //ύ + hib.closeSession(session); //رsession + } catch (Exception e) { + e.printStackTrace(); //쳣Ϣ + tx.rollback(); //Ļع + } + return list; + } +// ûҳ + public static List findUser(int recPerPage,int pages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from User"); + query.setFirstResult(recPerPage); + query.setMaxResults(pages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// Աܼ¼ + public static int findUserCount() { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + String count = (session.createQuery("select count(*)from User").uniqueResult()).toString(); + intCount = Integer.parseInt(count); + tx.commit(); + hib.closeSession(session); + + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return intCount; + } +// ޸ûϢ + public static void updateUser(User user) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.update(user); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// ɾû + public static void deleUser(User user) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.delete(user); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// ûid + public static List findUserId(int intId) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session + .createQuery("from User as u where u.id =:intMedeId"); + query.setInteger("intMedeId", intId); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// Ųû + public static List findUser(String strBranch,int intFrist,int intPages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session + .createQuery("from User as u where u.branch=:strBranch"); + query.setString("strBranch", strBranch); + query.setFirstResult(intFrist); + query.setMaxResults(intPages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// ŲԱܼ¼ + public static int findUserCount(String branch) { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + intCount = Integer.parseInt( (session.createQuery("select count(*)from User u where u.branch ="+"'"+branch+"'").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return intCount; + } +// Ա + public static List findU() { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session + .createQuery("from User as u where u.bestMan =1"); + + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + tx.rollback(); + } + return list; + } + // Ҳ˵ + public static List findMenu(int intMendId) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); //ù࿪session + tx = (Transaction) session.beginTransaction(); // + Query query = session + .createQuery("from Menu as m where m.modeId =:intMedeId"); + query.setInteger("intMedeId", intMendId); //󶨲ѯ + list = query.list(); + tx.commit(); + hib.closeSession(session); //ùرsession + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } + + // ¼,ҳ + public static List finMeeting(int intFrint,int intpages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); //session + tx = (Transaction) session.beginTransaction(); // + Query query = session.createQuery("from Meeting"); //Query + query.setFirstResult(intFrint); //Queryķҳ + query.setMaxResults(intpages); + list = query.list(); //ѯlist + tx.commit(); //ύ + hib.closeSession(session); //رsession + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// һܼ¼ + public static int findMeetingCount() { + Transaction tx = null; // + int intCount=0; //intͱ + try { + Session session = hib.openSession(); //ùsession + tx = (Transaction) session.beginTransaction();// + intCount = Integer.parseInt((session.createQuery("select count(*)from Meeting").uniqueResult()).toString()); + //ڲȷѯ͵ʱ򣬿uniqueResult()Object + tx.commit(); //ύ + hib.closeSession(session); //رsession + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); // + } + return intCount; + } +// ϻid + public static List findMeetingid(int intid) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); //ùsession + tx = (Transaction) session.beginTransaction(); // + Query query = session.createQuery("from Meeting as m where m.id =:intid"); //idż + query.setInteger("intid",intid); //̬󶨲 + list = query.list(); //ִHQL + tx.commit(); //ύ + hib.closeSession(session); //رsession + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); } + + return list; + } +// ϻļ¼ + public static void saveMeeting(Meeting meeting) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(meeting); //ʱתΪ־û + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// ϻļ¼ + public static void deleMeeting(Meeting meeting) { + Transaction tx = null; + try { + Session session = hib.openSession(); //ù෽session + tx = (Transaction) session.beginTransaction(); // + session.delete(meeting); //deleteɾ + tx.commit(); //ύ + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// Ϣļ¼ + public static List finplacard(int intFrist,int intpages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Placard"); //ҹϢ + query.setFirstResult(intFrist); + query.setMaxResults(intpages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// ҹܼ¼ + public static int findPlacardCount() { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + intCount = Integer.parseInt(( session.createQuery("select count(*)from Placard").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return intCount; + } +// ¹¼ + public static void savePlacard(Placard placard) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(placard); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + + } +// ޸Ĺ¼ + public static void updatePlacard(Placard placard) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.update(placard); //sessionupdate³־û + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// ɾ¼ + public static void delePlacard(Placard placard) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.delete(placard); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + + } + //idҹϢ + public static List finplacardId(int intid) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Placard as p where p.id=:intid"); //Query + query.setInteger("intid",intid); //̬󶨲 + list = query.list(); //listִвѯ䣬÷List + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } + //Ϣ + public static List finWaichu(int recPerPage,int pages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Waichu"); + query.setFirstResult(recPerPage); + query.setMaxResults(pages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + tx.rollback(); + } + return list; + } +// Ǽǵܼ¼ + public static int findWaichuCount() { + Transaction tx = null; + int intCount=0; + + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + try { + intCount = Integer.parseInt(( session.createQuery("select count(*)from Waichu").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + System.out.println("sssssssssssss "+(tx == null)); + tx.rollback(); + } + return intCount; + } + // idϸϢ + public static List finwaichuId(int intid) { + Transaction tx = null; + List list = null; + + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + try { + Query query = session.createQuery("from Waichu as w where w.id=:intid"); + query.setInteger("intid",intid); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } + +// ¼ + public static void saveWaichu(Waichu waichu) { + Transaction tx = null; + try { + Session session = hib.openSession(); //ù෽session + tx = (Transaction) session.beginTransaction(); // + session.save(waichu); //г־û + tx.commit(); //ύ + hib.closeSession(session); //رsession + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// ɾ¼ + public static void updateChuchai(Chuchai chuchai) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.update(chuchai); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + + } +// ¼ + public static void saveChuchai(Chuchai chuchai) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(chuchai); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } + //Ϣ + public static List findQingjia(int recPerPage,int pages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Qingjia"); + query.setFirstResult(recPerPage); + query.setMaxResults(pages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + tx.rollback(); + } + return list; + } +// ٵܼ¼ + public static int findQingjiaCount() { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + intCount = Integer.parseInt(( session.createQuery("select count(*)from Qingjia").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + tx.rollback(); + } + return intCount; + } +// ޸Ϣ + public static void updateQingjia(Qingjia qingia) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.update(qingia); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + tx.rollback(); + } + } +// ޸Ϣ + public static void saveQingjia(Qingjia qingia) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(qingia); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + tx.rollback(); + } + } +// ޸Ϣ + public static void updateWaichu(Waichu waichu) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.update(waichu); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } + + //idŲϢ + public static List findQingjia(int intid) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Qingjia as q where q.id=:intid"); + query.setInteger("intid",intid); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// Ϣ + public static List findchuchai(int recPerPage,int pages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Chuchai"); + query.setFirstResult(recPerPage); + query.setMaxResults(pages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// ҳϢܼ¼ + public static int findChuchaiCount() { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + intCount = Integer.parseInt(( session.createQuery("select count(*)from Chuchai").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return intCount; + } +// idŲҳϢ + public static List findchuchai(int intid) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Chuchai as c where c.id=:intid"); + query.setInteger("intid",intid); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// °ǼϢ + public static List findOnduty(int recPerPage,int pages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Onduty"); + query.setFirstResult(recPerPage); + query.setMaxResults(pages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// °ǼϢܼ¼ + public static int findOndutyCount() { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + intCount = Integer.parseInt(( session.createQuery("select count(*)from Onduty").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return intCount; + } +// °ǼϢ + public static void saveOnduty(Onduty onduty) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(onduty); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// idŲҳϢ + public static List findonduty(int intid) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Onduty as o where o.id=:intid"); + query.setInteger("intid",intid); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +//ҵƻϢ + public static List findqiye(int intFrist,int intPages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Qiye"); + query.setFirstResult(intFrist); + query.setMaxResults(intPages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// °ǼϢܼ¼ + public static int findQiyeCount() { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + intCount = Integer.parseInt(( session.createQuery("select count(*)from Qiye").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return intCount; + } +// ҵƻid + public static List findqiye(int intid) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Qiye as q where q.id=:intid"); + query.setInteger("intid",intid); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// ɾҵƻid + public static void deleqiye(Qiye qiye) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.delete(qiye); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + + } +// ҵƻ + public static void saveqiye(Qiye qiye) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(qiye); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + + } +// ҲżƻϢ + public static List findbm(int intFrist,int intPages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Bm"); + query.setFirstResult(intFrist); + query.setMaxResults(intPages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// Ҳżƻܼ¼ + public static int findBmCount() { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + intCount = Integer.parseInt( (session.createQuery("select count(*)from Bm").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return intCount; + } +// Ҳidϡ + public static List findbmid(int intid) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Bm as b where b.id=:intid"); + query.setInteger("intid",intid); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } + //Ӳżƻ + public static void savebm(Bm bm) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(bm); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + + } +// ɾҵƻid + public static void deleBm(Bm bm) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.delete(bm); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// Ҹ˼ƻϢ + public static List findperson(int intFrist,int intPages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Person"); + query.setFirstResult(intFrist); + query.setMaxResults(intPages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// Ҹ˼ƻܼ¼ + public static int findPersonCount() { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + intCount = Integer.parseInt((session.createQuery("select count(*)from Person").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return intCount; + } +// Ҹidϡ + public static List findPerson(int intid) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Person as p where p.id=:intid"); + query.setInteger("intid",intid); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } + //Ӹ˼ƻ + public static void saveperson(Person person) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(person); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + + } +// ɾ˼ƻid + public static void delePerson(Person person) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.delete(person); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } + //û + public static void saveUser(User user) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(user); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } + //˱Ϣ + public static List findshenhe(int intFrist,int intPages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Shenhe"); + query.setFirstResult(intFrist); + query.setMaxResults(intPages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// ܼ¼ + public static int findShenheCount() { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + intCount = Integer.parseInt(( session.createQuery("select count(*)from Shenhe").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return intCount; + } + //idϡ + public static List findShenheId(int intid) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Shenhe as s where s.id=:intid"); + query.setInteger("intid",intid); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// idϡ + public static void updateshenhe(Shenhe shehe) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.saveOrUpdate(shehe); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } + // ˱¼ + public static void saveshenhe(Shenhe shenhe) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(shenhe); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// ɾ˱¼ + public static void deleshenhe(Shenhe shenhe) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.delete(shenhe); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } + +// ͨѶϢ + public static List findTongxuns() { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + String strsql="from TongXunAdd"; + Query query = session.createQuery(strsql); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// ͨѶϢܼ¼ + public static int findTongXunCount() { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + intCount = Integer.parseInt((session.createQuery("select count(*)from TongXunAdd").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return intCount; + } +// ûǷá + public static List findTonName(String name) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from TongXunAdd as txa where txa.name11=:name"); + query.setString("name", name); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// idͨѶϢ + public static List findTonId(int intid) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from TongXunAdd as txa where txa.id=:intid"); + query.setInteger("intid",intid); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + + tx.rollback(); + } + return list; + } +//ͨѶϢ + public static void saveTongxun(TongXunAdd txa) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(txa); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// ͨѶϢ + public static void updateTongxun(TongXunAdd txa) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.update(txa); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// ɾͨѶϢ + public static void deleteTongxun(TongXunAdd txa) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.delete(txa); + tx.commit(); + hib.closeSession(session);; + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// ͨѶʾϢ + public static List findTongxun(int intname1) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); //session + tx = (Transaction) session.beginTransaction(); // + String strsql="select count(*) from TongXunAdd t,Tongxun T where T.id = t.name1 group by t.name1 having t.name1=:intname1"; + Query query = session.createQuery(strsql); + query.setInteger("intname1",intname1); //󶨲 + list = query.list(); //listִвѯ + tx.commit(); //ύ + hib.closeSession(session);; + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// ͨѶ򵥱Ϣ + public static void saveTx(Tongxun tongxun) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.save(tongxun); + tx.commit(); + hib.closeSession(session);; + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } + // ͨѶͷҳ + public static List findT(int intFrist,int intPages) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Tongxun"); + query.setFirstResult(intFrist); + query.setMaxResults(intPages); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// ͨѶͷҳ + public static List findT() { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); //ù෽session + tx = (Transaction) session.beginTransaction(); // + Query query = session.createQuery("from Tongxun"); //ѯͨѶм¼ + list = query.list(); //listִHQL + tx.commit(); //ύ + hib.closeSession(session); //ùеĹرsession + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } +// ͨѶܼ¼ + public static int findTCount() { + Transaction tx = null; + int intCount=0; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + intCount = Integer.parseInt(( session.createQuery("select count(*)from Tongxun").uniqueResult()).toString()); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return intCount; + } +// ͨѶͷ + public static List findT(int intId) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from Tongxun t where t.id=:intId"); + query.setInteger("intId", intId); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } + +// ޸ļ򵥱Ϣ + public static void updateTx(Tongxun tongxun) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.update(tongxun); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// ɾ򵥱Ϣ + public static void deleTx(Tongxun tongxun) { + Transaction tx = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + session.delete(tongxun); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + } +// ͨѶʾϢ + public static List findTX(int intid) { + Transaction tx = null; + List list = null; + try { + Session session = hib.openSession(); + tx = (Transaction) session.beginTransaction(); + Query query = session.createQuery("from TongXunAdd as txa where txa.name1=:intid"); + query.setInteger("intid",intid); + list = query.list(); + tx.commit(); + hib.closeSession(session); + } catch (Exception e) { + e.printStackTrace(); + tx.rollback(); + } + return list; + } + + } + + diff --git a/08/src/com/hiernate/util/Test.java b/08/src/com/hiernate/util/Test.java new file mode 100644 index 0000000..9010dea --- /dev/null +++ b/08/src/com/hiernate/util/Test.java @@ -0,0 +1,13 @@ +package com.hiernate.util; +public class Test { + public static void main(String args[]){ + int intmethod; //intͱ + for(int i = 0 ;i < 200 ;i++ ){ + intmethod = (int)( (((Math.random())*11))-1); //ǵ뷨Math.random()101ֵ֮ + if(intmethod == 10){ //intmethodǷ10صж + System.out.println("ok"); + } + System.out.print(intmethod+","); //ڿ̨ϴӡ鸳ֵǷ + } + } + } diff --git a/08/src/com/struts/action/FindMenuAction.java b/08/src/com/struts/action/FindMenuAction.java new file mode 100644 index 0000000..5ef59a7 --- /dev/null +++ b/08/src/com/struts/action/FindMenuAction.java @@ -0,0 +1,26 @@ +package com.struts.action; +import java.util.List; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.actions.DispatchAction; +import com.hiernate.persistence.Menu; +import com.hiernate.util.HibernateUtil; +//Ҳ˵action +public class FindMenuAction extends DispatchAction { + public ActionForward findMenu(ActionMapping arg0, ActionForm arg1, HttpServletRequest arg2, HttpServletResponse arg3) throws Exception { + List list = HibernateUtil.findMenu(0); //˵menuidΪ󶨲˵ + List menuIdlist = null; + if(!list.isEmpty() && list.size()>0){ + for(int i= 0;i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/.mymetadata b/09/.mymetadata new file mode 100644 index 0000000..bf7d676 --- /dev/null +++ b/09/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/09/.project b/09/.project new file mode 100644 index 0000000..40d4ec7 --- /dev/null +++ b/09/.project @@ -0,0 +1,50 @@ + + + 09 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/09/.settings/.jsdtscope b/09/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/09/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/09/.settings/org.eclipse.wst.jsdt.ui.superType.container b/09/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/09/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/09/.settings/org.eclipse.wst.jsdt.ui.superType.name b/09/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/09/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/09/WebRoot/BookMain.jsp b/09/WebRoot/BookMain.jsp new file mode 100644 index 0000000..5650b65 --- /dev/null +++ b/09/WebRoot/BookMain.jsp @@ -0,0 +1,52 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + Centered Sliding Doors Navigation at exploding-boy.com + + + + + + + \ No newline at end of file diff --git a/09/WebRoot/ChengjiMain.jsp b/09/WebRoot/ChengjiMain.jsp new file mode 100644 index 0000000..8c976c0 --- /dev/null +++ b/09/WebRoot/ChengjiMain.jsp @@ -0,0 +1,48 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + Centered Sliding Doors Navigation at exploding-boy.com + + + + + + + \ No newline at end of file diff --git a/09/WebRoot/Content.jsp b/09/WebRoot/Content.jsp new file mode 100644 index 0000000..a627d39 --- /dev/null +++ b/09/WebRoot/Content.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + ҳ + + + + + + + diff --git a/09/WebRoot/Database/db_school_Data.MDF b/09/WebRoot/Database/db_school_Data.MDF new file mode 100644 index 0000000..9ed26b2 Binary files /dev/null and b/09/WebRoot/Database/db_school_Data.MDF differ diff --git a/09/WebRoot/Database/db_school_Log.LDF b/09/WebRoot/Database/db_school_Log.LDF new file mode 100644 index 0000000..0a328d8 Binary files /dev/null and b/09/WebRoot/Database/db_school_Log.LDF differ diff --git a/09/WebRoot/DocMain.jsp b/09/WebRoot/DocMain.jsp new file mode 100644 index 0000000..9d88297 --- /dev/null +++ b/09/WebRoot/DocMain.jsp @@ -0,0 +1,47 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + Centered Sliding Doors Navigation at exploding-boy.com + + + + + + \ No newline at end of file diff --git a/09/WebRoot/JzgMain.jsp b/09/WebRoot/JzgMain.jsp new file mode 100644 index 0000000..e603cda --- /dev/null +++ b/09/WebRoot/JzgMain.jsp @@ -0,0 +1,51 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + Centered Sliding Doors Navigation at exploding-boy.com + + + + + + + diff --git a/09/WebRoot/Login.jsp b/09/WebRoot/Login.jsp new file mode 100644 index 0000000..d1b4b5b --- /dev/null +++ b/09/WebRoot/Login.jsp @@ -0,0 +1,48 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + ¼ + + +
    + +
    +

    + û + +

    +

    +     룺 + +

    +

    +    + +    + +

    +

    + ${message } +

    +
    +
    + + +

    + + ǰû${sessionScope.loginUser.name } +

    +

    + ˳ +

    +

    + ${message } +

    +
    +
    + + diff --git a/09/WebRoot/META-INF/MANIFEST.MF b/09/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..5e94951 --- /dev/null +++ b/09/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/09/WebRoot/SysInfo.jsp b/09/WebRoot/SysInfo.jsp new file mode 100644 index 0000000..12001b7 --- /dev/null +++ b/09/WebRoot/SysInfo.jsp @@ -0,0 +1,32 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + Centered Sliding Doors Navigation at exploding-boy.com + + + + + + + \ No newline at end of file diff --git a/09/WebRoot/SysMain.jsp b/09/WebRoot/SysMain.jsp new file mode 100644 index 0000000..c01d19e --- /dev/null +++ b/09/WebRoot/SysMain.jsp @@ -0,0 +1,51 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + Centered Sliding Doors Navigation at exploding-boy.com + + + + + + + diff --git a/09/WebRoot/UserManager.jsp b/09/WebRoot/UserManager.jsp new file mode 100644 index 0000000..5ef80e5 --- /dev/null +++ b/09/WebRoot/UserManager.jsp @@ -0,0 +1,34 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + Centered Sliding Doors Navigation at exploding-boy.com + + + + + + + \ No newline at end of file diff --git a/09/WebRoot/WEB-INF/BookLibrary_Config.xml b/09/WebRoot/WEB-INF/BookLibrary_Config.xml new file mode 100644 index 0000000..909a5bb --- /dev/null +++ b/09/WebRoot/WEB-INF/BookLibrary_Config.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + /bookview/bookReg + + + /bookview/bookService + + + /bookview/bookDetail + + + /bookview/bookBorrow + + + /bookview/borrowService + + + /bookview/bookReturn + + + + + /bookview/bookReturn + + + + + /bookview/bookBorrow + + + + + /bookview/bookReg + + + + + /bookview/borrowService + + + + + + + list + add + search + detail + modify + borrow + returnBook + borrowSearch + + + + diff --git a/09/WebRoot/WEB-INF/DocuStu_Config.xml b/09/WebRoot/WEB-INF/DocuStu_Config.xml new file mode 100644 index 0000000..e4529b2 --- /dev/null +++ b/09/WebRoot/WEB-INF/DocuStu_Config.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + docuview/doc_stuinfo_reg + + + + + docuview/doc_stuinfo_reglist + + + + + + listClass + listAllStu + listStuReg + createID + listStuModi + listStuModiSave + + listStuRegSerach + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/DocuTea_Config.xml b/09/WebRoot/WEB-INF/DocuTea_Config.xml new file mode 100644 index 0000000..5fe00ad --- /dev/null +++ b/09/WebRoot/WEB-INF/DocuTea_Config.xml @@ -0,0 +1,32 @@ + + + + + + + reg + service + search + + + + + + + + + + + + + + + + + /docuview/doc_tea_info_reg + + + diff --git a/09/WebRoot/WEB-INF/Hibernate_Config.xml b/09/WebRoot/WEB-INF/Hibernate_Config.xml new file mode 100644 index 0000000..9feecae --- /dev/null +++ b/09/WebRoot/WEB-INF/Hibernate_Config.xml @@ -0,0 +1,60 @@ + + + + + + com.microsoft.sqlserver.jdbc.SQLServerDriver + + + jdbc:sqlserver://192.168.1.199:1433;DatabaseName=db_school + + + sa + + + 111 + + + + + + + + + classpath:com/hibernate/model + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED,readOnly + + + + diff --git a/09/WebRoot/WEB-INF/SourceStu_Config.xml b/09/WebRoot/WEB-INF/SourceStu_Config.xml new file mode 100644 index 0000000..373b1ac --- /dev/null +++ b/09/WebRoot/WEB-INF/SourceStu_Config.xml @@ -0,0 +1,43 @@ + + + + + + + + reg + search + ClassSourceList + GradeSourceList + + + + + + + + + + + + + + + + + + + + + + sourceview/doc_stusource_input + + + + + + diff --git a/09/WebRoot/WEB-INF/System_Config.xml b/09/WebRoot/WEB-INF/System_Config.xml new file mode 100644 index 0000000..82d9dcc --- /dev/null +++ b/09/WebRoot/WEB-INF/System_Config.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + CodeList + CodeQuery + CodeDel + + + + + + + + + + + + + + systemview/sys_code_class + + + + + + + + + + + assignCourse + + + assignCharge + + + searchCharge + + + searchTeaCourse + + + + + + + + + + + + + + + + + systemInfo/copyright + + + + + systemInfo/technic + + + + + + + + + + + + userManager/addUser + + + + + userManager/userSearch + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/View_Config.xml b/09/WebRoot/WEB-INF/View_Config.xml new file mode 100644 index 0000000..1744477 --- /dev/null +++ b/09/WebRoot/WEB-INF/View_Config.xml @@ -0,0 +1,71 @@ + + + + + + + org.springframework.web.servlet.view.JstlView + + + / + + + .jsp + + + + + + + + stuinfcontroller + studentReg + infoListController + infoListController + studentRegList + infoListController + infoListController + infoListController + infoListController + + + teaLoader + teaRegController + + + syscodecontroller + codeSetControl + CodeClass + + + BookManager + bookReturn + bookBorrow + bookReg + borrowService + + + CjLoader + CjRegBatchController + CjLoader + + + EmployeeLoader + + + copyright + technic + + + login + + + addUser + addUserController + userSearch + searchUserController + + + + diff --git a/09/WebRoot/WEB-INF/c.tld b/09/WebRoot/WEB-INF/c.tld new file mode 100644 index 0000000..eeef5a7 --- /dev/null +++ b/09/WebRoot/WEB-INF/c.tld @@ -0,0 +1,563 @@ + + + + + JSTL 1.1 core library + JSTL core + 1.1 + c + http://java.sun.com/jsp/jstl/core + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + + + + Catches any Throwable that occurs in its body and optionally + exposes it. + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + +Name of the exported scoped variable for the +exception thrown from a nested action. The type of the +scoped variable is the type of the exception thrown. + + var + false + false + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + +The test condition that determines whether or +not the body content should be processed. + + test + true + true + boolean + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + +The URL of the resource to import. + + url + true + true + + + +Name of the exported scoped variable for the +resource's content. The type of the scoped +variable is String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Name of the exported scoped variable for the +resource's content. The type of the scoped +variable is Reader. + + varReader + false + false + + + +Name of the context when accessing a relative +URL resource that belongs to a foreign +context. + + context + false + true + + + +Character encoding of the content at the input +resource. + + charEncoding + false + true + + + + + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + +Collection of items to iterate over. + + items + false + true + java.lang.Object + + + +If items specified: +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. +If items not specified: +Iteration begins with index set at the value +specified. + + begin + false + true + int + + + +If items specified: +Iteration ends at the item located at the +specified index (inclusive). +If items not specified: +Iteration ends when index reaches the value +specified. + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. Its type depends +on the object of the underlying collection. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Iterates over tokens, separated by the supplied delimeters + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + +String of tokens to iterate over. + + items + true + true + java.lang.String + + + +The set of delimiters (the characters that +separate the tokens in the string). + + delims + true + true + java.lang.String + + + +Iteration begins at the token located at the +specified index. First token has index 0. + + begin + false + true + int + + + +Iteration ends at the token located at the +specified index (inclusive). + + end + false + true + int + + + +Iteration will only process every step tokens +of the string, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of +type +javax.servlet.jsp.jstl.core.LoopTag +Status. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Like <%= ... >, but for expressions. + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + +Expression to be evaluated. + + value + true + true + + + +Default value if the resulting value is null. + + default + false + true + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default value is +true. + + escapeXml + false + true + + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'import' tag's URL. + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + +Name of the query string parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Redirects to a new URL. + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + +The URL of the resource to redirect to. + + url + false + true + + + +Name of the context when redirecting to a relative URL +resource that belongs to a foreign context. + + context + false + true + + + + + + Removes a scoped variable (from a particular scope, if specified). + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + +Name of the scoped variable to be removed. + + var + true + false + + + +Scope for var. + + scope + false + false + + + + + + Sets the result of an expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + +Name of the exported scoped variable to hold the value +specified in the action. The type of the scoped variable is +whatever type the value expression evaluates to. + + var + false + false + + + +Expression to be evaluated. + + value + false + true + + + +Target object whose property will be set. Must evaluate to +a JavaBeans object with setter property property, or to a +java.util.Map object. + + target + false + true + + + +Name of the property to be set in the target object. + + property + false + true + + + +Scope for var. + + scope + false + false + + + + + + Creates a URL with optional query parameters. + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + +Name of the exported scoped variable for the +processed url. The type of the scoped variable is +String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +URL to be processed. + + value + false + true + + + +Name of the context when specifying a relative URL +resource that belongs to a foreign context. + + context + false + true + + + + + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + +The test condition that determines whether or not the +body content should be processed. + + test + true + true + boolean + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/dao/DAOSupport.class b/09/WebRoot/WEB-INF/classes/com/hibernate/dao/DAOSupport.class new file mode 100644 index 0000000..e697a69 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/dao/DAOSupport.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookBorrowInfo.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookBorrowInfo.class new file mode 100644 index 0000000..b15fdb8 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookBorrowInfo.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookBorrowInfo.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookBorrowInfo.hbm.xml new file mode 100644 index 0000000..a9655b1 --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookBorrowInfo.hbm.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookReginster.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookReginster.class new file mode 100644 index 0000000..46b6459 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookReginster.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookReginster.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookReginster.hbm.xml new file mode 100644 index 0000000..1bcf002 --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/BookReginster.hbm.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/CourseStuInfo.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/CourseStuInfo.class new file mode 100644 index 0000000..43380cc Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/CourseStuInfo.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/CourseStuInfo.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/CourseStuInfo.hbm.xml new file mode 100644 index 0000000..14c8769 --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/CourseStuInfo.hbm.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuInfo.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuInfo.class new file mode 100644 index 0000000..5ccd15b Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuInfo.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuInfo.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuInfo.hbm.xml new file mode 100644 index 0000000..69af03a --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuInfo.hbm.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuRegister.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuRegister.class new file mode 100644 index 0000000..abf3542 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuRegister.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuRegister.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuRegister.hbm.xml new file mode 100644 index 0000000..3b8d710 --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuStuRegister.hbm.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuTeaInfo.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuTeaInfo.class new file mode 100644 index 0000000..bf694df Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuTeaInfo.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuTeaInfo.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuTeaInfo.hbm.xml new file mode 100644 index 0000000..e681ed3 --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/DocuTeaInfo.hbm.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCharge.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCharge.class new file mode 100644 index 0000000..7b53bd9 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCharge.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCharge.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCharge.hbm.xml new file mode 100644 index 0000000..8360540 --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCharge.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCourse.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCourse.class new file mode 100644 index 0000000..dd42ffb Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCourse.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCourse.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCourse.hbm.xml new file mode 100644 index 0000000..5695e01 --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/EmplAssignCourse.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/Login.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/Login.class new file mode 100644 index 0000000..d97eda8 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/Login.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/Login.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/Login.hbm.xml new file mode 100644 index 0000000..0e89178 --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/Login.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemClassInfo.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemClassInfo.class new file mode 100644 index 0000000..8bb6da7 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemClassInfo.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemClassInfo.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemClassInfo.hbm.xml new file mode 100644 index 0000000..5dea1fd --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemClassInfo.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemClassInfoList.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemClassInfoList.class new file mode 100644 index 0000000..e034f90 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemClassInfoList.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemCourseCode.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemCourseCode.class new file mode 100644 index 0000000..232fbfc Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemCourseCode.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemCourseCode.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemCourseCode.hbm.xml new file mode 100644 index 0000000..224a7b7 --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemCourseCode.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemGradeCode.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemGradeCode.class new file mode 100644 index 0000000..92f0407 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemGradeCode.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemGradeCode.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemGradeCode.hbm.xml new file mode 100644 index 0000000..d9daf2c --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemGradeCode.hbm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemSpecialtyCode.class b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemSpecialtyCode.class new file mode 100644 index 0000000..7842e1c Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemSpecialtyCode.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemSpecialtyCode.hbm.xml b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemSpecialtyCode.hbm.xml new file mode 100644 index 0000000..60f4ab5 --- /dev/null +++ b/09/WebRoot/WEB-INF/classes/com/hibernate/model/SystemSpecialtyCode.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/AddUserController.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/AddUserController.class new file mode 100644 index 0000000..feac6c7 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/AddUserController.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/BookManager.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/BookManager.class new file mode 100644 index 0000000..4711a21 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/BookManager.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/DateEditor.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/DateEditor.class new file mode 100644 index 0000000..0513697 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/DateEditor.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/EmployeeLoader.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/EmployeeLoader.class new file mode 100644 index 0000000..bf4dabd Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/EmployeeLoader.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/InfoListController.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/InfoListController.class new file mode 100644 index 0000000..f6ef469 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/InfoListController.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/LoginController.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/LoginController.class new file mode 100644 index 0000000..547ccb8 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/LoginController.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/SearchUser.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/SearchUser.class new file mode 100644 index 0000000..9482e38 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/SearchUser.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/SourceAddBatch.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/SourceAddBatch.class new file mode 100644 index 0000000..d2ed6ba Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/SourceAddBatch.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/SourceInfoList.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/SourceInfoList.class new file mode 100644 index 0000000..276316f Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/SourceInfoList.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/SourceLoader.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/SourceLoader.class new file mode 100644 index 0000000..610660e Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/SourceLoader.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/StuInfoController.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/StuInfoController.class new file mode 100644 index 0000000..f18162e Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/StuInfoController.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/SysCodeForm.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/SysCodeForm.class new file mode 100644 index 0000000..ebc34e3 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/SysCodeForm.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/SystemClassControl.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/SystemClassControl.class new file mode 100644 index 0000000..8420b30 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/SystemClassControl.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/SystemCodeControl.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/SystemCodeControl.class new file mode 100644 index 0000000..0e3c8f6 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/SystemCodeControl.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/TeaInfoController.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/TeaInfoController.class new file mode 100644 index 0000000..6a976d1 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/TeaInfoController.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/TeaLoader.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/TeaLoader.class new file mode 100644 index 0000000..1d19832 Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/TeaLoader.class differ diff --git a/09/WebRoot/WEB-INF/classes/com/spring/controller/TeaRegLoader.class b/09/WebRoot/WEB-INF/classes/com/spring/controller/TeaRegLoader.class new file mode 100644 index 0000000..70871ba Binary files /dev/null and b/09/WebRoot/WEB-INF/classes/com/spring/controller/TeaRegLoader.class differ diff --git a/09/WebRoot/WEB-INF/employee_Config.xml b/09/WebRoot/WEB-INF/employee_Config.xml new file mode 100644 index 0000000..75c527d --- /dev/null +++ b/09/WebRoot/WEB-INF/employee_Config.xml @@ -0,0 +1,34 @@ + + + + + + + + + assignCourse + + + assignCharge + + + searchCharge + + + searchTeaCourse + + + + + + + + + + + + + diff --git a/09/WebRoot/WEB-INF/lib/ant-1.6.5.jar b/09/WebRoot/WEB-INF/lib/ant-1.6.5.jar new file mode 100644 index 0000000..3beb3b8 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/ant-1.6.5.jar differ diff --git a/09/WebRoot/WEB-INF/lib/ant-antlr-1.6.5.jar b/09/WebRoot/WEB-INF/lib/ant-antlr-1.6.5.jar new file mode 100644 index 0000000..167ac03 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/ant-antlr-1.6.5.jar differ diff --git a/09/WebRoot/WEB-INF/lib/ant-junit-1.6.5.jar b/09/WebRoot/WEB-INF/lib/ant-junit-1.6.5.jar new file mode 100644 index 0000000..5ee4f7f Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/ant-junit-1.6.5.jar differ diff --git a/09/WebRoot/WEB-INF/lib/ant-launcher-1.6.5.jar b/09/WebRoot/WEB-INF/lib/ant-launcher-1.6.5.jar new file mode 100644 index 0000000..1a71612 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/ant-launcher-1.6.5.jar differ diff --git a/09/WebRoot/WEB-INF/lib/ant-swing-1.6.5.jar b/09/WebRoot/WEB-INF/lib/ant-swing-1.6.5.jar new file mode 100644 index 0000000..c85ec08 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/ant-swing-1.6.5.jar differ diff --git a/09/WebRoot/WEB-INF/lib/antlr-2.7.6rc1.jar b/09/WebRoot/WEB-INF/lib/antlr-2.7.6rc1.jar new file mode 100644 index 0000000..f83e310 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/antlr-2.7.6rc1.jar differ diff --git a/09/WebRoot/WEB-INF/lib/asm-attrs.jar b/09/WebRoot/WEB-INF/lib/asm-attrs.jar new file mode 100644 index 0000000..f07bcb2 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/asm-attrs.jar differ diff --git a/09/WebRoot/WEB-INF/lib/asm.jar b/09/WebRoot/WEB-INF/lib/asm.jar new file mode 100644 index 0000000..ee0c7cc Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/asm.jar differ diff --git a/09/WebRoot/WEB-INF/lib/c3p0-0.9.0.jar b/09/WebRoot/WEB-INF/lib/c3p0-0.9.0.jar new file mode 100644 index 0000000..a99c36d Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/c3p0-0.9.0.jar differ diff --git a/09/WebRoot/WEB-INF/lib/cglib-2.1.3.jar b/09/WebRoot/WEB-INF/lib/cglib-2.1.3.jar new file mode 100644 index 0000000..ddfbdb0 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/cglib-2.1.3.jar differ diff --git a/09/WebRoot/WEB-INF/lib/cleanimports.jar b/09/WebRoot/WEB-INF/lib/cleanimports.jar new file mode 100644 index 0000000..25a00f6 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/cleanimports.jar differ diff --git a/09/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar b/09/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar new file mode 100644 index 0000000..3272f2b Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/commons-collections-2.1.1.jar differ diff --git a/09/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar b/09/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar new file mode 100644 index 0000000..b73a80f Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/commons-logging-1.0.4.jar differ diff --git a/09/WebRoot/WEB-INF/lib/commons-logging.jar b/09/WebRoot/WEB-INF/lib/commons-logging.jar new file mode 100644 index 0000000..2ff9bbd Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/commons-logging.jar differ diff --git a/09/WebRoot/WEB-INF/lib/concurrent-1.3.2.jar b/09/WebRoot/WEB-INF/lib/concurrent-1.3.2.jar new file mode 100644 index 0000000..a08c3ba Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/concurrent-1.3.2.jar differ diff --git a/09/WebRoot/WEB-INF/lib/connector.jar b/09/WebRoot/WEB-INF/lib/connector.jar new file mode 100644 index 0000000..438c315 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/connector.jar differ diff --git a/09/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar b/09/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..c8c4dbb Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/09/WebRoot/WEB-INF/lib/ehcache-1.1.jar b/09/WebRoot/WEB-INF/lib/ehcache-1.1.jar new file mode 100644 index 0000000..2bda916 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/ehcache-1.1.jar differ diff --git a/09/WebRoot/WEB-INF/lib/hibernate3.jar b/09/WebRoot/WEB-INF/lib/hibernate3.jar new file mode 100644 index 0000000..43a9938 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/hibernate3.jar differ diff --git a/09/WebRoot/WEB-INF/lib/jaas.jar b/09/WebRoot/WEB-INF/lib/jaas.jar new file mode 100644 index 0000000..92216c0 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/jaas.jar differ diff --git a/09/WebRoot/WEB-INF/lib/jacc-1_0-fr.jar b/09/WebRoot/WEB-INF/lib/jacc-1_0-fr.jar new file mode 100644 index 0000000..82d8f0d Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/jacc-1_0-fr.jar differ diff --git a/09/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar b/09/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar new file mode 100644 index 0000000..c773f85 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar differ diff --git a/09/WebRoot/WEB-INF/lib/jboss-cache.jar b/09/WebRoot/WEB-INF/lib/jboss-cache.jar new file mode 100644 index 0000000..b8e7b4d Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/jboss-cache.jar differ diff --git a/09/WebRoot/WEB-INF/lib/jboss-common.jar b/09/WebRoot/WEB-INF/lib/jboss-common.jar new file mode 100644 index 0000000..7e5de18 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/jboss-common.jar differ diff --git a/09/WebRoot/WEB-INF/lib/jboss-jmx.jar b/09/WebRoot/WEB-INF/lib/jboss-jmx.jar new file mode 100644 index 0000000..355d440 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/jboss-jmx.jar differ diff --git a/09/WebRoot/WEB-INF/lib/jboss-system.jar b/09/WebRoot/WEB-INF/lib/jboss-system.jar new file mode 100644 index 0000000..441674b Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/jboss-system.jar differ diff --git a/09/WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar b/09/WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar new file mode 100644 index 0000000..ddafa13 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar differ diff --git a/09/WebRoot/WEB-INF/lib/jgroups-2.2.8.jar b/09/WebRoot/WEB-INF/lib/jgroups-2.2.8.jar new file mode 100644 index 0000000..e55365c Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/jgroups-2.2.8.jar differ diff --git a/09/WebRoot/WEB-INF/lib/jstl.jar b/09/WebRoot/WEB-INF/lib/jstl.jar new file mode 100644 index 0000000..a02abec Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/jstl.jar differ diff --git a/09/WebRoot/WEB-INF/lib/jta.jar b/09/WebRoot/WEB-INF/lib/jta.jar new file mode 100644 index 0000000..e0822a9 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/jta.jar differ diff --git a/09/WebRoot/WEB-INF/lib/junit-3.8.1.jar b/09/WebRoot/WEB-INF/lib/junit-3.8.1.jar new file mode 100644 index 0000000..674d71e Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/junit-3.8.1.jar differ diff --git a/09/WebRoot/WEB-INF/lib/log4j-1.2.11.jar b/09/WebRoot/WEB-INF/lib/log4j-1.2.11.jar new file mode 100644 index 0000000..b603fe6 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/log4j-1.2.11.jar differ diff --git a/09/WebRoot/WEB-INF/lib/oscache-2.1.jar b/09/WebRoot/WEB-INF/lib/oscache-2.1.jar new file mode 100644 index 0000000..4496a88 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/oscache-2.1.jar differ diff --git a/09/WebRoot/WEB-INF/lib/proxool-0.8.3.jar b/09/WebRoot/WEB-INF/lib/proxool-0.8.3.jar new file mode 100644 index 0000000..c4f700c Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/proxool-0.8.3.jar differ diff --git a/09/WebRoot/WEB-INF/lib/spring.jar b/09/WebRoot/WEB-INF/lib/spring.jar new file mode 100644 index 0000000..477af64 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/spring.jar differ diff --git a/09/WebRoot/WEB-INF/lib/sqljdbc.jar b/09/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/09/WebRoot/WEB-INF/lib/standard.jar b/09/WebRoot/WEB-INF/lib/standard.jar new file mode 100644 index 0000000..bc528ac Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/standard.jar differ diff --git a/09/WebRoot/WEB-INF/lib/swarmcache-1.0rc2.jar b/09/WebRoot/WEB-INF/lib/swarmcache-1.0rc2.jar new file mode 100644 index 0000000..f0cb0d0 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/swarmcache-1.0rc2.jar differ diff --git a/09/WebRoot/WEB-INF/lib/syndiag2.jar b/09/WebRoot/WEB-INF/lib/syndiag2.jar new file mode 100644 index 0000000..e1e76c8 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/syndiag2.jar differ diff --git a/09/WebRoot/WEB-INF/lib/versioncheck.jar b/09/WebRoot/WEB-INF/lib/versioncheck.jar new file mode 100644 index 0000000..bf9e33e Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/versioncheck.jar differ diff --git a/09/WebRoot/WEB-INF/lib/xerces-2.6.2.jar b/09/WebRoot/WEB-INF/lib/xerces-2.6.2.jar new file mode 100644 index 0000000..14c3162 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/xerces-2.6.2.jar differ diff --git a/09/WebRoot/WEB-INF/lib/xml-apis.jar b/09/WebRoot/WEB-INF/lib/xml-apis.jar new file mode 100644 index 0000000..6ba4ff8 Binary files /dev/null and b/09/WebRoot/WEB-INF/lib/xml-apis.jar differ diff --git a/09/WebRoot/WEB-INF/web.xml b/09/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..7340041 --- /dev/null +++ b/09/WebRoot/WEB-INF/web.xml @@ -0,0 +1,30 @@ + + + + dispatcherServlet + + org.springframework.web.servlet.DispatcherServlet + + + contextConfigLocation + + /WEB-INF/View_Config.xml, + /WEB-INF/Hibernate_Config.xml, + /WEB-INF/System_Config.xml, + /WEB-INF/DocuStu_Config.xml, + /WEB-INF/DocuTea_Config.xml, + /WEB-INF/BookLibrary_Config.xml, + /WEB-INF/SourceStu_Config.xml, + /WEB-INF/employee_Config.xml + + + 1 + + + dispatcherServlet + *.htm + + diff --git a/09/WebRoot/bookview/bookBorrow.jsp b/09/WebRoot/bookview/bookBorrow.jsp new file mode 100644 index 0000000..576f9e3 --- /dev/null +++ b/09/WebRoot/bookview/bookBorrow.jsp @@ -0,0 +1,134 @@ +<%@ page language="java" pageEncoding="gbk"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + ͼά + + + + + + + + + + +
    + + + + +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +  ѧ ţ + +   + +  ѧ + +   +
    +   ţ + +   + +   + +   + +
    +   ߣ +   + +  ƣ + +   + +
    +   Ա + +   +   ۣ + +   + + (Ԫ)
    +  ͼ飺 + +   + +
    + +   + +
    +
    +
    + + + + + + + + + + + + + + + + +
    ѧ
    ${list.docuStuInfo.stuId }
    ${info.stu.name }
    ${list.bookReginster.bookId }
    ${list.bookName }
    ${list.borrowDate }
    + + diff --git a/09/WebRoot/bookview/bookDetail.jsp b/09/WebRoot/bookview/bookDetail.jsp new file mode 100644 index 0000000..17756d0 --- /dev/null +++ b/09/WebRoot/bookview/bookDetail.jsp @@ -0,0 +1,141 @@ +<%@ page language="java" import="java.util.*" pageEncoding="gbk"%> + + + ͼά + + + + + + + + +
    + + + + +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +   ţ + +   + + +   + +   + +
    +   ߣ + +   + + +  ƣ + +   + +
    +    磺 + +   + + +  ڣ + +   + +
    +   Ա + +   + + +   + +   + + (Ԫ) +
    +   + +   + + +  ʱ䣺 + +   + +
    +  ͼ飺 + +   + +
    + +   + +
    +
    +
    + + diff --git a/09/WebRoot/bookview/bookReg.jsp b/09/WebRoot/bookview/bookReg.jsp new file mode 100644 index 0000000..0af0c22 --- /dev/null +++ b/09/WebRoot/bookview/bookReg.jsp @@ -0,0 +1,141 @@ +<%@ page pageEncoding="gb2312" import="java.sql.Date" language="java"%> + + + + ͼǼ + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +   ţ + +   + + +   + +   + +
    +   ߣ + +   + + +  ƣ + +   + +
    +    磺 + +   + + +  ڣ + +   + +
    +   Ա + +   + + +   + +   + + (Ԫ) +
    +   + +   + + +  ʱ䣺 + +   + +
    +  ͼ飺 + +   + +
    + +   + +
    +
    +
    + ${result } +
    + + diff --git a/09/WebRoot/bookview/bookReturn.jsp b/09/WebRoot/bookview/bookReturn.jsp new file mode 100644 index 0000000..c3cc0e8 --- /dev/null +++ b/09/WebRoot/bookview/bookReturn.jsp @@ -0,0 +1,153 @@ +<%@ page language="java" pageEncoding="gbk"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + ͼ黹 + + + + + + + + + +
    + + + + +
    +
    +

    + + +

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +  ѧ ţ + +   + + +  ѧ + +   + +
    +   ţ + +   + + +   + +   + +
    +  ڣ + +    + +
    + +   + +
    +
    + + + + + + + + + + + + + + + + + +
    +
    + ѧ +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + ${list.docuStuInfo.stuId} +
    +
    +
    + ${info.stu.name } +
    +
    +
    + ${list.bookReginster.bookId } +
    +
    +
    + ${list.bookName } +
    +
    +
    + ${list.borrowDate } +
    +
    +
    +
    + + diff --git a/09/WebRoot/bookview/bookService.jsp b/09/WebRoot/bookview/bookService.jsp new file mode 100644 index 0000000..1cf409b --- /dev/null +++ b/09/WebRoot/bookview/bookService.jsp @@ -0,0 +1,46 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" pageEncoding="GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + ͼ鳬 + + + + + + + + +
    +
    +

    +
    + + +
    +
    ѯ +
    + + +
    + + + + + + + + + + + + + + + +
    ά
    ${book.bookId } 
    ${book.bookName } 
    ${book.bookConcern } 
    ${book.price } 
    ${book.bookCount } 
    + diff --git a/09/WebRoot/bookview/borrowService.jsp b/09/WebRoot/bookview/borrowService.jsp new file mode 100644 index 0000000..63cbfe6 --- /dev/null +++ b/09/WebRoot/bookview/borrowService.jsp @@ -0,0 +1,122 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" + pageEncoding="GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + ͼ鳬 + + + + + +

    +   +

    +

    + +

    + + + + +
    +
    + ѯ + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + +
    +
    + ѧ +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + Ա +
    +
    +
    + ${list.docuStuInfo.stuId }  +
    +
    +
    + ${list.bookReginster.bookId }  +
    +
    +
    + ${list.bookName }  +
    +
    +
    + ${list.price }  +
    +
    +
    + ${list.borrowDate }  +
    +
    +
    + ${list.czy }  +
    +
    +
    + + diff --git a/09/WebRoot/css/Thumbs.db b/09/WebRoot/css/Thumbs.db new file mode 100644 index 0000000..12a0ccd Binary files /dev/null and b/09/WebRoot/css/Thumbs.db differ diff --git a/09/WebRoot/css/images/Thumbs.db b/09/WebRoot/css/images/Thumbs.db new file mode 100644 index 0000000..fb7ff8b Binary files /dev/null and b/09/WebRoot/css/images/Thumbs.db differ diff --git a/09/WebRoot/css/images/button_03.gif b/09/WebRoot/css/images/button_03.gif new file mode 100644 index 0000000..c43d69f Binary files /dev/null and b/09/WebRoot/css/images/button_03.gif differ diff --git a/09/WebRoot/css/left.css b/09/WebRoot/css/left.css new file mode 100644 index 0000000..09693ac --- /dev/null +++ b/09/WebRoot/css/left.css @@ -0,0 +1,42 @@ +body { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin: 0; + font-size: 80%; + font-weight: bold; + background-image:url(leftBackImg.jpg); + } + +ul { + margin: 0; + padding: 0; + padding-top: 50px; + } + +/* =-=-=-=-=-=-=-[Menu Three]-=-=-=-=-=-=-=- */ + +#menu3 { + width: 217px; + margin: 10px; + } + +#menu3 li a { + voice-family: "\"}\""; + voice-family: inherit; + height: 30px; + text-decoration: none; + } + +#menu3 li a:link, #menu3 li a:visited { + color: #888; + display: block; + background: url(menu3.gif); + padding: 8px 0 0 30px; + padding-right: 35px; + } + +#menu3 li a:hover, #menu3 li #current, #menu3 li a:active { + color: #283A50; + background: url(menu3.gif) 0 -32px; + padding: 8px 0 0 30px; + padding-right: 35px; + } \ No newline at end of file diff --git a/09/WebRoot/css/leftBackImg.jpg b/09/WebRoot/css/leftBackImg.jpg new file mode 100644 index 0000000..3c8e639 Binary files /dev/null and b/09/WebRoot/css/leftBackImg.jpg differ diff --git a/09/WebRoot/css/main.css b/09/WebRoot/css/main.css new file mode 100644 index 0000000..829aca9 --- /dev/null +++ b/09/WebRoot/css/main.css @@ -0,0 +1,81 @@ +body { + background: #F3FAFF; + color: #000; + font: 12px Verdana, Arial, Helvetica, sans-serif; + margin: 0; + padding: 0; +} +a:link, a:visited { + color: #FF2A84; + text-decoration: underline; +} +a:hover, a:active { + color: #FFF; + text-decoration: none; + background: #FF2A84; +} +#navigation { + background-image: url("mainBackImg.jpg"); + /* border-bottom: 1px solid #A1A1A1; + margin: 1em 0 0;*/ + padding: 0.7em 0 0; + font-weight: bold; +} +#navigation ul, #navigation ul li { + list-style: none; + margin: 0; + padding: 0; +} +#navigation ul { + padding: 5px 0 5px; + text-align: center; +} +#navigation ul li { + display: inline; +} +#navigation ul li a { + background: url(tableft.gif) no-repeat left top; + color: #FFF; + text-decoration: none; + padding: 5px 0; +} +#navigation ul li span { + background: url(tabright.gif) no-repeat right top; + padding: 5px 7px 5px 3px; + margin: 4px 0 4px 4px; +} +#navigation ul li a:hover span { + text-decoration: underline; + background-position: 100% -75px; +} +#navigation ul li a:hover { + background-position: 0 -75px; +} +#navigation #current a { + background-position: 0 -150px; +} +#navigation #current a span { + background-position: 100% -150px; +} + + +/*- Internet Explorer...It's Hacktastic!--------------------------- */ + +/*\*//*/ +#navigation ul li a { + display: inline-block; + white-space: nowrap; + width: 1px; +} + +#navigation ul { + padding-bottom: 0; + margin-bottom: -1px; +} +/**/ + +/*\*/ +* html #navigation ul li a { + padding: 0; +} +/**/ \ No newline at end of file diff --git a/09/WebRoot/css/mainBackImg.jpg b/09/WebRoot/css/mainBackImg.jpg new file mode 100644 index 0000000..ef0cc14 Binary files /dev/null and b/09/WebRoot/css/mainBackImg.jpg differ diff --git a/09/WebRoot/css/menu3.gif b/09/WebRoot/css/menu3.gif new file mode 100644 index 0000000..5db825f Binary files /dev/null and b/09/WebRoot/css/menu3.gif differ diff --git a/09/WebRoot/css/pageBackImg.jpg b/09/WebRoot/css/pageBackImg.jpg new file mode 100644 index 0000000..22f8f4f Binary files /dev/null and b/09/WebRoot/css/pageBackImg.jpg differ diff --git a/09/WebRoot/css/style.css b/09/WebRoot/css/style.css new file mode 100644 index 0000000..fa3cd46 --- /dev/null +++ b/09/WebRoot/css/style.css @@ -0,0 +1,60 @@ + + \ No newline at end of file diff --git a/09/WebRoot/css/tableft.gif b/09/WebRoot/css/tableft.gif new file mode 100644 index 0000000..ca8907b Binary files /dev/null and b/09/WebRoot/css/tableft.gif differ diff --git a/09/WebRoot/css/tabright.gif b/09/WebRoot/css/tabright.gif new file mode 100644 index 0000000..a34ef54 Binary files /dev/null and b/09/WebRoot/css/tabright.gif differ diff --git a/09/WebRoot/docuview/doc_stuinfo_input.jsp b/09/WebRoot/docuview/doc_stuinfo_input.jsp new file mode 100644 index 0000000..5629607 --- /dev/null +++ b/09/WebRoot/docuview/doc_stuinfo_input.jsp @@ -0,0 +1,97 @@ +<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + + + +
    +   +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ѧ༶ + +
    ѧ + ѧ +
    ѧԱ + + + Ů ѧ +
    ֤ + +
    ַͥ + ͥ绰 +
    ò + + + ״ + +
    + +     + +
    +
    + +
    ${messages['msg']}
    + + + diff --git a/09/WebRoot/docuview/doc_stuinfo_modify.jsp b/09/WebRoot/docuview/doc_stuinfo_modify.jsp new file mode 100644 index 0000000..383653c --- /dev/null +++ b/09/WebRoot/docuview/doc_stuinfo_modify.jsp @@ -0,0 +1,78 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + +
    +   +
    ѯ: +
    + + + + + + + + + + + + + + + + + + + +
    ѧ
    ѧ
    ֤
    ַͥ
    ûѡ
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    + ά +
    + + + diff --git a/09/WebRoot/docuview/doc_stuinfo_modify_save.jsp b/09/WebRoot/docuview/doc_stuinfo_modify_save.jsp new file mode 100644 index 0000000..39c6874 --- /dev/null +++ b/09/WebRoot/docuview/doc_stuinfo_modify_save.jsp @@ -0,0 +1,94 @@ +<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + + ѧϢ¼ + + +
    +   +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ѧ + ѧ +
    ѧԱ + + checked="yes"> + checked="yes">Ůѧ +
    ֤ + +
    ַͥ + ͥ绰 +
    ò + + + ״ + +
    + + + +
    +
    + + + +
    ${msg}
    \ No newline at end of file diff --git a/09/WebRoot/docuview/doc_stuinfo_reg.jsp b/09/WebRoot/docuview/doc_stuinfo_reg.jsp new file mode 100644 index 0000000..8a0b049 --- /dev/null +++ b/09/WebRoot/docuview/doc_stuinfo_reg.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + + + + +
    +   +
    + + + +
    ѧ + + + +
    +
    + +

    + + + + + + + + + + + + + + + + + + + + + + + +
    ѧ
    רҵ ѧ
    ѧ
    + + +
    +

    ${messages.msg}
    + + ${sysMsgInf} + + \ No newline at end of file diff --git a/09/WebRoot/docuview/doc_stuinfo_reglist.jsp b/09/WebRoot/docuview/doc_stuinfo_reglist.jsp new file mode 100644 index 0000000..0906435 --- /dev/null +++ b/09/WebRoot/docuview/doc_stuinfo_reglist.jsp @@ -0,0 +1,96 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + +
    +   +
    ѯֶ: + + : + +
    + + + + + + + + + + + + + + + + + + + + + +
    ѧ
    ѧ
    ֤
    ѧ
    ¼ȡ
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +

     

    +
    ${msg}
    + + + diff --git a/09/WebRoot/docuview/doc_tea_info_reg.jsp b/09/WebRoot/docuview/doc_tea_info_reg.jsp new file mode 100644 index 0000000..a48a13a --- /dev/null +++ b/09/WebRoot/docuview/doc_tea_info_reg.jsp @@ -0,0 +1,197 @@ +<%@ page language="java" contentType="text/html; charset=GBK" + pageEncoding="GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + + + Insert title here + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +   +
    + ʦ + + + + + + +
    + Ա + + + + + +
    + +
    +
    + + + + + + +
    + +
    +
    + ò + + + + + + +
    + ѧ + + + + + + +
    + ֤ + + + + ϵ绰 + + +
    + + + + + ڿרҵ + + +
    + + + +
    +   + +   + + + + +
    +
    + +
    + ʦ${info.name } ӳɹ + ʦΪ${info.teaId } +
    +
    + +

    + 棺${alert } +

    +
    +
    + +

    +   +

    +

    +   +

    +

    +   +

    +

    +   +

    +

    + δ¼Ȩ޲µ¼ϵͳ +

    +
    + + diff --git a/09/WebRoot/docuview/teaDocuModify.jsp b/09/WebRoot/docuview/teaDocuModify.jsp new file mode 100644 index 0000000..cf01914 --- /dev/null +++ b/09/WebRoot/docuview/teaDocuModify.jsp @@ -0,0 +1,214 @@ +<%@ page language="java" contentType="text/html; charset=GBK" + pageEncoding="GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + + ޸Ľʦ + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +   +
    + ʦ + + + + + + +
    + Ա + + + + + +
    + +
    +
    + + + + + + +
    + +
    +
    + ò + + + + + + +
    + ѧ + + + + + + +
    + ֤ + + + + ϵ绰 + + +
    + + + + + ڿרҵ + + +
    + ʦţ + + + + +
    + + + +
    +   + + +   + + + + + +
    +
    +
    + +

    +   +

    +

    +   +

    +

    +   +

    +

    +   +

    +

    + δ¼Ȩ޲µ¼ϵͳ +

    +
    + + diff --git a/09/WebRoot/docuview/teaDocuService.jsp b/09/WebRoot/docuview/teaDocuService.jsp new file mode 100644 index 0000000..940f77b --- /dev/null +++ b/09/WebRoot/docuview/teaDocuService.jsp @@ -0,0 +1,128 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" + pageEncoding="GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + ͼ鳬 + + + + + + + + +
    +   +
    + + + + +
    +
    + ѯ + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + +
    +
    + ʦ +
    +
    +
    + +
    +
    +
    + Ա +
    +
    +
    + ֤ +
    +
    +
    + ڿרҵ +
    +
    +
    + ά +
    +
    +
    + ${tea.teaId }  +
    +
    +
    + ${tea.name }  +
    +
    +
    + ${tea.sex }  +
    +
    +
    + ${tea.sfzh }  +
    +
    +
    + ${tea.systemSpecialtyCode.name }  +
    +
    +
    + +
    +
    +
    + + diff --git a/09/WebRoot/employeeview/chargeSearch.jsp b/09/WebRoot/employeeview/chargeSearch.jsp new file mode 100644 index 0000000..194f17c --- /dev/null +++ b/09/WebRoot/employeeview/chargeSearch.jsp @@ -0,0 +1,173 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" + pageEncoding="GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + ͼ鳬 + + + + + + + + +
    +
    +

    + +

    +
    +
    + + + + +
    +
    + ѯ + + + + checked="yes"> + ѯʷ¼ +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + ʦ +
    +
    +
    + ʦ +
    +
    +
    + ʦԱ +
    +
    +
    + ༶ +
    +
    +
    + 꼶 +
    +
    +
    + ༶רҵ +
    +
    +
    + ְ +
    +
    +
    + ά +
    +
    +
    + ְ +
    +
    +
    + ${list.docuTeaInfo.teaId } +
    +
    +
    + ${list.docuTeaInfo.name } +
    +
    +
    + ${list.docuTeaInfo.sex } +
    +
    +
    + ${list.systemClassInfo.classmc } +
    +
    +
    + ${list.systemClassInfo.systemGradeCode.grName } +
    +
    +
    + ${list.systemClassInfo.systemSpecialtyCode.name } +
    +
    +
    + ${list.rzrq } +
    +
    +
    + ְ +
    +
    +
    + ${list.lizhiDate } +
    +
    +
    + + diff --git a/09/WebRoot/employeeview/teaCourseSearch.jsp b/09/WebRoot/employeeview/teaCourseSearch.jsp new file mode 100644 index 0000000..6eb8dea --- /dev/null +++ b/09/WebRoot/employeeview/teaCourseSearch.jsp @@ -0,0 +1,145 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" + pageEncoding="GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + ͼ鳬 + + + + + + + + +
    +
    +

    + +

    +
    +
    + + + + +
    +
    + ѯ + + + + checked="yes"> + ѯʷ¼ +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + ʦ +
    +
    +
    + ʦ +
    +
    +
    + ʦԱ +
    +
    +
    + ְ +
    +
    +
    + ְĿ +
    +
    +
    + ά +
    +
    +
    + ְ +
    +
    +
    + ${list.docuTeaInfo.teaId } +
    +
    +
    + ${list.docuTeaInfo.name } +
    +
    +
    + ${list.docuTeaInfo.sex } +
    +
    +
    + ${list.rkrq } +
    +
    +
    + ${list.systemCourseCode.subject } +
    +
    +
    + ְ +
    +
    +
    + ${list.lizhiDate } +
    +
    + + diff --git a/09/WebRoot/employeeview/teaInstateCharge.jsp b/09/WebRoot/employeeview/teaInstateCharge.jsp new file mode 100644 index 0000000..090b7cf --- /dev/null +++ b/09/WebRoot/employeeview/teaInstateCharge.jsp @@ -0,0 +1,190 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + + + + + + + +
    +   +
    + + + + + + + +
    +   + +
    + ʦţ +
    +
    +
    + +
    +
    +   +
    +
    + + + + + + + + + + + + + + + + + +
    +
    + ʦ +
    +
    +
    + Ա +
    +
    +
    + +
    +
    +
    + ѧ +
    +
    +
    + ڿרҵ +
    +
    +
    + +
    +
    +
    + ${teaInfo.name }  +
    +
    +
    + ${teaInfo.sex }  +
    +
    +
    + ${teaInfo.age }  +
    +
    +
    + ${teaInfo.xueli }  +
    +
    +
    + ${teaInfo.systemSpecialtyCode.name }  +
    +
    +
    + ${teaInfo.hunfou }  +
    +
    + + + + + + + + + + + + + + + + + + + + +
    +   +
    +
    + ༶ +
    +
    + + +
    + רҵ +
    +
    + +
    +
    + 꼶 +
    +
    + + +
    + ְ +
    +
    + +
    +
    + +     + +
    +
    +
    +
    + + ύťʦְΪΡ + + + ${message } + +
    + + + diff --git a/09/WebRoot/employeeview/teaInstateCourses.jsp b/09/WebRoot/employeeview/teaInstateCourses.jsp new file mode 100644 index 0000000..8cde22b --- /dev/null +++ b/09/WebRoot/employeeview/teaInstateCourses.jsp @@ -0,0 +1,160 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + + ְο + + + + + + + + + +
    +   +
    + + + + + + + + + + + +
    +
    + ԡԡ + ְο ԡԡ +
    +
    + ʦţ + + +
    +
    +
    + οοĿ + + + + ְ + + +
    +
    + + + + + + + + + + + + + + + + + +
    +
    + ʦ +
    +
    +
    + Ա +
    +
    +
    + +
    +
    +
    + ѧ +
    +
    +
    + ڿרҵ +
    +
    +
    + +
    +
    +
    + ${teaInfo.name }  +
    +
    +
    + ${teaInfo.sex }  +
    +
    +
    + ${teaInfo.age }  +
    +
    +
    + ${teaInfo.xueli }  +
    +
    +
    + ${teaInfo.systemSpecialtyCode.name }  +
    +
    +
    + ${teaInfo.hunfou }  +
    +
    +
    + + + + + + + + + + +
    +
    + +
    +
    +   + + +
    + ${message }  +
    + + + diff --git a/09/WebRoot/images/ContentImg.jpg b/09/WebRoot/images/ContentImg.jpg new file mode 100644 index 0000000..2b9a59a Binary files /dev/null and b/09/WebRoot/images/ContentImg.jpg differ diff --git a/09/WebRoot/images/Thumbs.db b/09/WebRoot/images/Thumbs.db new file mode 100644 index 0000000..2640c47 Binary files /dev/null and b/09/WebRoot/images/Thumbs.db differ diff --git a/09/WebRoot/images/banner.jpg b/09/WebRoot/images/banner.jpg new file mode 100644 index 0000000..603d052 Binary files /dev/null and b/09/WebRoot/images/banner.jpg differ diff --git a/09/WebRoot/images/leftBackImg.jpg b/09/WebRoot/images/leftBackImg.jpg new file mode 100644 index 0000000..e60e242 Binary files /dev/null and b/09/WebRoot/images/leftBackImg.jpg differ diff --git a/09/WebRoot/images/mrbiao.gif b/09/WebRoot/images/mrbiao.gif new file mode 100644 index 0000000..f68ecdf Binary files /dev/null and b/09/WebRoot/images/mrbiao.gif differ diff --git a/09/WebRoot/index.jsp b/09/WebRoot/index.jsp new file mode 100644 index 0000000..cd6f11f --- /dev/null +++ b/09/WebRoot/index.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" pageEncoding="gb2312"%> + + + + + +У԰ϵͳ + + + + + + + + + + + + +<body> +</body> + diff --git a/09/WebRoot/js/checkform.js b/09/WebRoot/js/checkform.js new file mode 100644 index 0000000..1f8f54e --- /dev/null +++ b/09/WebRoot/js/checkform.js @@ -0,0 +1,201 @@ +function checkRegList(form){ + if(form.select1.value=="djrq"){ + if(form.strvalue.value==""){ + alert("ѯѧڣ磺1981-02-08!");return false; + }else if(CheckDate(form.strvalue.value)){ + alert("ȷѯѧڣ磺1981-02-08!");return false; + } + }else if(form.select1.value=="lqfs"){ + if(form.strvalue.value==""||isNaN(form.strvalue.value)){ + alert("ȷѯ¼ȡ");return false; + } + } +} +function checkBorrowService(form){ + if(form.condition.value==""){ + if(form.conditionContent.value==""){ + alert("ѯĽڣ磺1981-02-08!");return false; + }else if(CheckDate(form.conditionContent.value)){ + alert("ȷѯĽڣ磺1981-02-08!");return false; + } + } +} +function checkEmpty(form1){ + for(i = 0; i < form1.length;i++){ + if(form1.elements[i].value==""){ + alert("ϢΪ"); + return false; + } + } +} +function sturegvalid(myform){ + if (myform.jbr.value==""){ + alert("뾭");myform.jbr.focus();return false; + } + if (myform.lqfs.value==""||isNaN(myform.lqfs.value)){ + alert("ȷ¼ȡ");myform.lqfs.focus();return false; + } +} +function checkBorrow(form){ + if(form.stu_id.value==""||isNaN(form.stu_id.value)){ + alert("ָʽѧ!");form.stu_id.focus();return false; + } + if(form.book_id.value==""){ + alert("!");form.book_id.focus();return false; + } +} +function checkTea(form){ + if(form.name.value==""){ + alert("ʦ!");form.name.focus();return false; + } + if(form.age.value==""||isNaN(form.age.value)){ + alert("ָʽʦ!");form.age.focus();return false; + } + if(form.csrq.value==""||CheckDate(form.csrq.value)){ + alert("ڣ磺1981-02-08!");form.csrq.focus();return false; + } + if(form.sfzh.value==""||isNaN(form.sfzh.value)){ + alert("ָʽ֤!");form.sfzh.focus();return false; + } + if(form.lxdh.value==""||isNaN(form.lxdh.value)){ + alert("ָʽϵ绰!");form.lxdh.focus();return false; + } + if(form.gzrq.value==""||CheckDate(form.gzrq.value)){ + alert("빤ڣ磺1981-02-08!");form.gzrq.focus();return false; + } +} +function checkCourse(form){ + if(form.teaId.value==""||isNaN(form.teaId.value)){ + alert("ָʽʦţ");form.teaId.focus();return false; + } + if(form.rkrq.value==""||CheckDate(form.rkrq.value)){ + alert("ʦοڣ磺1981-02-08");form.rkrq.focus();return false; + } +} +function checkCharge(form){ + if(form.teaId.value==""||isNaN(form.teaId.value)){ + alert("ָʽʦţ");form.teaId.focus();return false; + } + if(form.rzrq.value==""||CheckDate(form.rzrq.value)){ + alert("ʦְڣ磺1981-02-08");form.rzrq.focus();return false; + } +} +function sorucenjtj(form1){ + if(document.form1.typeexam.value==""){ + alert("Ϊգ!!!"); + document.form1.typeexam.focus(); + return false; + } + if(document.form1.dateexam.value==""){ + alert("ڲΪգ!!!"); + document.form1.dateexam.focus(); + return false; + } + if(CheckDate(form1.dateexam.value)){ + alert("׼ڣ磺1980-07-17"); + form1.dateexam.focus(); + return false; + } +} +function mycheck(form1){ + if (form1.book_id.value==""){ + alert("ţ"); form1.book_id.focus();return false; + } + if (form1.book_name.value==""){ + alert("ͼƣ");form1.book_name.focus();return false; + } + if (form1.writer.value==""){ + alert("ߣ");form1.writer.focus();return false; + } + if (form1.book_type.value==""){ + alert("");form1.book_type.focus();return false; + } + if (form1.book_concern.value==""){ + alert("磡");form1.book_concern.focus();return false; + } + if (form1.publish_date.value==""||CheckDate(form1.publish_date.value)){ + alert("뷢ڣ磺1980-07-17");form1.publish_date.focus();return false; + } + if (form1.price.value==""){ + alert("붨ۣ");form1.price.focus();return false; + } + if (isNaN(form1.price.value)){ + alert("Ķ۴룡");form1.price.value="";form1.price.focus();return false; + } + if (form1.czy.value==""){ + alert("Ա");form1.czy.focus();return false; + } + if (form1.book_count.value==""||isNaN(form1.book_count.value)){ + alert("ȷ");form1.book_count.focus();return false; + } +} +function stusourcevalid(myform){ + if (myform.stuId.value==""){ + alert("ѧţ");myform.stuId.focus();return false; + } + if (document.myform.stuName.value==""){ + alert("ѧ");myform.stuName.focus();return false; + } + if(myform.examType.value==""){ + alert("뿼");myform.examType.focus();return false; + } + if(myform.examDate.value==""){ + alert("뿼ڣ");myform.examDate.focus();return false; + } + if(CheckDate(myform.examDate.value)){ + alert("׼ڣ磺1981-02-8");myform.examDate.focus();return false; + } + if(myform.czy.value==""){ + alert("Ա");myform.czy.focus();return false; + } +} +function stuinfovalid(myform){ + if (myform.stuId.value==""){ + alert("ѡѧ༶");return false; + } + if (myform.name.value==""){ + alert("ѧ");myform.name.focus();return false; + } + if (myform.age.value==""||isNaN(myform.age.value)){ + alert("ѧΪֵͣ");myform.age.focus();return false; + } + if(myform.sfzhm.value==""||isNaN(myform.sfzhm.value)){ + alert("ָʽ֤");myform.sfzhm.focus();return false; + } + if(CheckDate(myform.csrq.value)){ + alert("׼ڣ磺1980-07-17");myform.csrq.focus();return false; + } + if (myform.jtdz.value==""){ + alert("ַͥ");myform.jtdz.focus();return false; + } + if (myform.jtdh.value==""||isNaN(myform.jtdh.value)){ + alert("ָʽͥ绰");myform.jtdh.focus();return false; + } + } + + + + function CheckDate(INDate){ + if (INDate=="") + {return true;} + subYY=INDate.substr(0,4) + //ת· + if(INDate.indexOf('-',0)!=-1){ separate="-"} + else{ + if(INDate.indexOf('/',0)!=-1){separate="/"} + else {return true;}} + area=INDate.indexOf(separate,0) + subMM=INDate.substr(area+1,INDate.indexOf(separate,area+1)-(area+1)) + if(subMM.length<2){subMM="0"+subMM} + //ת + area=INDate.lastIndexOf(separate) + subDD=INDate.substr(area+1,INDate.length-area-1) + if(eval(subDD)<10){subDD="0"+eval(subDD)} + NewDate=subYY+"-"+subMM+"-"+subDD + if(NewDate.length!=10){return true;} + if(NewDate.substr(4,1)!="-"){return true;} + if(NewDate.substr(7,1)!="-"){return true;} + if(NewDate.substr(5,2)>"12"){return true;} + if(NewDate.substr(8,2)>"31"){return true;} + return false; + } \ No newline at end of file diff --git a/09/WebRoot/left.jsp b/09/WebRoot/left.jsp new file mode 100644 index 0000000..8bd1e88 --- /dev/null +++ b/09/WebRoot/left.jsp @@ -0,0 +1,60 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + ˵ + + + + + + +
    + +
    + + diff --git a/09/WebRoot/sourceview/doc_stusource_class_gather.jsp b/09/WebRoot/sourceview/doc_stusource_class_gather.jsp new file mode 100644 index 0000000..150426e --- /dev/null +++ b/09/WebRoot/sourceview/doc_stusource_class_gather.jsp @@ -0,0 +1,64 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + +
      +
    ༶: + ڣ
    + + + + + + + + + + + + +
    +
    + +
    +
    +
    + +
    +
    + + diff --git a/09/WebRoot/sourceview/doc_stusource_grade_gather.jsp b/09/WebRoot/sourceview/doc_stusource_grade_gather.jsp new file mode 100644 index 0000000..8d24835 --- /dev/null +++ b/09/WebRoot/sourceview/doc_stusource_grade_gather.jsp @@ -0,0 +1,68 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix = "fmt"%> + + + + + + + +
    +   +
    꼶: + + ڣ
    + + + + + + + + + + + + +
    +
    + +
    +
    +
    + +
    +
    +
    ${map.message }
    + + diff --git a/09/WebRoot/sourceview/doc_stusource_input.jsp b/09/WebRoot/sourceview/doc_stusource_input.jsp new file mode 100644 index 0000000..c6a6003 --- /dev/null +++ b/09/WebRoot/sourceview/doc_stusource_input.jsp @@ -0,0 +1,84 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt"%> + + + + + + + + + +
    +   +
    + + + + + + + + + + + + + + + + + + +
    ѧ + + ѧ + +
    + + + +
    Ա
    + +   +
    +   + +
    +
    + + + + + + + + +
    + + + + + + +
    ԿĿ
    Գɼ
    ${list.subject}
    +
    + +
    +
    + +
    ${message}
    + + diff --git a/09/WebRoot/sourceview/doc_stusource_list.jsp b/09/WebRoot/sourceview/doc_stusource_list.jsp new file mode 100644 index 0000000..444a055 --- /dev/null +++ b/09/WebRoot/sourceview/doc_stusource_list.jsp @@ -0,0 +1,50 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + +
    +
    +
    +
    ѯֶ: + + : + +
    + + + + + +
    +
    + +
    +
    + + + diff --git a/09/WebRoot/sourceview/doc_stusource_search.jsp b/09/WebRoot/sourceview/doc_stusource_search.jsp new file mode 100644 index 0000000..c315d3a --- /dev/null +++ b/09/WebRoot/sourceview/doc_stusource_search.jsp @@ -0,0 +1,114 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" + pageEncoding="GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + ͼ鳬 + + + + + + + + +
    +   +
    + + + + +
    +
    + ѯ + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + Ŀ
    +
    +
    + ѧ
    +
    +
    + ѧ
    +
    +
    + ɼ
    +
    +
    + ${exam.examType }  +
    +
    +
    + ${exam.systemCourseCode.subject }  +
    +
    +
    + ${exam.docuStuInfo.stuId }  +
    +
    +
    + ${exam.docuStuInfo.name }  +
    +
    +
    + ${exam.grade }  +
    +
    +
    + + diff --git a/09/WebRoot/systemInfo/copyright.jsp b/09/WebRoot/systemInfo/copyright.jsp new file mode 100644 index 0000000..b0bdb26 --- /dev/null +++ b/09/WebRoot/systemInfo/copyright.jsp @@ -0,0 +1,51 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + ޱĵ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

     

    +

    +

    ȨУտƼ

    +
     

     

    տƼ

        ʡտƼ޹˾һԼΪĵĸ߿Ƽҵ˾200012£רҵӦ̺ͷṩ̡ʼҵֻ↑ϵͳۺӦáҵվȣȺɹ漰ơӪĶҵӦӦƽ̨˾ӵĿʵרҺѧϰͼŶӣΪָ˼뽨з۷ϵ˾ڳзͶͷḻҵ飬šÿͻɹͬͻͬɹķܶĿ꣬ŬӡרҵáЧIJƷƣ߳ΪûṩʵIJƷͷ

        ҵּΪҵ񣬴ҵܹƽ̨ҵḶ́ҵЧʣ͹ɱǿҵľΪҵٷչṩԴ

        ҵĻѧ¡ʵ

        ˾ýյڹյİٱر

     
       
    + + diff --git a/09/WebRoot/systemInfo/technic.jsp b/09/WebRoot/systemInfo/technic.jsp new file mode 100644 index 0000000..657e693 --- /dev/null +++ b/09/WebRoot/systemInfo/technic.jsp @@ -0,0 +1,75 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + ֧ + + + + + + + + + + +

    +   +

    + + + + + + + + + + + + +
    +   + +
    +

    +   +

    +

    + +

    +

    + ϵͳտƼȫȨм֧ +

    +
    +
    +   +
    +   + +

    +   +

    +

    + ˾ַжʢ89̩㳡C2205 +

    +

    + ˾ַwww.mingrisoft.com +

    +

    + ˾䣺mingrisoft@mingrisoft.commingrisoft@vip.sina.com +

    +

    + ֧֣0431-84978981 84978982 +

    +
    +   +
    + + diff --git a/09/WebRoot/systemview/sys_code_class.jsp b/09/WebRoot/systemview/sys_code_class.jsp new file mode 100644 index 0000000..32395ef --- /dev/null +++ b/09/WebRoot/systemview/sys_code_class.jsp @@ -0,0 +1,115 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + + + + + + + + + + +
    +
    +

    + +

    +
    +
    +
    + + + + + + + + + + + + + + +
    רҵ
    + +
    + +
    + +
    +
    + + +
    +
    +
    ------------------༶Ϣά-------------------
    +
    + + + + + + + + + + + + + + + + + +

    +
    רҵ
    û
    ${cs.classid}${cs.classmc}${cs.spname}${cs.grname} + ɾ +
    +

    ${messages['msgError']}

    + + diff --git a/09/WebRoot/systemview/sys_code_grade.jsp b/09/WebRoot/systemview/sys_code_grade.jsp new file mode 100644 index 0000000..1206696 --- /dev/null +++ b/09/WebRoot/systemview/sys_code_grade.jsp @@ -0,0 +1,99 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + + + +ѧ꼶 + + + + + + +
    +
    +

    + +

    +
    +
    +
    + + + + + + + + + + + +
    + +
    +
    + + +
    +
    +
    ------------------꼶Ϣά-------------------
    +
    + + + + + + + + + + + + + + + +
    û
    + ${sp.grCode} + +
    + ${sp.grName} +
    +
    + ޸ + + ɾ + +
    +

    ${msgError}

    + + diff --git a/09/WebRoot/systemview/sys_code_sp.jsp b/09/WebRoot/systemview/sys_code_sp.jsp new file mode 100644 index 0000000..fd43074 --- /dev/null +++ b/09/WebRoot/systemview/sys_code_sp.jsp @@ -0,0 +1,99 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + + + + + + + + + +
    +
    +

    + +

    +
    +
    +
    + + + + + + + + + + + + +
    רҵ
    +
    + +
    +
    רҵ
    +
    + + +
    +
    +
    +
    ------------------רҵϢά-------------------
    +
    + + + + + + + + + + + + + + + +
    רҵרҵû
    + ${sp.spCode} + + ${sp.name} + + ޸ + + ɾ +
    +

    ${msgError}

    + + diff --git a/09/WebRoot/systemview/sys_code_subject.jsp b/09/WebRoot/systemview/sys_code_subject.jsp new file mode 100644 index 0000000..1f944e6 --- /dev/null +++ b/09/WebRoot/systemview/sys_code_subject.jsp @@ -0,0 +1,95 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + + + +ѧ꼶 + + + + + + +
    +
    +

    + +

    +
    +
    +
    + + + + + + + + + + + +
    ѧƴ
    + +
    ѧ
    +
    + + +
    +
    +
    ------------------ѧϢά-------------------
    +
    + + + + + + + + + + + + + + +
    ѧƴѧû
    + ${sp.code} + + ${sp.subject} + + ޸ + + ɾ +
    +

    ${msgError}

    + + diff --git a/09/WebRoot/title.jsp b/09/WebRoot/title.jsp new file mode 100644 index 0000000..c5a8306 --- /dev/null +++ b/09/WebRoot/title.jsp @@ -0,0 +1,20 @@ +<%@ page language="java" pageEncoding="gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + +У԰ϵͳ + + + + + + + +
    +
    + + diff --git a/09/WebRoot/userManager/addUser.jsp b/09/WebRoot/userManager/addUser.jsp new file mode 100644 index 0000000..9fd5dea --- /dev/null +++ b/09/WebRoot/userManager/addUser.jsp @@ -0,0 +1,67 @@ +<%@ page language="java" pageEncoding="GB2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + + + û + + + + + + + + + + + + + + + +
    +   + +   + +   +
    +   + +
    +

    + + +

    +
    +

    + ¼ƣ + +

    +

    + ¼룺 + +

    +

    + ûdzƣ + +

    +

    + +     + +

    +
    + ${message } +
    +
    + + diff --git a/09/WebRoot/userManager/addUser.jsp_preview_.html b/09/WebRoot/userManager/addUser.jsp_preview_.html new file mode 100644 index 0000000..b74e819 --- /dev/null +++ b/09/WebRoot/userManager/addUser.jsp_preview_.html @@ -0,0 +1,61 @@ +<% __myeclipse-0__ %> +<% __myeclipse-1__ %> + + + + + ???? + + + + + + + + + + + + + + + +
    +   + +   + +   +
    +   + +
    +

    + + +

    +
    +

    + ????? + +

    +

    + ????? + +

    +

    + ????? + +

    +

    + +     + +

    +
    + <% __myeclipse-2__ %> +
    +
    + + diff --git a/09/WebRoot/userManager/userSearch.jsp b/09/WebRoot/userManager/userSearch.jsp new file mode 100644 index 0000000..44b980f --- /dev/null +++ b/09/WebRoot/userManager/userSearch.jsp @@ -0,0 +1,117 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" + pageEncoding="GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + + + + + + ͼ鳬 + + + + + + + + + +
    +
    +

    + + +

    +
    +
    + + + + + + + +
    + ${message }  +
    +
    + ѯ + + + +
    +
    + + + + +
    + + + + + + + + + + + + + +
    +
    + ¼û +
    +
    +
    + ûdz +
    +
    +
    + ά +
    +
    +
    + ${user.username }  +
    +
    +
    + ${user.name }  +
    +
    +
    + ɾ +
    +
    +
    +
    + +

     

    +

     

    +

     

    +

     

    +

    + δ¼Ȩ޲¼ϵͳ +

    +
    + + diff --git a/09/hibernate.reveng.xml b/09/hibernate.reveng.xml new file mode 100644 index 0000000..791ff1f --- /dev/null +++ b/09/hibernate.reveng.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/09/src/com/hibernate/dao/DAOSupport.java b/09/src/com/hibernate/dao/DAOSupport.java new file mode 100644 index 0000000..f148bb8 --- /dev/null +++ b/09/src/com/hibernate/dao/DAOSupport.java @@ -0,0 +1,66 @@ +package com.hibernate.dao; + +import java.util.List; + +import org.hibernate.Query; +import org.hibernate.SQLQuery; +import org.springframework.dao.DataAccessException; +import org.springframework.orm.hibernate3.HibernateTemplate; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; + +public class DAOSupport extends HibernateDaoSupport { + public boolean InsertOrUpdate(Object obj) { + getHibernateTemplate().saveOrUpdate(obj); + return true; + } + + public List QueryObject(String QueryStr) { + return getHibernateTemplate().find(QueryStr); + } + + public Object getObject(Class obj, int id) { + return getHibernateTemplate().get(obj, Integer.valueOf(id)); + } + + + public boolean DeleteObject(Object obj) { + try{ + getHibernateTemplate().delete(obj); + return true; + }catch(Exception e){ + return false; + } + + } + public boolean DeleteObject(String obj) { + List objects = getHibernateTemplate().find(obj); + try { + for (int i = 0; i < objects.size(); i++) { + Object object = (Object) objects.get(i); + //System.out.println(i + " ffdsfs " + object.getClass().getName()); + getHibernateTemplate().delete(object); + } + return true; + } catch (DataAccessException e) { + // TODO Զ catch + return false; + } + } + + + public List QueryObjectFromSql(String SqlStr,String tname,Object obj){ + SQLQuery query = this.getSession().createSQLQuery(SqlStr); + query.addEntity(tname,obj.getClass()); + return query.list(); + } + + public List QueryObjectFromSql(String SqlStr) { + Query query = this.getSession().createSQLQuery(SqlStr); + return query.list(); + } + + public void save(Object obj) { + System.out.println(getHibernateTemplate().save(obj)); + } + +} diff --git a/09/src/com/hibernate/model/BookBorrowInfo.hbm.xml b/09/src/com/hibernate/model/BookBorrowInfo.hbm.xml new file mode 100644 index 0000000..a9655b1 --- /dev/null +++ b/09/src/com/hibernate/model/BookBorrowInfo.hbm.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/BookBorrowInfo.java b/09/src/com/hibernate/model/BookBorrowInfo.java new file mode 100644 index 0000000..cbd53bb --- /dev/null +++ b/09/src/com/hibernate/model/BookBorrowInfo.java @@ -0,0 +1,132 @@ +package com.hibernate.model; + +import java.sql.Date; + + +/** + * BookBorrowInfo generated by MyEclipse - Hibernate Tools + */ + +public class BookBorrowInfo implements java.io.Serializable { + + + // Fields + + private String borrowId; + private BookReginster bookReginster; + private DocuStuInfo docuStuInfo; + private String bookName; + private Double price; + private String bookType; + private Date borrowDate; + private Date returnDate; + private String czy; + + // Constructors + + /** default constructor */ + public BookBorrowInfo() { + } + + /** minimal constructor */ + public BookBorrowInfo(String borrowId, BookReginster bookReginster) { + this.borrowId = borrowId; + this.bookReginster = bookReginster; + } + + /** full constructor */ + public BookBorrowInfo(String borrowId, BookReginster bookReginster, DocuStuInfo docuStuInfo, String bookName, Double price, String bookType, Date borrowDate, Integer borrowCount, Date returnDate, String sts) { + this.borrowId = borrowId; + this.bookReginster = bookReginster; + this.docuStuInfo = docuStuInfo; + this.bookName = bookName; + this.price = price; + this.bookType = bookType; + this.borrowDate = borrowDate; + this.returnDate = returnDate; + } + + + // Property accessors + + public String getBorrowId() { + return this.borrowId; + } + + public void setBorrowId(String borrowId) { + this.borrowId = borrowId; + } + + public BookReginster getBookReginster() { + return this.bookReginster; + } + + public void setBookReginster(BookReginster bookReginster) { + this.bookReginster = bookReginster; + } + + public DocuStuInfo getDocuStuInfo() { + return this.docuStuInfo; + } + + public void setDocuStuInfo(DocuStuInfo docuStuInfo) { + this.docuStuInfo = docuStuInfo; + } + + public String getBookName() { + return this.bookName; + } + + public void setBookName(String bookName) { + this.bookName = bookName; + } + + public Double getPrice() { + return this.price; + } + + public void setPrice(Double price) { + this.price = price; + } + + public String getBookType() { + return this.bookType; + } + + public void setBookType(String bookType) { + this.bookType = bookType; + } + + public Date getBorrowDate() { + return this.borrowDate; + } + + public void setBorrowDate(Date borrowDate) { + this.borrowDate = borrowDate; + } + + public Date getReturnDate() { + return this.returnDate; + } + + public void setReturnDate(Date returnDate) { + this.returnDate = returnDate; + } + + public String getCzy() { + return czy; + } + + public void setCzy(String czy) { + this.czy = czy; + } + + + + + + + + + +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/BookReginster.hbm.xml b/09/src/com/hibernate/model/BookReginster.hbm.xml new file mode 100644 index 0000000..1bcf002 --- /dev/null +++ b/09/src/com/hibernate/model/BookReginster.hbm.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/BookReginster.java b/09/src/com/hibernate/model/BookReginster.java new file mode 100644 index 0000000..69c5e50 --- /dev/null +++ b/09/src/com/hibernate/model/BookReginster.java @@ -0,0 +1,165 @@ +package com.hibernate.model; + +import java.sql.Date; +import java.util.HashSet; +import java.util.Set; + + +/** + * BookReginster generated by MyEclipse - Hibernate Tools + */ + +public class BookReginster implements java.io.Serializable { + + + // Fields + + private String bookId; + private String bookName; + private String bookType; + private String writer; + private String bookConcern; + private Date publishDate; + private Double price; + private Date regDate; + private Integer bookCount; + private String czy; + private String remark; + //private Set bookBorrowInfos = new HashSet(0); + + + // Constructors + + /** default constructor */ + public BookReginster() { + } + + /** minimal constructor */ + public BookReginster(String bookId) { + this.bookId = bookId; + } + + /** full constructor */ + public BookReginster(String bookId, String bookName, String bookType, String writer, String bookConcern, Date publishDate, Double price, Date regDate, Integer bookCount, String czy, String remark, Set bookBorrowInfos) { + this.bookId = bookId; + this.bookName = bookName; + this.bookType = bookType; + this.writer = writer; + this.bookConcern = bookConcern; + this.publishDate = publishDate; + this.price = price; + this.regDate = regDate; + this.bookCount = bookCount; + this.czy = czy; + this.remark = remark; +// this.bookBorrowInfos = bookBorrowInfos; + } + + + // Property accessors + + public String getBookId() { + return this.bookId; + } + + public void setBookId(String bookId) { + this.bookId = bookId; + } + + public String getBookName() { + return this.bookName; + } + + public void setBookName(String bookName) { + this.bookName = bookName; + } + + public String getBookType() { + return this.bookType; + } + + public void setBookType(String bookType) { + this.bookType = bookType; + } + + public String getWriter() { + return this.writer; + } + + public void setWriter(String writer) { + this.writer = writer; + } + + public String getBookConcern() { + return this.bookConcern; + } + + public void setBookConcern(String bookConcern) { + this.bookConcern = bookConcern; + } + + public Date getPublishDate() { + return this.publishDate; + } + + public void setPublishDate(Date publishDate) { + this.publishDate = publishDate; + } + + public Double getPrice() { + return this.price; + } + + public void setPrice(Double price) { + this.price = price; + } + + public Date getRegDate() { + return this.regDate; + } + + public void setRegDate(Date regDate) { + this.regDate = regDate; + } + + public Integer getBookCount() { + return this.bookCount; + } + + public void setBookCount(Integer bookCount) { + this.bookCount = bookCount; + } + + public String getCzy() { + return this.czy; + } + + public void setCzy(String czy) { + this.czy = czy; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + +// public Set getBookBorrowInfos() { +// return this.bookBorrowInfos; +// } +// +// public void setBookBorrowInfos(Set bookBorrowInfos) { +// this.bookBorrowInfos = bookBorrowInfos; +// } + + + + + + + + + +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/CourseStuInfo.hbm.xml b/09/src/com/hibernate/model/CourseStuInfo.hbm.xml new file mode 100644 index 0000000..14c8769 --- /dev/null +++ b/09/src/com/hibernate/model/CourseStuInfo.hbm.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/CourseStuInfo.java b/09/src/com/hibernate/model/CourseStuInfo.java new file mode 100644 index 0000000..3acd253 --- /dev/null +++ b/09/src/com/hibernate/model/CourseStuInfo.java @@ -0,0 +1,108 @@ +package com.hibernate.model; + +import java.sql.Date; + + +/** + * CourseStuInfo generated by MyEclipse - Hibernate Tools + */ + +public class CourseStuInfo implements java.io.Serializable { + + + // Fields + + private String lsh; + private SystemCourseCode systemCourseCode; + private DocuStuInfo docuStuInfo; + private Float grade; + private String examType; + private Date examDate; + private String czy; + + + // Constructors + + /** default constructor */ + public CourseStuInfo() { + } + + + /** full constructor */ + public CourseStuInfo(SystemCourseCode systemCourseCode, DocuStuInfo docuStuInfo, Float grade, String examType, Date examDate, String czy) { + this.systemCourseCode = systemCourseCode; + this.docuStuInfo = docuStuInfo; + this.grade = grade; + this.examType = examType; + this.examDate = examDate; + this.czy = czy; + } + + + // Property accessors + + public String getLsh() { + return this.lsh; + } + + public void setLsh(String lsh) { + this.lsh = lsh; + } + + public SystemCourseCode getSystemCourseCode() { + return this.systemCourseCode; + } + + public void setSystemCourseCode(SystemCourseCode systemCourseCode) { + this.systemCourseCode = systemCourseCode; + } + + public DocuStuInfo getDocuStuInfo() { + return this.docuStuInfo; + } + + public void setDocuStuInfo(DocuStuInfo docuStuInfo) { + this.docuStuInfo = docuStuInfo; + } + + public Float getGrade() { + return this.grade; + } + + public void setGrade(Float grade) { + this.grade = grade; + } + + public String getExamType() { + return this.examType; + } + + public void setExamType(String examType) { + this.examType = examType; + } + + public Date getExamDate() { + return this.examDate; + } + + public void setExamDate(Date examDate) { + this.examDate = examDate; + } + + public String getCzy() { + return this.czy; + } + + public void setCzy(String czy) { + this.czy = czy; + } + + + + + + + + + +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/DocuStuInfo.hbm.xml b/09/src/com/hibernate/model/DocuStuInfo.hbm.xml new file mode 100644 index 0000000..69af03a --- /dev/null +++ b/09/src/com/hibernate/model/DocuStuInfo.hbm.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/DocuStuInfo.java b/09/src/com/hibernate/model/DocuStuInfo.java new file mode 100644 index 0000000..9a1c3a1 --- /dev/null +++ b/09/src/com/hibernate/model/DocuStuInfo.java @@ -0,0 +1,145 @@ +package com.hibernate.model; + +import java.sql.Date; +import java.util.HashSet; +import java.util.Set; + + +/** + * DocuStuInfo generated by MyEclipse - Hibernate Tools + */ + +public class DocuStuInfo implements java.io.Serializable { + + + // Fields + + private String stuId; + private String name; + private String sex; + private Integer age; + private String sfzhm; + private Date csrq; + private String zzmm; + private String jtdh; + private String jtdz; + private String jkzk; + private Set courseStu = new HashSet(); + +// Constructors + + /** default constructor */ +// public DocuStuInfo() { +// } +// +// /** minimal constructor */ +// public DocuStuInfo(String stuId) { +// this.stuId = stuId; +// } +// +// /** full constructor */ +// public DocuStuInfo(String stuId, String name, String sex, Integer age, String sfzhm, Date csrq, String zzmm, String jtdh, String jtdz, String jkzk) { +// this.stuId = stuId; +// this.name = name; +// this.sex = sex; +// this.age = age; +// this.sfzhm = sfzhm; +// this.csrq = csrq; +// this.zzmm = zzmm; +// this.jtdh = jtdh; +// this.jtdz = jtdz; +// this.jkzk = jkzk; +// } + + + + // Property accessors + + public String getStuId() { + return this.stuId; + } + + public void setStuId(String stuId) { + this.stuId = stuId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSex() { + return this.sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public Integer getAge() { + return this.age; + } + + public void setAge(Integer age) { + this.age = age; + } + + public String getSfzhm() { + return this.sfzhm; + } + + public void setSfzhm(String sfzhm) { + this.sfzhm = sfzhm; + } + + public Date getCsrq() { + return this.csrq; + } + + public void setCsrq(Date csrq) { + this.csrq = csrq; + } + + public String getZzmm() { + return this.zzmm; + } + + public void setZzmm(String zzmm) { + this.zzmm = zzmm; + } + + public String getJtdh() { + return this.jtdh; + } + + public void setJtdh(String jtdh) { + this.jtdh = jtdh; + } + + public String getJtdz() { + return this.jtdz; + } + + public void setJtdz(String jtdz) { + this.jtdz = jtdz; + } + + public String getJkzk() { + return this.jkzk; + } + + public void setJkzk(String jkzk) { + this.jkzk = jkzk; + } + + public Set getCourseStu() { + return courseStu; + } + + public void setCourseStu(Set courseStu) { + this.courseStu = courseStu; + } +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/DocuStuRegister.hbm.xml b/09/src/com/hibernate/model/DocuStuRegister.hbm.xml new file mode 100644 index 0000000..3b8d710 --- /dev/null +++ b/09/src/com/hibernate/model/DocuStuRegister.hbm.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/DocuStuRegister.java b/09/src/com/hibernate/model/DocuStuRegister.java new file mode 100644 index 0000000..5c818ff --- /dev/null +++ b/09/src/com/hibernate/model/DocuStuRegister.java @@ -0,0 +1,111 @@ +package com.hibernate.model; + +import java.sql.Date; + + +/** + * DocuStuRegister generated by MyEclipse - Hibernate Tools + */ + +public class DocuStuRegister implements java.io.Serializable { + // Fields + + private String lsh; + private SystemClassInfo systemClassInfo; + private DocuStuInfo docuStuInfo; + private Date djrq; + private String jbr; + private double lqfs; + private String zymc; + + + // Constructors + + /** default constructor */ + public DocuStuRegister() { + } + + /** minimal constructor */ + public DocuStuRegister(String lsh) { + this.lsh = lsh; + } + + /** full constructor */ + public DocuStuRegister(String lsh, SystemClassInfo systemClassInfo, DocuStuInfo docuStuInfo, Date djrq, String jbr, double lqfs, String zymc) { + this.lsh = lsh; + this.systemClassInfo = systemClassInfo; + this.docuStuInfo = docuStuInfo; + this.djrq = djrq; + this.jbr = jbr; + this.lqfs = lqfs; + this.zymc = zymc; + } + + + // Property accessors + + public String getLsh() { + return this.lsh; + } + + public void setLsh(String lsh) { + this.lsh = lsh; + } + + public SystemClassInfo getSystemClassInfo() { + return this.systemClassInfo; + } + + public void setSystemClassInfo(SystemClassInfo systemClassInfo) { + this.systemClassInfo = systemClassInfo; + } + + public DocuStuInfo getDocuStuInfo() { + return this.docuStuInfo; + } + + public void setDocuStuInfo(DocuStuInfo docuStuInfo) { + this.docuStuInfo = docuStuInfo; + } + + public Date getDjrq() { + return this.djrq; + } + + public void setDjrq(Date djrq) { + this.djrq = djrq; + } + + public String getJbr() { + return this.jbr; + } + + public void setJbr(String jbr) { + this.jbr = jbr; + } + + public double getLqfs() { + return this.lqfs; + } + + public void setLqfs(double lqfs) { + this.lqfs = lqfs; + } + + public String getZymc() { + return this.zymc; + } + + public void setZymc(String zymc) { + this.zymc = zymc; + } + + + + + + + + + +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/DocuTeaInfo.hbm.xml b/09/src/com/hibernate/model/DocuTeaInfo.hbm.xml new file mode 100644 index 0000000..e681ed3 --- /dev/null +++ b/09/src/com/hibernate/model/DocuTeaInfo.hbm.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/DocuTeaInfo.java b/09/src/com/hibernate/model/DocuTeaInfo.java new file mode 100644 index 0000000..2b6718b --- /dev/null +++ b/09/src/com/hibernate/model/DocuTeaInfo.java @@ -0,0 +1,206 @@ +package com.hibernate.model; + +import java.sql.Date; +import java.util.HashSet; +import java.util.Set; + + +/** + * DocuTeaInfo generated by MyEclipse - Hibernate Tools + */ + +public class DocuTeaInfo implements java.io.Serializable { + + + // Fields + + private String teaId; + private SystemSpecialtyCode systemSpecialtyCode; + private String name; + private String sex; + private Integer age; + private String minzu; + private String zzmm; + private String xueli; + private String hunfou; + private Date csrq; + private String sfzh; + private String lxdh; + private Date gzrq; + private String gzjj; + private Set emplAssignCourses = new HashSet(0); + private Set emplAssignCharges = new HashSet(0); + + + // Constructors + + /** default constructor */ + public DocuTeaInfo() { + } + + /** minimal constructor */ + public DocuTeaInfo(String teaId, SystemSpecialtyCode systemSpecialtyCode) { + this.teaId = teaId; + this.systemSpecialtyCode = systemSpecialtyCode; + } + + /** full constructor */ + public DocuTeaInfo(String teaId, SystemSpecialtyCode systemSpecialtyCode, String name, String sex, Integer age, String minzu, String zzmm, String xueli, String hunfou, Date csrq, String sfzh, String lxdh, Date gzrq, String gzjj, Set emplAssignCourses, Set emplAssignCharges) { + this.teaId = teaId; + this.systemSpecialtyCode = systemSpecialtyCode; + this.name = name; + this.sex = sex; + this.age = age; + this.minzu = minzu; + this.zzmm = zzmm; + this.xueli = xueli; + this.hunfou = hunfou; + this.csrq = csrq; + this.sfzh = sfzh; + this.lxdh = lxdh; + this.gzrq = gzrq; + this.gzjj = gzjj; + this.emplAssignCourses = emplAssignCourses; + this.emplAssignCharges = emplAssignCharges; + } + + + // Property accessors + + public String getTeaId() { + return this.teaId; + } + + public void setTeaId(String teaId) { + this.teaId = teaId; + } + + public SystemSpecialtyCode getSystemSpecialtyCode() { + return this.systemSpecialtyCode; + } + + public void setSystemSpecialtyCode(SystemSpecialtyCode systemSpecialtyCode) { + this.systemSpecialtyCode = systemSpecialtyCode; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSex() { + return this.sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public Integer getAge() { + return this.age; + } + + public void setAge(Integer age) { + this.age = age; + } + + public String getMinzu() { + return this.minzu; + } + + public void setMinzu(String minzu) { + this.minzu = minzu; + } + + public String getZzmm() { + return this.zzmm; + } + + public void setZzmm(String zzmm) { + this.zzmm = zzmm; + } + + public String getXueli() { + return this.xueli; + } + + public void setXueli(String xueli) { + this.xueli = xueli; + } + + public String getHunfou() { + return this.hunfou; + } + + public void setHunfou(String hunfou) { + this.hunfou = hunfou; + } + + public Date getCsrq() { + return this.csrq; + } + + public void setCsrq(Date csrq) { + this.csrq = csrq; + } + + public String getSfzh() { + return this.sfzh; + } + + public void setSfzh(String sfzh) { + this.sfzh = sfzh; + } + + public String getLxdh() { + return this.lxdh; + } + + public void setLxdh(String lxdh) { + this.lxdh = lxdh; + } + + public Date getGzrq() { + return this.gzrq; + } + + public void setGzrq(Date gzrq) { + this.gzrq = gzrq; + } + + public String getGzjj() { + return this.gzjj; + } + + public void setGzjj(String gzjj) { + this.gzjj = gzjj; + } + + public Set getEmplAssignCourses() { + return this.emplAssignCourses; + } + + public void setEmplAssignCourses(Set emplAssignCourses) { + this.emplAssignCourses = emplAssignCourses; + } + + public Set getEmplAssignCharges() { + return this.emplAssignCharges; + } + + public void setEmplAssignCharges(Set emplAssignCharges) { + this.emplAssignCharges = emplAssignCharges; + } + + + + + + + + + +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/EmplAssignCharge.hbm.xml b/09/src/com/hibernate/model/EmplAssignCharge.hbm.xml new file mode 100644 index 0000000..8360540 --- /dev/null +++ b/09/src/com/hibernate/model/EmplAssignCharge.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/EmplAssignCharge.java b/09/src/com/hibernate/model/EmplAssignCharge.java new file mode 100644 index 0000000..a88b4a4 --- /dev/null +++ b/09/src/com/hibernate/model/EmplAssignCharge.java @@ -0,0 +1,93 @@ +package com.hibernate.model; + +import java.sql.Date; + + +/** + * EmplAssignCharge generated by MyEclipse - Hibernate Tools + */ + +public class EmplAssignCharge implements java.io.Serializable { + + + // Fields + + private String lsh; + private DocuTeaInfo docuTeaInfo; + private SystemClassInfo systemClassInfo; + private Date rzrq; + private Date lizhiDate; + + + // Constructors + + /** default constructor */ + public EmplAssignCharge() { + } + + /** minimal constructor */ + public EmplAssignCharge(DocuTeaInfo docuTeaInfo, SystemClassInfo systemClassInfo) { + this.docuTeaInfo = docuTeaInfo; + this.systemClassInfo = systemClassInfo; + } + + /** full constructor */ + public EmplAssignCharge(DocuTeaInfo docuTeaInfo, SystemClassInfo systemClassInfo, Date rzrq, Date lizhiDate) { + this.docuTeaInfo = docuTeaInfo; + this.systemClassInfo = systemClassInfo; + this.rzrq = rzrq; + this.lizhiDate = lizhiDate; + } + + + // Property accessors + + public String getLsh() { + return this.lsh; + } + + public void setLsh(String lsh) { + this.lsh = lsh; + } + + public DocuTeaInfo getDocuTeaInfo() { + return this.docuTeaInfo; + } + + public void setDocuTeaInfo(DocuTeaInfo docuTeaInfo) { + this.docuTeaInfo = docuTeaInfo; + } + + public SystemClassInfo getSystemClassInfo() { + return this.systemClassInfo; + } + + public void setSystemClassInfo(SystemClassInfo systemClassInfo) { + this.systemClassInfo = systemClassInfo; + } + + public Date getRzrq() { + return this.rzrq; + } + + public void setRzrq(Date rzrq) { + this.rzrq = rzrq; + } + + public Date getLizhiDate() { + return this.lizhiDate; + } + + public void setLizhiDate(Date lizhiDate) { + this.lizhiDate = lizhiDate; + } + + + + + + + + + +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/EmplAssignCourse.hbm.xml b/09/src/com/hibernate/model/EmplAssignCourse.hbm.xml new file mode 100644 index 0000000..5695e01 --- /dev/null +++ b/09/src/com/hibernate/model/EmplAssignCourse.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/EmplAssignCourse.java b/09/src/com/hibernate/model/EmplAssignCourse.java new file mode 100644 index 0000000..133dd66 --- /dev/null +++ b/09/src/com/hibernate/model/EmplAssignCourse.java @@ -0,0 +1,93 @@ +package com.hibernate.model; + +import java.sql.Date; + + +/** + * EmplAssignCourse generated by MyEclipse - Hibernate Tools + */ + +public class EmplAssignCourse implements java.io.Serializable { + + + // Fields + + private String lsh; + private DocuTeaInfo docuTeaInfo; + private SystemCourseCode systemCourseCode; + private Date rkrq; + private Date lizhiDate; + + + // Constructors + + /** default constructor */ + public EmplAssignCourse() { + } + + /** minimal constructor */ + public EmplAssignCourse(DocuTeaInfo docuTeaInfo, SystemCourseCode systemCourseCode) { + this.docuTeaInfo = docuTeaInfo; + this.systemCourseCode = systemCourseCode; + } + + /** full constructor */ + public EmplAssignCourse(DocuTeaInfo docuTeaInfo, SystemCourseCode systemCourseCode, Date rkrq, Date lizhiDate) { + this.docuTeaInfo = docuTeaInfo; + this.systemCourseCode = systemCourseCode; + this.rkrq = rkrq; + this.lizhiDate = lizhiDate; + } + + + // Property accessors + + public String getLsh() { + return this.lsh; + } + + public void setLsh(String lsh) { + this.lsh = lsh; + } + + public DocuTeaInfo getDocuTeaInfo() { + return this.docuTeaInfo; + } + + public void setDocuTeaInfo(DocuTeaInfo docuTeaInfo) { + this.docuTeaInfo = docuTeaInfo; + } + + public SystemCourseCode getSystemCourseCode() { + return this.systemCourseCode; + } + + public void setSystemCourseCode(SystemCourseCode systemCourseCode) { + this.systemCourseCode = systemCourseCode; + } + + public Date getRkrq() { + return this.rkrq; + } + + public void setRkrq(Date rkrq) { + this.rkrq = rkrq; + } + + public Date getLizhiDate() { + return this.lizhiDate; + } + + public void setLizhiDate(Date lizhiDate) { + this.lizhiDate = lizhiDate; + } + + + + + + + + + +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/Login.hbm.xml b/09/src/com/hibernate/model/Login.hbm.xml new file mode 100644 index 0000000..0e89178 --- /dev/null +++ b/09/src/com/hibernate/model/Login.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/Login.java b/09/src/com/hibernate/model/Login.java new file mode 100644 index 0000000..b7be8ed --- /dev/null +++ b/09/src/com/hibernate/model/Login.java @@ -0,0 +1,77 @@ +package com.hibernate.model; + + + +/** + * Login generated by MyEclipse - Hibernate Tools + */ + +public class Login implements java.io.Serializable { + + + // Fields + + private Integer id; + private String name; + private String username; + private String password; + + + // Constructors + + /** default constructor */ + public Login() { + } + + + /** full constructor */ + public Login(String name, String username, String password) { + this.name = name; + this.username = username; + this.password = password; + } + + + // Property accessors + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUsername() { + return this.username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return this.password; + } + + public void setPassword(String password) { + this.password = password; + } + + + + + + + + + +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/SystemClassInfo.hbm.xml b/09/src/com/hibernate/model/SystemClassInfo.hbm.xml new file mode 100644 index 0000000..5dea1fd --- /dev/null +++ b/09/src/com/hibernate/model/SystemClassInfo.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/SystemClassInfo.java b/09/src/com/hibernate/model/SystemClassInfo.java new file mode 100644 index 0000000..17028b5 --- /dev/null +++ b/09/src/com/hibernate/model/SystemClassInfo.java @@ -0,0 +1,75 @@ +package com.hibernate.model; + +import java.util.HashSet; +import java.util.Set; + + +/** + * SystemClassInfo generated by MyEclipse - Hibernate Tools + */ + +public class SystemClassInfo implements java.io.Serializable { + + + // Fields + + private String classid; + private SystemSpecialtyCode systemSpecialtyCode; + private SystemGradeCode systemGradeCode; + private String classmc; + + + // Constructors + + /** default constructor */ + public SystemClassInfo() { + } + + /** minimal constructor */ + public SystemClassInfo(String classid) { + this.classid = classid; + } + + /** full constructor */ + public SystemClassInfo(String classid, SystemSpecialtyCode systemSpecialtyCode, SystemGradeCode systemGradeCode, String classmc) { + this.classid = classid; + this.systemSpecialtyCode = systemSpecialtyCode; + this.systemGradeCode = systemGradeCode; + this.classmc = classmc; + } + + + // Property accessors + + public String getClassid() { + return this.classid; + } + + public void setClassid(String classid) { + this.classid = classid; + } + + public SystemSpecialtyCode getSystemSpecialtyCode() { + return this.systemSpecialtyCode; + } + + public void setSystemSpecialtyCode(SystemSpecialtyCode systemSpecialtyCode) { + this.systemSpecialtyCode = systemSpecialtyCode; + } + + public SystemGradeCode getSystemGradeCode() { + return this.systemGradeCode; + } + + public void setSystemGradeCode(SystemGradeCode systemGradeCode) { + this.systemGradeCode = systemGradeCode; + } + + public String getClassmc() { + return this.classmc; + } + + public void setClassmc(String classmc) { + this.classmc = classmc; + } +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/SystemClassInfoList.java b/09/src/com/hibernate/model/SystemClassInfoList.java new file mode 100644 index 0000000..4b70be2 --- /dev/null +++ b/09/src/com/hibernate/model/SystemClassInfoList.java @@ -0,0 +1,36 @@ +package com.hibernate.model; + +import java.io.Serializable; + +public class SystemClassInfoList implements Serializable{ + private String classid; + private String classmc; + private String spname; + private String grname; + public String getClassid() { + return classid; + } + public void setClassid(String classid) { + this.classid = classid; + } + public String getClassmc() { + return classmc; + } + public void setClassmc(String classmc) { + this.classmc = classmc; + } + public String getGrname() { + return grname; + } + public void setGrname(String grname) { + this.grname = grname; + } + public String getSpname() { + return spname; + } + public void setSpname(String spname) { + this.spname = spname; + } + + +} diff --git a/09/src/com/hibernate/model/SystemCourseCode.hbm.xml b/09/src/com/hibernate/model/SystemCourseCode.hbm.xml new file mode 100644 index 0000000..224a7b7 --- /dev/null +++ b/09/src/com/hibernate/model/SystemCourseCode.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/SystemCourseCode.java b/09/src/com/hibernate/model/SystemCourseCode.java new file mode 100644 index 0000000..c0ec2e1 --- /dev/null +++ b/09/src/com/hibernate/model/SystemCourseCode.java @@ -0,0 +1,63 @@ +package com.hibernate.model; + + + +/** + * SystemCourseCode generated by MyEclipse - Hibernate Tools + */ + +public class SystemCourseCode implements java.io.Serializable { + + + // Fields + + private String code; + private String subject; + + + // Constructors + + /** default constructor */ + public SystemCourseCode() { + } + + /** minimal constructor */ + public SystemCourseCode(String code) { + this.code = code; + } + + /** full constructor */ + public SystemCourseCode(String code, String subject) { + this.code = code; + this.subject = subject; + } + + + + // Property accessors + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getSubject() { + return this.subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + + + + + + + + +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/SystemGradeCode.hbm.xml b/09/src/com/hibernate/model/SystemGradeCode.hbm.xml new file mode 100644 index 0000000..d9daf2c --- /dev/null +++ b/09/src/com/hibernate/model/SystemGradeCode.hbm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/SystemGradeCode.java b/09/src/com/hibernate/model/SystemGradeCode.java new file mode 100644 index 0000000..fbda58c --- /dev/null +++ b/09/src/com/hibernate/model/SystemGradeCode.java @@ -0,0 +1,59 @@ +package com.hibernate.model; + +import java.util.HashSet; +import java.util.Set; + + +/** + * SystemGradeCode generated by MyEclipse - Hibernate Tools + */ + +public class SystemGradeCode implements java.io.Serializable { + + + // Fields + + private String grCode; + private String grName; + + + + // Constructors + + /** default constructor */ + public SystemGradeCode() { + } + + /** minimal constructor */ + public SystemGradeCode(String grCode) { + this.grCode = grCode; + } + + /** full constructor */ + public SystemGradeCode(String grCode, String grName) { + this.grCode = grCode; + this.grName = grName; + + } + + + + // Property accessors + + public String getGrCode() { + return this.grCode; + } + + public void setGrCode(String grCode) { + this.grCode = grCode; + } + + public String getGrName() { + return this.grName; + } + + public void setGrName(String grName) { + this.grName = grName; + } + +} \ No newline at end of file diff --git a/09/src/com/hibernate/model/SystemSpecialtyCode.hbm.xml b/09/src/com/hibernate/model/SystemSpecialtyCode.hbm.xml new file mode 100644 index 0000000..60f4ab5 --- /dev/null +++ b/09/src/com/hibernate/model/SystemSpecialtyCode.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/09/src/com/hibernate/model/SystemSpecialtyCode.java b/09/src/com/hibernate/model/SystemSpecialtyCode.java new file mode 100644 index 0000000..75ce6d7 --- /dev/null +++ b/09/src/com/hibernate/model/SystemSpecialtyCode.java @@ -0,0 +1,63 @@ +package com.hibernate.model; + + + +/** + * SystemSpecialtyCode generated by MyEclipse - Hibernate Tools + */ + +public class SystemSpecialtyCode implements java.io.Serializable { + + + // Fields + + private String spCode; + private String name; + + + // Constructors + + /** default constructor */ + public SystemSpecialtyCode() { + } + + /** minimal constructor */ + public SystemSpecialtyCode(String spCode) { + this.spCode = spCode; + } + + /** full constructor */ + public SystemSpecialtyCode(String spCode, String name) { + this.spCode = spCode; + this.name = name; + } + + + + // Property accessors + + public String getSpCode() { + return this.spCode; + } + + public void setSpCode(String spCode) { + this.spCode = spCode; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + + + + + + + + +} \ No newline at end of file diff --git a/09/src/com/spring/controller/AddUserController.java b/09/src/com/spring/controller/AddUserController.java new file mode 100644 index 0000000..be56ea3 --- /dev/null +++ b/09/src/com/spring/controller/AddUserController.java @@ -0,0 +1,61 @@ +package com.spring.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.springframework.validation.BindException; +import org.springframework.web.bind.ServletRequestDataBinder; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.SimpleFormController; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.Login; + +public class AddUserController extends SimpleFormController { + private DAOSupport dao; + + public AddUserController() { + setCommandClass(Login.class); + } + + protected ModelAndView onSubmit(HttpServletRequest request, + HttpServletResponse response, Object command, BindException errors) + throws Exception { + HttpSession session = request.getSession(); + Login manager = (Login) session.getAttribute("loginUser"); + Map model = new HashMap(); + if (manager != null&&manager.getUsername().equals("mr")) { + Login newUser = (Login) command; + List list = dao.QueryObject("from Login where username='" + + newUser.getUsername() + "'"); + if(list.size()>0) + model.put("message", "¼Ѿڣû"); + else{ + dao.InsertOrUpdate(newUser); + model.put("message", "û\""+newUser.getName()+"\"ӳɹ"); + } + } + else + model.put("message", "Ȩ޲δ¼뷵ص½"); + return new ModelAndView("userManager/addUser",model); + } + + protected void initBinder(HttpServletRequest request, + ServletRequestDataBinder binder) throws Exception { + request.setCharacterEncoding("gb2312"); + } + + public DAOSupport getDao() { + return dao; + } + + public void setDao(DAOSupport dao) { + this.dao = dao; + } + +} diff --git a/09/src/com/spring/controller/BookManager.java b/09/src/com/spring/controller/BookManager.java new file mode 100644 index 0000000..8e98336 --- /dev/null +++ b/09/src/com/spring/controller/BookManager.java @@ -0,0 +1,304 @@ +package com.spring.controller; + +import java.sql.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.multiaction.MultiActionController; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.BookBorrowInfo; +import com.hibernate.model.BookReginster; +import com.hibernate.model.DocuStuInfo; + +public class BookManager extends MultiActionController { + private String addPage; + + private String searchPage; + + private String bookDetailPage; + + private String bookBorrowPage; + + private String borrowSearchPage; + + private String borrowReturnPage; + + private DAOSupport dao; + + public ModelAndView add(HttpServletRequest req, HttpServletResponse res) { + BookReginster bg = modifyBook(req); + if (dao.InsertOrUpdate(bg)) + return new ModelAndView(getAddPage(), "result", "ӳɹԼ"); + else + return new ModelAndView(getAddPage(), "result", + "ʧܣݻݿ"); + } + + public ModelAndView modify(HttpServletRequest req, HttpServletResponse res) { + BookReginster bg = modifyBook(req); + if (dao.InsertOrUpdate(bg)) + return list(req, res); + else + return new ModelAndView(getSearchPage(), "result", + "޸ʧܣݻݿ"); + } + + public ModelAndView list(HttpServletRequest req, HttpServletResponse res) { + List list = dao.QueryObject("from BookReginster"); + return new ModelAndView(getSearchPage(), "result", list); + } + + public ModelAndView search(HttpServletRequest req, HttpServletResponse res) { + List list; + String condition = req.getParameter("condition"); + if (condition.equals("")) + condition = "bookId"; + else if (condition.equals("")) + condition = "bookName"; + else + condition = "bookConcern"; + String conditionContent = req.getParameter("conditionContent"); + list = dao.QueryObject("from BookReginster where " + condition + + " like '" + conditionContent + "%'"); + return new ModelAndView(getSearchPage(), "result", list); + } + + public ModelAndView detail(HttpServletRequest req, HttpServletResponse res) { + List list; + String bookID = req.getParameter("bookID"); + list = dao.QueryObject("from BookReginster where bookId=" + bookID); + BookReginster bookDetail = (BookReginster) list.get(0); + return new ModelAndView(getBookDetailPage(), "result", bookDetail); + } + + public ModelAndView borrow(HttpServletRequest req, HttpServletResponse res) { + String submit = req.getParameter("save"); + List list = null; + Map model = null; + DocuStuInfo stuInfo = null; + BookReginster bookDetail = null; + BookBorrowInfo borrowInfo = null; + String stuId = req.getParameter("stu_id"); + String bookID = req.getParameter("book_id"); + if (stuId != null && !stuId.equals("")) { + list = null; + list = dao.QueryObject("from DocuStuInfo where stuId=" + stuId); + if (list != null && list.size() > 0) + stuInfo = (DocuStuInfo) list.get(0); + } + if (bookID != null && !bookID.equals("")) { + list = null; + list = dao.QueryObject("from BookReginster where bookId='" + bookID + + "'"); + if (list != null && list.size() > 0) + bookDetail = (BookReginster) list.get(0); + } + if (stuInfo != null) { + list = null; + list = dao + .QueryObject("from BookBorrowInfo where docuStuInfo.stuId='" + + stuInfo.getStuId() + "'"); + model = new HashMap(); + model.put("stu", stuInfo); + model.put("book", bookDetail); + model.put("list", list); + } + String price = req.getParameter("price"); + if (submit != null && price != null && !price.equals("")) { + System.out.println(req.getParameter("price") + ""); + borrowInfo = new BookBorrowInfo(); + borrowInfo.setBookName(req.getParameter("book_name")); + borrowInfo.setBookReginster(bookDetail); + borrowInfo.setBookType("book_type"); + borrowInfo.setBorrowDate(new Date(System.currentTimeMillis())); + borrowInfo.setCzy(req.getParameter("czy")); + borrowInfo.setDocuStuInfo(stuInfo); + borrowInfo.setPrice(Double.valueOf(price)); + dao.InsertOrUpdate(borrowInfo); + list = dao + .QueryObject("from BookBorrowInfo where docuStuInfo.stuId='" + + stuInfo.getStuId() + "'"); + model = new HashMap(); + model.put("stu", stuInfo); + model.put("list", list); + } + return new ModelAndView(getBookBorrowPage(), "info", model); + } + + public ModelAndView returnBook(HttpServletRequest req, + HttpServletResponse res) { + List list = null; + Map model = null; + DocuStuInfo stuInfo = null; + // BookReginster bookDetail = null; + BookBorrowInfo borrowInfo = null; + String submit = req.getParameter("return"); + String stuId = req.getParameter("stu_id"); + String bookID = req.getParameter("book_id"); + if (stuId != null && stuId != "") { + list = null; + list = dao.QueryObject("from DocuStuInfo where stuId=" + stuId); + if (list != null && list.size() > 0) + stuInfo = (DocuStuInfo) list.get(0); + } + // if (bookID != null && bookID != "") { + // list = null; + // list = dao.QueryObject("from BookBorrowInfo where + // bookReginster.bookId='" + bookID + // + "'"); + // if (list != null && list.size() > 0) + // bookDetail = (BookReginster) list.get(0); + // } + if (stuInfo != null && bookID != null) { + list = null; + String sql = "from BookBorrowInfo where docuStuInfo.stuId='" + + stuInfo.getStuId() + "' and bookReginster.bookId='" + + bookID + "'"; + list = dao.QueryObject(sql); + if (list != null && list.size() > 0) + borrowInfo = (BookBorrowInfo) list.get(0); + } + if (submit != null && stuId != null) {// ͨťύɾ¼ + list = null; + list = dao + .QueryObject("from BookBorrowInfo where docuStuInfo.stuId='" + + stuId + + "' and bookReginster.bookId='" + + bookID + + "'"); + if (list != null && list.size() > 0) + dao.DeleteObject(list.get(0)); + list = dao + .QueryObject("from BookBorrowInfo where docuStuInfo.stuId='" + + stuId + "'"); + System.out.println("submit list=" + list); + model = new HashMap(); + model.put("stu", stuInfo); + model.put("list", list); + return new ModelAndView(getBorrowReturnPage(), "info", model); + } + list = dao.QueryObject("from BookBorrowInfo where docuStuInfo.stuId='" + + stuId + "'"); + + model = new HashMap(); + model.put("stu", stuInfo); + // model.put("book", bookDetail); + model.put("borrow", borrowInfo);// ıϢ + model.put("list", list); + return new ModelAndView(getBorrowReturnPage(), "info", model); + } + + public ModelAndView borrowSearch(HttpServletRequest req, + HttpServletResponse res) { + List list = null; + String submit = req.getParameter("Submit"); + String showAll = req.getParameter("ShowAll"); + if (submit != null) { + String conditionContent = req.getParameter("conditionContent"); + String condition = req.getParameter("condition"); + if (condition.equals("")) + condition = "bookReginster.bookId"; + else if (condition.equals("ѧ")) + condition = "docuStuInfo.stuId"; + else { + condition = "borrowDate"; + } + if (!condition.equals("borrowDate")) + list = dao.QueryObject("from BookBorrowInfo where " + condition + + " = '" + conditionContent + "'"); + else + list = dao.QueryObject("from BookBorrowInfo where " + condition + + " >= '" + conditionContent + " 00:00:00' and " + + condition + " <= '" + conditionContent + " 23:59:59'"); + System.out.println(list.size()); + } + if (showAll != null) + list = dao.QueryObject("from BookBorrowInfo"); + return new ModelAndView(getBorrowSearchPage(), "list", list); + } + + public String getAddPage() { + return addPage; + } + + public void setAddPage(String addPage) { + this.addPage = addPage; + } + + public void setDao(DAOSupport dao) { + this.dao = dao; + } + + public String getSearchPage() { + return searchPage; + } + + public void setSearchPage(String searchPage) { + this.searchPage = searchPage; + } + + public String getBookDetailPage() { + return bookDetailPage; + } + + public void setBookDetailPage(String bookDetailPage) { + this.bookDetailPage = bookDetailPage; + } + + private BookReginster modifyBook(HttpServletRequest req) { + BookReginster bg = new BookReginster(); + bg.setBookId(req.getParameter("book_id"));// ͼID + bg.setBookConcern(req.getParameter("book_concern"));// + bg.setBookCount(Integer.valueOf(req.getParameter("book_count")));// ͼ + bg.setBookName(req.getParameter("book_name"));// + bg.setBookType(req.getParameter("book_type"));// ͼ + bg.setCzy(req.getParameter("czy"));// Ա + bg.setPrice(Double.valueOf(req.getParameter("price")));// + Date date = Date.valueOf(req.getParameter("publish_date")); + bg.setPublishDate(date); + date = Date.valueOf(req.getParameter("reg_date")); + bg.setRegDate(date); + String remark = req.getParameter("remark"); + if (remark.equals("")) + remark = null; + bg.setRemark(remark); + bg.setWriter(req.getParameter("writer")); + return bg; + } + + protected ModelAndView handleRequestInternal(HttpServletRequest req, + HttpServletResponse res) throws Exception { + req.setCharacterEncoding("gbk"); + return super.handleRequestInternal(req, res); + } + + public String getBookBorrowPage() { + return bookBorrowPage; + } + + public void setBookBorrowPage(String bookBorrowPage) { + this.bookBorrowPage = bookBorrowPage; + } + + public String getBorrowSearchPage() { + return borrowSearchPage; + } + + public void setBorrowSearchPage(String borrowSearch) { + this.borrowSearchPage = borrowSearch; + } + + public String getBorrowReturnPage() { + return borrowReturnPage; + } + + public void setBorrowReturnPage(String borrowReturn) { + this.borrowReturnPage = borrowReturn; + } +} diff --git a/09/src/com/spring/controller/DateEditor.java b/09/src/com/spring/controller/DateEditor.java new file mode 100644 index 0000000..27427e0 --- /dev/null +++ b/09/src/com/spring/controller/DateEditor.java @@ -0,0 +1,24 @@ +package com.spring.controller; + +import java.beans.PropertyEditorSupport; +import java.sql.Date; + +public class DateEditor extends PropertyEditorSupport { + public String getAsText() { + Object o = getValue(); + if (o == null || !(o instanceof Date)) { + return null; + } + return o.toString(); + } + + public void setAsText(String text) throws IllegalArgumentException { + Date date; + if (text != null && text != "") + date = Date.valueOf(text); + else + date = new Date(System.currentTimeMillis()); + setValue(date); + } + +} diff --git a/09/src/com/spring/controller/EmployeeLoader.java b/09/src/com/spring/controller/EmployeeLoader.java new file mode 100644 index 0000000..6db9d04 --- /dev/null +++ b/09/src/com/spring/controller/EmployeeLoader.java @@ -0,0 +1,170 @@ +package com.spring.controller; + +import java.sql.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.multiaction.MultiActionController; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.DocuTeaInfo; +import com.hibernate.model.EmplAssignCharge; +import com.hibernate.model.EmplAssignCourse; +import com.hibernate.model.SystemClassInfo; +import com.hibernate.model.SystemCourseCode; + +public class EmployeeLoader extends MultiActionController { + private DAOSupport dao; + + public ModelAndView assignCourse(HttpServletRequest req, + HttpServletResponse res) {// ν + String teaId = req.getParameter("teaId"); + String submit = req.getParameter("Submit"); + List list = dao.QueryObject("from SystemCourseCode"); + Map model = new HashMap(); + model.put("list", list); + if (teaId != null) { + list = dao.QueryObject("from DocuTeaInfo where teaId='" + teaId + + "'"); + if (list != null && list.size() > 0) + model.put("teaInfo", list.get(0)); + } + if (submit != null) { + String code = req.getParameter("code"); + DocuTeaInfo teaInfo = new DocuTeaInfo(teaId, null); + SystemCourseCode courseInfo = new SystemCourseCode(code); + EmplAssignCourse assignCourse = new EmplAssignCourse(teaInfo, + courseInfo); + System.out.println(Date.valueOf("2006-8-8")); + assignCourse.setRkrq(Date.valueOf(req.getParameter("rkrq").trim())); + dao.InsertOrUpdate(assignCourse); + model.remove("teaInfo"); + model.put("message", "ְɹ"); + } + return new ModelAndView("employeeview/teaInstateCourses", model); + } + + public ModelAndView assignCharge(HttpServletRequest req, + HttpServletResponse res) {// ΰ + String changeClassId = req.getParameter("changeClassId"); + String changeTeaId = req.getParameter("changeTeaId"); + String submit = req.getParameter("Submit"); + List list = dao.QueryObject("from SystemClassInfo"); + Map model = new HashMap(); + model.put("classInfo", list); + model.put("rowInfo", list.size()>0?list.get(0):null); + if (submit == null) { + if (changeClassId != null) { + list = dao.QueryObject("from SystemClassInfo where classid='" + + changeClassId + "'"); + if (list.size() > 0) { + model.put("rowInfo", list.get(0)); + } + } + if (changeTeaId != null) { + list = dao.QueryObject("from DocuTeaInfo where teaId='" + + changeTeaId + "'"); + if (list.size() > 0) + model.put("teaInfo", list.get(0)); + } + } else { + String teaId = req.getParameter("teaId"); + String classId = req.getParameter("classid"); + DocuTeaInfo teaInfo = new DocuTeaInfo(teaId, null); + SystemClassInfo classInfo = new SystemClassInfo(classId); + Date date = Date.valueOf(req.getParameter("rzrq")); + EmplAssignCharge assignCharge = new EmplAssignCharge(teaInfo, + classInfo); + assignCharge.setRzrq(date); + dao.InsertOrUpdate(assignCharge); + model.put("message", "ְγɹ"); + } + return new ModelAndView("employeeview/teaInstateCharge", model); + } + + public ModelAndView searchCharge(HttpServletRequest req, + HttpServletResponse res) {// ѯ + List list = null; + String history=req.getParameter("history"); + String nop=history==null?"=":"<>"; + String lsh = req.getParameter("lsh"); + if (lsh != null) {//ʦְ + list = dao.QueryObject("from EmplAssignCharge where lsh='" + lsh + + "'"); + if (list.size() > 0) { + EmplAssignCharge obj = (EmplAssignCharge) list.get(0); + obj.setLizhiDate(new Date(System.currentTimeMillis())); + dao.InsertOrUpdate(obj); + } + } + String condition = req.getParameter("condition"); + String conditionContent = req.getParameter("conditionContent"); + if (condition == null) { + condition = "systemClassInfo.systemSpecialtyCode.name"; + } + if (conditionContent == null) + conditionContent = ""; + list = dao.QueryObject("from EmplAssignCharge where " + condition + + " like '" + conditionContent + "%' and lizhiDate "+nop+" null"); + Map model = new HashMap(); + model.put("list", list); + model.put("condition", condition); + model.put("conditionContent", conditionContent); + model.put("history", history); + return new ModelAndView("employeeview/chargeSearch", model); + } + + public ModelAndView searchTeaCourse(HttpServletRequest req, + HttpServletResponse res) {// ѯονʦ + List list = null; + String history=req.getParameter("history"); + String nop=history==null?"=":"<>"; + String lsh = req.getParameter("lsh"); + System.out.println(333); + if (lsh != null) {//ʦְ + list = dao.QueryObject("from EmplAssignCourse where lsh='" + lsh + + "' and lizhiDate=null"); + if (list.size() > 0) { + EmplAssignCourse obj = (EmplAssignCourse) list.get(0); + obj.setLizhiDate(new Date(System.currentTimeMillis())); + dao.InsertOrUpdate(obj); + } + } + String condition = req.getParameter("condition"); + String conditionContent = req.getParameter("conditionContent"); + if (condition == null) { + condition = "systemCourseCode.subject"; + } + if (conditionContent == null) + conditionContent = ""; + list = dao.QueryObject("from EmplAssignCourse where " + condition + + " like '" + conditionContent + "%' and lizhiDate "+nop+" null"); + System.out.println(list.size()); + + Map model = new HashMap(); + model.put("list", list); + model.put("condition", condition); + model.put("conditionContent", conditionContent); + model.put("history", history); + return new ModelAndView("employeeview/teaCourseSearch", model); + } + + public DAOSupport getDao() { + return dao; + } + + public void setDao(DAOSupport dao) { + this.dao = dao; + } + + protected ModelAndView handleRequestInternal(HttpServletRequest request, + HttpServletResponse response) throws Exception { + request.setCharacterEncoding("gb2312"); + return super.handleRequestInternal(request, response); + } +} diff --git a/09/src/com/spring/controller/InfoListController.java b/09/src/com/spring/controller/InfoListController.java new file mode 100644 index 0000000..9e86487 --- /dev/null +++ b/09/src/com/spring/controller/InfoListController.java @@ -0,0 +1,209 @@ +package com.spring.controller; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.multiaction.MultiActionController; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.CourseStuInfo; +import com.hibernate.model.DocuStuInfo; +import com.hibernate.model.SystemClassInfoList; + +public class InfoListController extends MultiActionController { + private DAOSupport dao = null; + public DAOSupport getDao() { + return dao; + } + public void setDao(DAOSupport dao) { + this.dao = dao; + } + public ModelAndView listStuReg(HttpServletRequest request, + HttpServletResponse response) throws Exception { + String stuID = request.getParameter("stuid"); + List stuinfolist = dao.QueryObject("From DocuStuInfo where stuId = '" + + stuID + "'"); + if (stuinfolist.isEmpty()) { + return new ModelAndView("docuview/doc_stuinfo_reg", "sysMsgInf", + ""); + } + DocuStuInfo stuinfo = (DocuStuInfo) stuinfolist.get(0); + String classId = stuinfo.getStuId().substring(0, 6); + + String sp_code = stuinfo.getStuId().substring(0, 2); + List classmc = dao + .QueryObjectFromSql("select classmc from system_class_info where classid = '" + + classId + "'"); + List zymc = dao + .QueryObjectFromSql("select name from system_specialty_code where sp_code = '" + + sp_code + "'"); + java.sql.Date djrq = new java.sql.Date(System.currentTimeMillis()); + + java.util.Map mapStuinf = new java.util.HashMap(); + mapStuinf.put("lsh", String.valueOf(System.currentTimeMillis())); + mapStuinf.put("stuId", stuinfo.getStuId()); + mapStuinf.put("name", stuinfo.getName()); + mapStuinf.put("classid", classId); + mapStuinf.put("classmc", classmc.get(0)); + mapStuinf.put("zymc", zymc.get(0)); + mapStuinf.put("djrq", djrq); + + return new ModelAndView("docuview/doc_stuinfo_reg", "messages", + mapStuinf); + } + public ModelAndView listStuRegSerach(HttpServletRequest request, + HttpServletResponse response) throws Exception { + request.setCharacterEncoding("GBK"); + String propName = request.getParameter("select1"); + String conName = request.getParameter("select2"); + String strValue = request.getParameter("strvalue"); + + Map map = new HashMap(); + map.put("conName", conName); + map.put("propName", propName); + map.put("strValue", strValue); + if (conName.equals("DY")) + conName = ">"; + if (conName.equals("XY")) + conName = "<"; + if (conName.equals("DEY")) + conName = "="; + + String sqlSelect = null, fromStr = null, whereStr = null; + String selectStr = "select dsi.stuId,dsi.name,dsi.sfzhm,dsi.csrq,dsr.djrq,dsr.lqfs,dsr.jbr "; + + if (propName.equals("stuId")) { + fromStr = "from DocuStuRegister dsr where dsr.docuStuInfo.stuId "; + } else { + fromStr = "from DocuStuRegister dsr where dsr." + propName; + } + whereStr = conName + "'" + strValue + "'"; + sqlSelect = fromStr + whereStr; + List msgList = dao.QueryObject(sqlSelect); + if (msgList.isEmpty()) { + map.put("messages", null); + map.put("msg", "ϵͳʾûҵ!!"); + return new ModelAndView("docuview/doc_stuinfo_reglist", map); + } else { + map.put("messages", msgList); + map.put("msg", null); + return new ModelAndView("docuview/doc_stuinfo_reglist", map); + } + } + public ModelAndView listAllStu(HttpServletRequest request, + HttpServletResponse response) throws Exception { + System.out.println("listAllStuִ"); + List stuList = dao.QueryObject("from DocuStuInfo"); + System.out.println("ѧ" + stuList.size()); + + return new ModelAndView("docuview/doc_stuinfo_reglist", "messages", + stuList); + } + public ModelAndView listStuModi(HttpServletRequest request, + HttpServletResponse response) throws Exception { + request.setCharacterEncoding("GBK"); + String conStr = request.getParameter("select"); + String sValue = request.getParameter("strvalue"); + if (sValue == null) { + conStr = "stuId"; + sValue = ""; + } + List stuList = dao.QueryObject("from DocuStuInfo where " + conStr + + " like '" + sValue + "%'"); + Map model = new HashMap(); + model.put("messages", stuList); + model.put("selectStr", conStr); + model.put("conValue", sValue); + return new ModelAndView("docuview/doc_stuinfo_modify", model); + } + public ModelAndView listStuModiSave(HttpServletRequest request, + HttpServletResponse response) throws Exception { + String id = request.getParameter("id"); + // System.out.println("޸ķеid:" + id); + // String sqlxxx = "from DocuStuRegister dsg where dsg.docuStuInfo + // >'01010101'"; + // dao.DeleteObject(sqlxxx); + + List stuList = dao.QueryObject("from DocuStuInfo where stuId = '" + id + + "'"); + DocuStuInfo stuinfo = (DocuStuInfo) stuList.get(0); + Iterator aa = stuinfo.getCourseStu().iterator(); + while (aa.hasNext()) { + CourseStuInfo cour = (CourseStuInfo) aa.next(); + System.out.println("ExamDate:" + cour.getExamDate()); + System.out.println("grade:" + cour.getGrade()); + + } + return new ModelAndView("docuview/doc_stuinfo_modify_save", "messages", + (DocuStuInfo) stuList.get(0)); + } + public ModelAndView listClass(HttpServletRequest request, + HttpServletResponse response) throws Exception { + String name = request.getParameter("name"); + // ð༶Ϣ + if (name.equals("csl") || name == "csl") { + String classSql = null; + classSql = "SELECT cs.classid as classid, cs.classmc as classmc, sp.name as spname, gr.gr_name as grname " + + " FROM system_class_info cs, system_specialty_code sp ,system_grade_code gr where cs.sp_code = sp.sp_code and cs.gr_code = gr.gr_code"; + List classinfo = dao.QueryObjectFromSql(classSql); + List classlist = new ArrayList(); + for (int i = 0; i < classinfo.size(); i++) { + SystemClassInfoList clt = new SystemClassInfoList(); + Object[] objcs = (Object[]) classinfo.get(i); + clt.setClassid(objcs[0].toString()); + clt.setClassmc(objcs[1].toString()); + clt.setGrname(objcs[2].toString()); + clt.setSpname(objcs[3].toString()); + classlist.add(clt); + } + return new ModelAndView("docuview/doc_class_info", "classinfo", + classlist); + // ð༶Ϣ + } else if (name.equals("cs2") || name == "cs2") { + List classlist = dao.QueryObject(" From SystemClassInfo"); + String newstuid = ""; + Map map = new HashMap(); + map.put("classinfo", classlist); + map.put("newstuid", newstuid); + return new ModelAndView("docuview/doc_stuinfo_input", "messages", + map); + } else { + return null; + } + } + + public ModelAndView createID(HttpServletRequest request, + HttpServletResponse response) throws Exception { + String id = null, newstuid = null; + id = request.getParameter("id"); + String sqlStr = "SELECT MAX(stu_id) FROM docu_stu_info WHERE (LEFT(stu_id, 6) = '" + + id + "')"; + List stuid = dao.QueryObjectFromSql(sqlStr); + Object maxobj = stuid.get(0); + if (maxobj == null) { + newstuid = id + "01"; + } else { + String a1 = maxobj.toString(); + int aa = Integer.parseInt(a1.substring(a1.length() - 2)) + 1; + if (aa > 9) { + newstuid = (id.substring(0, 6) + aa) + ""; + } else { + newstuid = (id.substring(0, 6) + "0" + aa) + ""; + } + } + List classlist = dao.QueryObject(" From SystemClassInfo"); + Map map = new HashMap(); + map.put("classinfo", classlist); + map.put("newstuid", newstuid); + map.put("classid", id); + System.out.println(id); + return new ModelAndView("docuview/doc_stuinfo_input", "messages", map); + } +} diff --git a/09/src/com/spring/controller/LoginController.java b/09/src/com/spring/controller/LoginController.java new file mode 100644 index 0000000..38e5b29 --- /dev/null +++ b/09/src/com/spring/controller/LoginController.java @@ -0,0 +1,50 @@ +package com.spring.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.AbstractController; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.Login; + +public class LoginController extends AbstractController { + private DAOSupport dao = null; + + protected ModelAndView handleRequestInternal(HttpServletRequest request, + HttpServletResponse response) throws Exception { + Map model = new HashMap(); + HttpSession session = request.getSession(); + String user = request.getParameter("username"); + String pass = request.getParameter("password"); + String action = request.getParameter("action"); + if (action == null) { + List list = dao.QueryObject("from Login where username='" + user + + "' and password='" + pass + "'"); + if (list.size() > 0) { + Login login = (Login) list.get(0); + session.setAttribute("loginUser", login); + model.put("message", ""); + } else { + model.put("message", "ûڻ"); + } + }else{ + session.removeAttribute("loginUser"); + } + return new ModelAndView("left", model); + } + + public DAOSupport getDao() { + return dao; + } + + public void setDao(DAOSupport dao) { + this.dao = dao; + } +} diff --git a/09/src/com/spring/controller/SearchUser.java b/09/src/com/spring/controller/SearchUser.java new file mode 100644 index 0000000..8d0212a --- /dev/null +++ b/09/src/com/spring/controller/SearchUser.java @@ -0,0 +1,54 @@ +package com.spring.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.AbstractController; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.Login; + +public class SearchUser extends AbstractController { + private DAOSupport dao; + + protected ModelAndView handleRequestInternal(HttpServletRequest request, + HttpServletResponse response) throws Exception { + request.setCharacterEncoding("gb2312"); + List list; + Map model = new HashMap(); + String condition = request.getParameter("condition"); + String conditionContent = request.getParameter("conditionContent"); + if (conditionContent == null) + conditionContent = ""; + if (condition == null) + condition = "name"; + String id = request.getParameter("id"); + if (id != null) { + int mid = Integer.parseInt(id); + Login user = (Login) dao.getObject(Login.class, mid); + if (!user.getUsername().equals("mr")) + dao.DeleteObject(user); + else + model.put("message", "ɾʼû"); + } + list = dao.QueryObject("from Login where " + condition + " like '" + + conditionContent + "%'"); + model.put("list", list); + model.put("condition", condition); + model.put("conditionContent", conditionContent); + return new ModelAndView("userManager/userSearch", model); + } + + public DAOSupport getDao() { + return dao; + } + + public void setDao(DAOSupport dao) { + this.dao = dao; + } +} diff --git a/09/src/com/spring/controller/SourceAddBatch.java b/09/src/com/spring/controller/SourceAddBatch.java new file mode 100644 index 0000000..eaa031d --- /dev/null +++ b/09/src/com/spring/controller/SourceAddBatch.java @@ -0,0 +1,119 @@ +package com.spring.controller; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.sql.Date; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.validation.BindException; +import org.springframework.web.bind.ServletRequestDataBinder; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.AbstractController; +import org.springframework.web.servlet.mvc.SimpleFormController; +import org.springframework.web.servlet.view.RedirectView; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.CourseStuInfo; +import com.hibernate.model.DocuStuInfo; +import com.hibernate.model.SystemCourseCode; + +public class SourceAddBatch extends AbstractController{ + private DAOSupport dao; + private String successView; + public DAOSupport getDao() { + return dao; + } + + public void setDao(DAOSupport dao) { + this.dao = dao; + } + + protected ModelAndView handleRequestInternal(HttpServletRequest req, HttpServletResponse rep) throws Exception { + req.setCharacterEncoding("GB2312"); + String stuId,examType; + Date examDate; + stuId = req.getParameter("stuId"); + examType = req.getParameter("examType"); + examDate = Date.valueOf(req.getParameter("examDate")); + String findSql = "From CourseStuInfo csi where csi.docuStuInfo.stuId = '" + stuId + + "' and examType = '" + examType + "' and examDate = '" + examDate + "'"; + List findList = dao.QueryObject(findSql); + System.out.println("findList: " + findList); + System.out.println("findList.isEmpty(): " + findList.isEmpty()); + if(!findList.isEmpty()){ + Map model = new HashMap(); + model.put("message", "ѧijɼѾڣ!!!"); + List list = dao.QueryObject("from SystemCourseCode"); + model.put("list", list); + return new ModelAndView("/sourceview/doc_stusource_input", model); + //return new ModelAndView(new RedirectView("regCjInfo.htm"),model); + } + + List list = dao.QueryObject("from SystemCourseCode"); + Object[] obj = list.toArray(); + + //DocuStuInfo stuinfo = new DocuStuInfo(); + List stuList = dao.QueryObject("from DocuStuInfo where stu_id = '" + req.getParameter("stuId") +"'"); + System.out.println("sddds:" + stuList); + DocuStuInfo stuinfo = (DocuStuInfo)stuList.get(0); + Set MM = stuinfo.getCourseStu(); + //Set MM = new HashSet(); + //stuinfo.setStuId(req.getParameter("stuId")); + for(int i = 0 ; i < obj.length ; i ++){ + SystemCourseCode courseObject = (SystemCourseCode)obj[i]; + CourseStuInfo regForm = new CourseStuInfo(); + regForm.setDocuStuInfo(stuinfo); + regForm.setSystemCourseCode(courseObject); + regForm.setCzy(req.getParameter("czy")); + regForm.setExamType(req.getParameter("examType")); + regForm.setExamDate(Date.valueOf(req.getParameter("examDate"))); + regForm.setGrade(Float.valueOf(req.getParameter("grade" + courseObject.getCode()))); + //stuinfo.getCourseStu().add(regForm); + MM.add(regForm); + //dao.InsertOrUpdate(regForm); + } + //stuinfo.setCourseStu(MM); + dao.InsertOrUpdate(stuinfo); + + + Map model = new HashMap(); + model.put("message", "ɼ¼ɹ¼!!!"); + List listcode = dao.QueryObject("from SystemCourseCode"); + model.put("list", listcode); + return new ModelAndView("/sourceview/doc_stusource_input", model); + /*if (submit==null||submit.length()<=0){ + if(stuId != null){ + List list1 = dao.QueryObject("from DocuStuInfo where stuId='"+ stuId + "'"); + DocuStuInfo stuinfo = (DocuStuInfo)list1.get(0); + model.put("stuName", stuinfo.getName()); + } + + model.put("list", list); + }else{ + CourseStuInfo regForm = new CourseStuInfo(); + DocuStuInfo insertStuInfo=new DocuStuInfo(); + insertStuInfo.setStuId(req.getParameter("stuId")); + regForm.setDocuStuInfo(insertStuInfo); + SystemCourseCode insertCourseCode=new SystemCourseCode(); + insertCourseCode.setCode(req.getParameter("code")); + regForm.setSystemCourseCode(insertCourseCode); + model.put("form", regForm); + dao.InsertOrUpdate(regForm); + model.put("message", "ɼ¼ɹ¼롣"); + } */ + + } + + public String getSuccessView() { + return successView; + } + + public void setSuccessView(String successView) { + this.successView = successView; + } + +} diff --git a/09/src/com/spring/controller/SourceInfoList.java b/09/src/com/spring/controller/SourceInfoList.java new file mode 100644 index 0000000..73c2033 --- /dev/null +++ b/09/src/com/spring/controller/SourceInfoList.java @@ -0,0 +1,71 @@ +package com.spring.controller; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Vector; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.AbstractController; +import org.springframework.web.servlet.mvc.multiaction.MultiActionController; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.CourseStuInfo; +import com.hibernate.model.SystemCourseCode; + +public class SourceInfoList extends MultiActionController{ + private DAOSupport dao = null; + + public DAOSupport getDao() { + return dao; + } + public void setDao(DAOSupport dao) { + this.dao = dao; + } + public ModelAndView LinkSourceList(HttpServletRequest request, HttpServletResponse response) throws Exception { +// SystemClassInfo classInfo = + List listClass = dao.QueryObject("From SystemClassInfo"); + System.out.println("class:" + listClass); + return new ModelAndView("docuview/doc_stusource_list", "classlist",listClass); + } + public ModelAndView ClassSourceList(HttpServletRequest request, HttpServletResponse response) throws Exception { + List listClass = dao.QueryObject("From SystemClassInfo"); + System.out.println("class:" + listClass); + + List courseList = dao.QueryObject("from SystemCourseCode"); + java.util.Vector vname = new java.util.Vector(); + vname.addElement("ѧ"); + Iterator iterator = courseList.iterator(); + int index = 0; + while(iterator.hasNext()){ + SystemCourseCode courseObject = (SystemCourseCode)iterator.next(); + vname.addElement(courseObject.getSubject()); + index ++; + } + List courseListObject = dao.QueryObject("FROM CourseStuInfo "); + System.out.println("courseListObject:" + courseListObject); + Object[] courseArray = courseListObject.toArray(); + int count = courseArray.length; + java.util.Collection collection = new java.util.ArrayList(); + int modcount = count / index; + for(int i = 0 ; i < modcount; i++){ + Vector vdata = new Vector(); + CourseStuInfo coursename = (CourseStuInfo)courseArray[i * index]; + vdata.addElement(coursename.getDocuStuInfo().getName()); + for(int j = 0 ; j < index ; j++){ + CourseStuInfo course = (CourseStuInfo)courseArray[i * index + j]; + vdata.addElement(course.getGrade()); + } + collection.add(vdata); + } + Map map = new HashMap(); + map.put("clname", listClass); + map.put("tname", vname); + map.put("cdata", collection); + return new ModelAndView("docuview/doc_stusource_list", "map",map); + } +} diff --git a/09/src/com/spring/controller/SourceLoader.java b/09/src/com/spring/controller/SourceLoader.java new file mode 100644 index 0000000..cfd6d21 --- /dev/null +++ b/09/src/com/spring/controller/SourceLoader.java @@ -0,0 +1,259 @@ +package com.spring.controller; + +import java.io.UnsupportedEncodingException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Vector; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.multiaction.MultiActionController; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.CourseStuInfo; +import com.hibernate.model.DocuStuInfo; +import com.hibernate.model.SystemClassInfo; +import com.hibernate.model.SystemCourseCode; + +public class SourceLoader extends MultiActionController { + private DAOSupport dao; + public ModelAndView reg(HttpServletRequest req, HttpServletResponse res) { + List list = dao.QueryObject("from SystemCourseCode"); + Map model = new HashMap(); + model.put("list", list); + String stuIdstr = req.getParameter("stuId"); + if (stuIdstr != null) { + List list1 = dao.QueryObject("from DocuStuInfo where stuId='" + + stuIdstr + "'"); + if (list1 != null&&list1.size()>0) { + DocuStuInfo stuInfo = (DocuStuInfo) list1.get(0); + model.put("stuInfo", stuInfo); + } + } + return new ModelAndView("/sourceview/doc_stusource_input", model); + } + public ModelAndView search(HttpServletRequest req, HttpServletResponse res) { + System.out.println(33333); + try { + req.setCharacterEncoding("GBK"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + String condition = req.getParameter("condition"); + String conditionContent = req.getParameter("conditionContent"); + List list = null; + System.out.println(condition); + if (condition != null && conditionContent != null) { + System.out.println("ccc"+condition); + if (condition.equals("")) + condition = "examType"; + else if (condition.equals("Ŀ")) + condition = "systemCourseCode.subject"; + else if (condition.equals("ѧ")) + condition = "docuStuInfo.name"; + else if (condition.equals("ѧ")) + condition = "docuStuInfo.stuId"; + else + condition = "docuStuInfo.name"; + list = dao.QueryObject("from CourseStuInfo where " + condition + + " like '" + conditionContent + "%'"); + } else { + list = dao.QueryObject("from CourseStuInfo"); + } + Map model = new HashMap(); + model.put("list", list); + return new ModelAndView("/sourceview/doc_stusource_search", model); + } + /** + * ༶Գɼѯ + */ + public ModelAndView ClassSourceList(HttpServletRequest request, + HttpServletResponse response) throws Exception { + String classid = request.getParameter("selectmc"); + if (classid == null) + classid = "%"; + String examType = request.getParameter("typeexam"); + if (examType == null || examType.length() <= 0) { + examType = "%"; + } else { + examType = new String(request.getParameter("typeexam").getBytes( + "iso-8859-1"), "gb2312"); + } + String examDate = request.getParameter("dateexam"); + + List listClass = dao.QueryObject("From SystemClassInfo"); + List courseList = dao.QueryObject("from SystemCourseCode"); + + java.util.Vector vname = new java.util.Vector(); + vname.addElement("ѧ"); + vname.addElement(""); + vname.addElement(""); + Iterator iterator = courseList.iterator(); + int index = 0; + while (iterator.hasNext()) { + SystemCourseCode courseObject = (SystemCourseCode) iterator.next(); + vname.addElement(courseObject.getSubject()); + index++; + } + vname.addElement("ܷ"); + String sqlSelect = null; + if (examDate == null || examDate.length() <= 0) { + examDate = "%"; + sqlSelect = "SELECT * FROM course_stu_info WHERE (SUBSTRING(stu_id, 1, 6) LIKE '" + + classid + + "' AND exam_type LIKE '" + + examType+ "')"; + } else { + sqlSelect = "SELECT * FROM course_stu_info WHERE (SUBSTRING(stu_id, 1, 6) LIKE '" + + classid + + "' AND exam_type LIKE '" + + examType + + "' AND exam_date = '" + examDate + "')"; + } + List courseListObject = dao.QueryObjectFromSql(sqlSelect, + "course_stu_info", new CourseStuInfo()); + System.out.println(courseListObject); + Object[] courseArray = courseListObject.toArray(); + int count = courseArray.length; + java.util.Collection collection = new java.util.ArrayList(); + int modcount = count / index; + + for (int i = 0; i < modcount; i++) { + Vector vdata = new Vector(); + CourseStuInfo coursename = (CourseStuInfo) courseArray[i * index]; + vdata.addElement(coursename.getDocuStuInfo().getName()); + vdata.addElement(coursename.getExamType()); + vdata.addElement(coursename.getExamDate()); + + float gradesum = 0.0f; + for (int j = 0; j < index; j++) { + CourseStuInfo course = (CourseStuInfo) courseArray[i * index + + j]; + vdata.addElement(course.getGrade()); + gradesum = gradesum + + Float.parseFloat(String.valueOf(course.getGrade())); + } + vdata.addElement(Float.valueOf(gradesum)); + gradesum = 0.0f; + collection.add(vdata); + } + classid = request.getParameter("selectmc"); + Map map = new HashMap(); + map.put("clname", listClass); + map.put("tname", vname); + map.put("cdata", collection); + map.put("oldmc", classid); + return new ModelAndView("sourceview/doc_stusource_class_gather", "map", + map); + } + /** + * 꼶Գɼͳ + */ + public ModelAndView GradeSourceList(HttpServletRequest request, + HttpServletResponse response) throws Exception { + String gradeid = request.getParameter("selectmc"); + String examType = request.getParameter("typeexam"); + String examDate = request.getParameter("dateexam"); + List listGrade = dao.QueryObject("From SystemGradeCode"); + List courseList = dao.QueryObject("From SystemCourseCode"); + Map map = new HashMap(); + map.put("grname", listGrade); + + java.util.Vector vname = new java.util.Vector(); + vname.addElement("༶"); + vname.addElement("ѧ"); + vname.addElement(""); + vname.addElement(""); + map.put("tname", vname); + if (examType != null && !examType.equals("")) { + examType = new String(request.getParameter("typeexam").getBytes( + "iso-8859-1"), "gb2312"); + } else { + map.put("message", "ѯ"); + return new ModelAndView("sourceview/doc_stusource_grade_gather", + "map", map); + } + Iterator iterator = courseList.iterator(); + int index = 0; + while (iterator.hasNext()) { + SystemCourseCode courseObject = (SystemCourseCode) iterator.next(); + vname.addElement(courseObject.getSubject()); + index++; + } + vname.addElement("ܷ"); + String sqlSelect = null; + if (examType == null || examType.equals("")) { + sqlSelect = "select code,left(stu_id,6) as ༶,str(sum(grade)/count(stu_id),10,2) as ༶ɼ,count(stu_id) as ༶ from course_stu_info group by code,left(stu_id,6) "; + } else { + System.out.println("no null"); + sqlSelect = "select code,left(stu_id,6) as ༶,str(sum(grade)/count(stu_id),10,2) as ༶ɼ,count(stu_id) as ༶ from course_stu_info where left(stu_id,2)='"+gradeid+"' and exam_type = '" + + examType + + "' and exam_date = '" + + examDate + + "' group by code,left(stu_id,6)"; + } + + List courseListObject = dao.QueryObjectFromSql(sqlSelect); + + /* + * Iterator it = courseListObject.iterator(); while(it.hasNext()){ + * Object[] results = (Object[])it.next(); + * + * System.out.println(results); for(int i = 0 ; i < results.length ; + * i++){ System.out.println(": " + results[i]); } } + */ + Object[] courseArray = courseListObject.toArray(); + int count = courseArray.length; + java.util.Collection collection = new java.util.ArrayList(); + int modcount = count / index; + for (int i = 0; i < modcount; i++) { + Vector vdata = new Vector(); + Object[] results = (Object[]) courseArray[i * index]; + String classid = String.valueOf(results[1]); + List classObjectList = dao + .QueryObject("From SystemClassInfo where classid = '" + + classid + "'"); + SystemClassInfo classobj = (SystemClassInfo) classObjectList.get(0); + vdata.addElement(classobj.getClassmc()); + vdata.addElement(results[3]); + vdata.addElement(examType); + vdata.addElement(examDate); + + float gradesum = 0.00f; + for (int j = 0; j < index; j++) { + Object[] course = (Object[]) courseArray[i * index + j]; + vdata.addElement(course[2]); + gradesum = gradesum + + Float.parseFloat(String.valueOf(course[2])); // ܷ + } + java.text.DecimalFormat formatsum = new java.text.DecimalFormat( + "#.00"); + vdata.addElement(formatsum.format(gradesum)); + gradesum = 0.0f; + collection.add(vdata); + } + gradeid = request.getParameter("selectmc"); + if (examDate == null || examType == null) { + map.put("cdata", null); + } else { + map.put("cdata", collection); + } + map.put("oldmc", gradeid); + map.put("examType", examType); + map.put("examDate", examDate); + return new ModelAndView("sourceview/doc_stusource_grade_gather", "map", + map); + } + public DAOSupport getDao() { + return dao; + } + + public void setDao(DAOSupport dao) { + this.dao = dao; + } + +} diff --git a/09/src/com/spring/controller/StuInfoController.java b/09/src/com/spring/controller/StuInfoController.java new file mode 100644 index 0000000..7bc106d --- /dev/null +++ b/09/src/com/spring/controller/StuInfoController.java @@ -0,0 +1,86 @@ +package com.spring.controller; + + +import java.util.HashMap; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.validation.BindException; +import org.springframework.web.bind.ServletRequestDataBinder; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.SimpleFormController; +import org.springframework.web.servlet.view.RedirectView; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.DocuStuInfo; +import com.hibernate.model.DocuStuRegister; +import com.hibernate.model.SystemClassInfo; + + +public class StuInfoController extends SimpleFormController{ + private DAOSupport dao = null; + + protected Object formBackingObject(HttpServletRequest request) throws Exception { + request.setCharacterEncoding("gb2312");//ַ + String cname = request.getParameter("ctname"); + if (cname.equals("dsi")||cname=="dsi"){ + this.setCommandClass(DocuStuInfo.class); + }else if(cname.equals("dsim")||cname=="dsim"){ + this.setCommandClass(DocuStuInfo.class); + }else if(cname.equals("dsg")||cname == "dsg"){ + this.setCommandClass(DocuStuRegister.class); + } + return super.formBackingObject(request); + } + + protected void initBinder(HttpServletRequest request, ServletRequestDataBinder response) throws Exception { + response.registerCustomEditor(java.sql.Date.class, null, + new DateEditor()); + } + + protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse reponse, Object obj, BindException arg3) + throws Exception { + String viewPage = ""; + HashMap msg = new HashMap(); + String cname = request.getParameter("ctname"); + if (cname.equals("dsi")||cname=="dsi"){ + DocuStuInfo stuform =(DocuStuInfo)obj; + dao.InsertOrUpdate(stuform); + viewPage = "docuview/doc_stuinfo_input"; + setFormView(viewPage); + List classlist = dao.QueryObject(" From SystemClassInfo"); + msg.put("classinfo", classlist); + msg.put("msg", "ѧϢ¼ɹ!!!"); + }else if(cname.equals("dsim")||cname=="dsim"){ + DocuStuInfo stuform =(DocuStuInfo)obj; + dao.InsertOrUpdate(stuform); + return new ModelAndView(new RedirectView("listStuModi.htm")); + }else if (cname.equals("dsg")||cname == "dsg"){ + viewPage = "docuview/doc_stuinfo_reg"; + setFormView(viewPage); + List stuRegList = dao.QueryObject("From DocuStuRegister dsr where dsr.docuStuInfo.stuId = '" + request.getParameter("stu_id") + "'"); + if(!stuRegList.isEmpty()){ + msg.put("msg", "ѧѾǼ,ѡ!!!"); + return new ModelAndView(viewPage,"messages",msg); + } + DocuStuRegister stuRegForm = (DocuStuRegister)obj; + DocuStuInfo docuStuInfo = new DocuStuInfo(); + docuStuInfo.setStuId(request.getParameter("stu_id")); + stuRegForm.setDocuStuInfo(docuStuInfo); + SystemClassInfo systemClassInfo = new SystemClassInfo(); + systemClassInfo.setClassid(request.getParameter("classid")); + stuRegForm.setSystemClassInfo(systemClassInfo); + dao.InsertOrUpdate(stuRegForm); + msg.put("msg", "ѧǼϢ¼ɹ!!!"); + } + return new ModelAndView(viewPage,"messages",msg); + } + public DAOSupport getDao() { + return dao; + } + public void setDao(DAOSupport dao) { + this.dao = dao; + } +} diff --git a/09/src/com/spring/controller/SysCodeForm.java b/09/src/com/spring/controller/SysCodeForm.java new file mode 100644 index 0000000..4adbc6a --- /dev/null +++ b/09/src/com/spring/controller/SysCodeForm.java @@ -0,0 +1,64 @@ +package com.spring.controller; +import java.util.HashMap; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.validation.BindException; +import org.springframework.web.bind.ServletRequestDataBinder; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.SimpleFormController; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.SystemCourseCode; +import com.hibernate.model.SystemGradeCode; +import com.hibernate.model.SystemSpecialtyCode; + +public class SysCodeForm extends SimpleFormController { + private DAOSupport dao = null; + + public DAOSupport getDao() { + return dao; + } + public void setDao(DAOSupport dao) { + this.dao = dao; + } + protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse reponse, Object obj, BindException arg3) throws Exception { + String objName = request.getParameter("objname"); + String viewPage = null; + System.out.println("objName= " + objName); + if (objName.equals("SystemSpecialtyCode")){ + SystemSpecialtyCode objhiber = (SystemSpecialtyCode) obj; + viewPage = "sys_code_sp"; + dao.InsertOrUpdate(objhiber); + }else if(objName.equals("SystemGradeCode")){ + SystemGradeCode objhiber = (SystemGradeCode) obj; + viewPage = "sys_code_grade"; + dao.InsertOrUpdate(objhiber); + }else if(objName.equals("SystemCourseCode")){ + SystemCourseCode objhiber = (SystemCourseCode)obj; + viewPage = "sys_code_subject"; + dao.InsertOrUpdate(objhiber); + } + List spList = dao.QueryObject("from " + objName); + + return new ModelAndView("systemview/" + viewPage, "listObject", spList); + + + } + protected Object formBackingObject(HttpServletRequest request) throws Exception { + request.setCharacterEncoding("gb2312");//ַ + String className = request.getParameter("objname"); + if (className.equals("SystemSpecialtyCode")) { + this.setCommandClass(SystemSpecialtyCode.class); + }else if (className.equals("SystemGradeCode")) { + this.setCommandClass(SystemGradeCode.class); + }else if(className.equals("SystemCourseCode")){ + this.setCommandClass(SystemCourseCode.class); + } + return super.formBackingObject(request); + } +} + + diff --git a/09/src/com/spring/controller/SystemClassControl.java b/09/src/com/spring/controller/SystemClassControl.java new file mode 100644 index 0000000..97e01d7 --- /dev/null +++ b/09/src/com/spring/controller/SystemClassControl.java @@ -0,0 +1,98 @@ +package com.spring.controller; + +import java.util.AbstractList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.ArrayList; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.Controller; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.SystemClassInfo; +import com.hibernate.model.SystemGradeCode; +import com.hibernate.model.SystemSpecialtyCode; +import com.hibernate.model.SystemClassInfoList; + +public class SystemClassControl implements Controller { + private DAOSupport dao = null; + private String pageView = null; + + public DAOSupport getDao() { + return dao; + } + + public String getPageView() { + return pageView; + } + + public void setPageView(String pageView) { + this.pageView = pageView; + } + + public void setDao(DAOSupport dao) { + this.dao = dao; + } + + public ModelAndView handleRequest(HttpServletRequest request, + HttpServletResponse response) throws Exception { + + request.setCharacterEncoding("gb2312"); + String name = request.getParameter("classname"); + + SystemClassInfo objclass = new SystemClassInfo(); + String spcode = request.getParameter("hiddspcode"); + String grcode = request.getParameter("hiddgrcode"); + String newclassid = null; + List maxclass = dao.QueryObject("select max(classid) from SystemClassInfo sci where sci.systemSpecialtyCode.spCode = " + spcode + " and sci.systemGradeCode.grCode =" + grcode); + Object maxobj = maxclass.get(0); + if (maxobj==null) { + newclassid = spcode + grcode + "01"; + } else { + String a1 = maxobj.toString(); + int aa = Integer.parseInt(a1.substring(a1.length() - 2)) + 1; + if(aa > 9){ + newclassid = (spcode + grcode + aa) + ""; + }else{ + newclassid = (spcode + grcode + "0" + aa) + ""; + } + } + objclass.setClassmc(name); + SystemSpecialtyCode spcodeobject = new SystemSpecialtyCode(); + spcodeobject.setSpCode(request.getParameter("hiddspcode")); + SystemGradeCode grcodeobject = new SystemGradeCode(); + grcodeobject.setGrCode(request.getParameter("hiddgrcode")); + + objclass.setSystemGradeCode(grcodeobject); + objclass.setSystemSpecialtyCode(spcodeobject); + + objclass.setClassid(newclassid); + dao.InsertOrUpdate(objclass); + Map mapMessage = new HashMap(); + List gradeList = dao.QueryObject("from SystemGradeCode"); + List specList = dao.QueryObject("from SystemSpecialtyCode"); + String classSql = null; + classSql = "SELECT cs.classid as classid, cs.classmc as classmc, sp.name as spname, gr.gr_name as grname " + +" FROM system_class_info cs, system_specialty_code sp ,system_grade_code gr where cs.sp_code = sp.sp_code and cs.gr_code = gr.gr_code"; + List classinfo = dao.QueryObjectFromSql(classSql); + + List classlist = new ArrayList(); + + for(int i=0;i 0 ? list.get(0) == null ? false : true + : false; + if (haveTea && form.getTeaId() == null) {// formвteaId˵¼ + list = dao.QueryObject("from SystemSpecialtyCode"); + Map model = new HashMap(); + model.put("list", list); + model.put("alert", "֤" + form.getSfzh() + "Ծ"); + return new ModelAndView(getSuccessView(), model); + } else if (haveTea && form.getTeaId() != null) {// formаteaId˵޸ + dao.InsertOrUpdate(form); + list = dao.QueryObject("from DocuTeaInfo"); + Map model = new HashMap(); + model.put("list", list); + return new ModelAndView("/docuview/teaDocuService", model); + } + list = dao.QueryObject("select max(teaId) from DocuTeaInfo where " + + "systemSpecialtyCode.spCode='" + + form.getSystemSpecialtyCode().getSpCode() + "'"); + if (list.get(0) != null) { + maxId = list.get(0) + ""; + } + if (maxId != null) { + int id = Integer.parseInt(maxId.substring(maxId.length() - 2)) + 1; + String sid = id + ""; + if (id < 10) + sid = "0" + sid; + maxId = form.getSystemSpecialtyCode().getSpCode() + sid; + } else { + maxId = form.getSystemSpecialtyCode().getSpCode() + "01"; + } + form.setTeaId(maxId); + dao.InsertOrUpdate(form); + list = dao.QueryObject("from SystemSpecialtyCode"); + Map model = new HashMap(); + model.put("list", list); + model.put("info", form); + return new ModelAndView(getSuccessView(), model); + } + + protected void initBinder(HttpServletRequest arg0, + ServletRequestDataBinder binder) throws Exception { + // SimpleDateFormat df = (SimpleDateFormat) + // DateFormat.getDateInstance(); + // df.applyPattern("yyyy-mm-dd"); + binder + .registerCustomEditor(java.sql.Date.class, null, + new DateEditor()); + arg0.setCharacterEncoding("gbk"); + System.out.println("init End"); + } + + public DAOSupport getDao() { + return dao; + } + + public void setDao(DAOSupport dao) { + this.dao = dao; + } +} diff --git a/09/src/com/spring/controller/TeaLoader.java b/09/src/com/spring/controller/TeaLoader.java new file mode 100644 index 0000000..bdc5afc --- /dev/null +++ b/09/src/com/spring/controller/TeaLoader.java @@ -0,0 +1,74 @@ +package com.spring.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.multiaction.MultiActionController; + +import com.hibernate.dao.DAOSupport; +import com.hibernate.model.DocuTeaInfo; + +public class TeaLoader extends MultiActionController { + private DAOSupport dao; + + public ModelAndView reg(HttpServletRequest req, HttpServletResponse res) { + List list = dao.QueryObject("from SystemSpecialtyCode"); + Map model = new HashMap(); + model.put("list", list); + return new ModelAndView("/docuview/doc_tea_info_reg", model); + } + + public ModelAndView service(HttpServletRequest req, HttpServletResponse res) { + String teaId = req.getParameter("teaId"); + System.out.println("teaId:" + teaId); + if (teaId == null) { + List list = dao.QueryObject("from DocuTeaInfo"); + Map model = new HashMap(); + model.put("list", list); + return new ModelAndView("/docuview/teaDocuService", model); + } else { + List list = dao.QueryObject("from DocuTeaInfo where teaId=" + teaId); + DocuTeaInfo doc = (DocuTeaInfo) list.get(0); + list = dao.QueryObject("from SystemSpecialtyCode"); + Map model = new HashMap(); + model.put("doc", doc); + model.put("list", list); + return new ModelAndView("/docuview/teaDocuModify", model); + } + } + + public ModelAndView search(HttpServletRequest req, HttpServletResponse res) { + String condition = req.getParameter("condition"); + String conditionContent = req.getParameter("conditionContent"); + if (condition.equals("")) { + condition = "name"; + } else if (condition.equals("֤")) { + condition = "sfzh"; + } else { + condition = "teaId"; + } + List list = dao.QueryObject("from DocuTeaInfo where "+condition+" like '"+conditionContent+"%'"); + Map model = new HashMap(); + model.put("list", list); + return new ModelAndView("/docuview/teaDocuService", model); + } + + public DAOSupport getDao() { + return dao; + } + + public void setDao(DAOSupport dao) { + this.dao = dao; + } + + protected ModelAndView handleRequestInternal(HttpServletRequest req, HttpServletResponse res) throws Exception { + req.setCharacterEncoding("gbk"); + return super.handleRequestInternal(req, res); + } + +} diff --git a/09/src/com/spring/controller/TeaRegLoader.java b/09/src/com/spring/controller/TeaRegLoader.java new file mode 100644 index 0000000..3a2025f --- /dev/null +++ b/09/src/com/spring/controller/TeaRegLoader.java @@ -0,0 +1,32 @@ +package com.spring.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.Controller; + +import com.hibernate.dao.DAOSupport; + +public class TeaRegLoader implements Controller { + private DAOSupport dao; + + public ModelAndView handleRequest(HttpServletRequest arg0, + HttpServletResponse arg1) throws Exception { + List list = dao.QueryObject("from SystemSpecialtyCode"); + return new ModelAndView("/docuview/doc_tea_info_reg", "list", list); + } + + public DAOSupport getDao() { + return dao; + } + + public void setDao(DAOSupport dao) { + this.dao = dao; + } + +} diff --git "a/09/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/09/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..094d1dd Binary files /dev/null and "b/09/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/10/.classpath b/10/.classpath new file mode 100644 index 0000000..1f58312 --- /dev/null +++ b/10/.classpath @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/10/.mymetadata b/10/.mymetadata new file mode 100644 index 0000000..d7a561c --- /dev/null +++ b/10/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/10/.project b/10/.project new file mode 100644 index 0000000..a348ea3 --- /dev/null +++ b/10/.project @@ -0,0 +1,50 @@ + + + 10 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/10/.settings/.jsdtscope b/10/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/10/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/10/.settings/org.eclipse.wst.jsdt.ui.superType.container b/10/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/10/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/10/.settings/org.eclipse.wst.jsdt.ui.superType.name b/10/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/10/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/10/WebRoot/META-INF/MANIFEST.MF b/10/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..5e94951 --- /dev/null +++ b/10/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/10/WebRoot/WEB-INF/.struts-config.mex b/10/WebRoot/WEB-INF/.struts-config.mex new file mode 100644 index 0000000..23922f4 --- /dev/null +++ b/10/WebRoot/WEB-INF/.struts-config.mex @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/10/WebRoot/WEB-INF/applicationContext.xml b/10/WebRoot/WEB-INF/applicationContext.xml new file mode 100644 index 0000000..4a2ba03 --- /dev/null +++ b/10/WebRoot/WEB-INF/applicationContext.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + org.hibernate.dialect.MySQLDialect + + + true + + + + + + com/jwy/dto/UserLogin.hbm.xml + + com/jwy/dto/Specialty.hbm.xml + + com/jwy/dto/Course.hbm.xml + com/jwy/dto/StuUser.hbm.xml + + com/jwy/dto/StuCourse.hbm.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/action/CourseAction.class b/10/WebRoot/WEB-INF/classes/com/jwy/action/CourseAction.class new file mode 100644 index 0000000..0391dab Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/action/CourseAction.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/action/RegAction.class b/10/WebRoot/WEB-INF/classes/com/jwy/action/RegAction.class new file mode 100644 index 0000000..cbd881e Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/action/RegAction.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/action/SpecialtyAction.class b/10/WebRoot/WEB-INF/classes/com/jwy/action/SpecialtyAction.class new file mode 100644 index 0000000..c4d938c Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/action/SpecialtyAction.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/action/StatInfoAction.class b/10/WebRoot/WEB-INF/classes/com/jwy/action/StatInfoAction.class new file mode 100644 index 0000000..0aa7a33 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/action/StatInfoAction.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/action/StuUserAction.class b/10/WebRoot/WEB-INF/classes/com/jwy/action/StuUserAction.class new file mode 100644 index 0000000..bfb7d06 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/action/StuUserAction.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/action/UpdatePwdAction.class b/10/WebRoot/WEB-INF/classes/com/jwy/action/UpdatePwdAction.class new file mode 100644 index 0000000..ed9c720 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/action/UpdatePwdAction.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/action/UserLoginAction.class b/10/WebRoot/WEB-INF/classes/com/jwy/action/UserLoginAction.class new file mode 100644 index 0000000..c662b10 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/action/UserLoginAction.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dao/CourseDao.class b/10/WebRoot/WEB-INF/classes/com/jwy/dao/CourseDao.class new file mode 100644 index 0000000..dc32186 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dao/CourseDao.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dao/ICourseDao.class b/10/WebRoot/WEB-INF/classes/com/jwy/dao/ICourseDao.class new file mode 100644 index 0000000..9aa2a28 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dao/ICourseDao.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dao/ISpecialtyDao.class b/10/WebRoot/WEB-INF/classes/com/jwy/dao/ISpecialtyDao.class new file mode 100644 index 0000000..7387ce5 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dao/ISpecialtyDao.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dao/IStuUserDao.class b/10/WebRoot/WEB-INF/classes/com/jwy/dao/IStuUserDao.class new file mode 100644 index 0000000..fb2878f Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dao/IStuUserDao.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dao/IUserLoginDao.class b/10/WebRoot/WEB-INF/classes/com/jwy/dao/IUserLoginDao.class new file mode 100644 index 0000000..4116618 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dao/IUserLoginDao.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dao/SpecialtyDao.class b/10/WebRoot/WEB-INF/classes/com/jwy/dao/SpecialtyDao.class new file mode 100644 index 0000000..3772855 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dao/SpecialtyDao.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dao/StuUserDao.class b/10/WebRoot/WEB-INF/classes/com/jwy/dao/StuUserDao.class new file mode 100644 index 0000000..3ed9377 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dao/StuUserDao.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dao/UserLoginDao.class b/10/WebRoot/WEB-INF/classes/com/jwy/dao/UserLoginDao.class new file mode 100644 index 0000000..f2cd4ce Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dao/UserLoginDao.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dto/Course.class b/10/WebRoot/WEB-INF/classes/com/jwy/dto/Course.class new file mode 100644 index 0000000..edc1136 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dto/Course.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dto/Course.hbm.xml b/10/WebRoot/WEB-INF/classes/com/jwy/dto/Course.hbm.xml new file mode 100644 index 0000000..cde9e82 --- /dev/null +++ b/10/WebRoot/WEB-INF/classes/com/jwy/dto/Course.hbm.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + 课程名称 + + + + + 上课时间 + + + + + 上课地点 + + + + + 课程学分 + + + + + 课程介绍 + + + + + 授课教师 + + + + + 教师介绍 + + + + + 是否结课 + + + + + 专业编号 + + + + diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dto/Specialty.class b/10/WebRoot/WEB-INF/classes/com/jwy/dto/Specialty.class new file mode 100644 index 0000000..ea17d27 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dto/Specialty.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dto/Specialty.hbm.xml b/10/WebRoot/WEB-INF/classes/com/jwy/dto/Specialty.hbm.xml new file mode 100644 index 0000000..d78baaf --- /dev/null +++ b/10/WebRoot/WEB-INF/classes/com/jwy/dto/Specialty.hbm.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + 入学年份 + + + + + 专业名称 + + + + + 学制 + + + + + 是否毕业 + + + + diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuCourse.class b/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuCourse.class new file mode 100644 index 0000000..6b102cb Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuCourse.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuCourse.hbm.xml b/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuCourse.hbm.xml new file mode 100644 index 0000000..fa84985 --- /dev/null +++ b/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuCourse.hbm.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + 学生编号 + + + + + 课程编号 + + + + diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuUser.class b/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuUser.class new file mode 100644 index 0000000..f6aa712 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuUser.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuUser.hbm.xml b/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuUser.hbm.xml new file mode 100644 index 0000000..cadfd35 --- /dev/null +++ b/10/WebRoot/WEB-INF/classes/com/jwy/dto/StuUser.hbm.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + 学生姓名 + + + + + 学号 + + + + + 专业编号 + + + + + 性别 + + + + + 出生日期 + + + + + 家庭住址 + + + + + 联系电话 + + + + + 现住址 + + + + diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dto/UserLogin.class b/10/WebRoot/WEB-INF/classes/com/jwy/dto/UserLogin.class new file mode 100644 index 0000000..c14522f Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/dto/UserLogin.class differ diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/dto/UserLogin.hbm.xml b/10/WebRoot/WEB-INF/classes/com/jwy/dto/UserLogin.hbm.xml new file mode 100644 index 0000000..bffa85b --- /dev/null +++ b/10/WebRoot/WEB-INF/classes/com/jwy/dto/UserLogin.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + 登录名称 + + + + + 登录密码 + + + + + 用户类型 + + + + + + + diff --git a/10/WebRoot/WEB-INF/classes/com/jwy/tools/CharacterEncodingFilter.class b/10/WebRoot/WEB-INF/classes/com/jwy/tools/CharacterEncodingFilter.class new file mode 100644 index 0000000..39f0405 Binary files /dev/null and b/10/WebRoot/WEB-INF/classes/com/jwy/tools/CharacterEncodingFilter.class differ diff --git a/10/WebRoot/WEB-INF/classes/log4j.properties b/10/WebRoot/WEB-INF/classes/log4j.properties new file mode 100644 index 0000000..7cac493 --- /dev/null +++ b/10/WebRoot/WEB-INF/classes/log4j.properties @@ -0,0 +1,4 @@ +log4j.rootLogger=WARN,stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] -%m %n \ No newline at end of file diff --git a/10/WebRoot/WEB-INF/lib/antlr-2.7.6.jar b/10/WebRoot/WEB-INF/lib/antlr-2.7.6.jar new file mode 100644 index 0000000..3702b64 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/antlr-2.7.6.jar differ diff --git a/10/WebRoot/WEB-INF/lib/commons-beanutils.jar b/10/WebRoot/WEB-INF/lib/commons-beanutils.jar new file mode 100644 index 0000000..b1b89c9 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/commons-beanutils.jar differ diff --git a/10/WebRoot/WEB-INF/lib/commons-collections.jar b/10/WebRoot/WEB-INF/lib/commons-collections.jar new file mode 100644 index 0000000..75580be Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/commons-collections.jar differ diff --git a/10/WebRoot/WEB-INF/lib/commons-dbcp.jar b/10/WebRoot/WEB-INF/lib/commons-dbcp.jar new file mode 100644 index 0000000..faea056 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/commons-dbcp.jar differ diff --git a/10/WebRoot/WEB-INF/lib/commons-digester.jar b/10/WebRoot/WEB-INF/lib/commons-digester.jar new file mode 100644 index 0000000..9765493 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/commons-digester.jar differ diff --git a/10/WebRoot/WEB-INF/lib/commons-logging.jar b/10/WebRoot/WEB-INF/lib/commons-logging.jar new file mode 100644 index 0000000..8758a96 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/commons-logging.jar differ diff --git a/10/WebRoot/WEB-INF/lib/commons-pool.jar b/10/WebRoot/WEB-INF/lib/commons-pool.jar new file mode 100644 index 0000000..e8de327 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/commons-pool.jar differ diff --git a/10/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar b/10/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..c8c4dbb Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/10/WebRoot/WEB-INF/lib/hibernate-annotations.jar b/10/WebRoot/WEB-INF/lib/hibernate-annotations.jar new file mode 100644 index 0000000..24b1583 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/hibernate-annotations.jar differ diff --git a/10/WebRoot/WEB-INF/lib/hibernate-commons-annotations.jar b/10/WebRoot/WEB-INF/lib/hibernate-commons-annotations.jar new file mode 100644 index 0000000..e0ca904 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/hibernate-commons-annotations.jar differ diff --git a/10/WebRoot/WEB-INF/lib/hibernate-entitymanager.jar b/10/WebRoot/WEB-INF/lib/hibernate-entitymanager.jar new file mode 100644 index 0000000..662eab1 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/hibernate-entitymanager.jar differ diff --git a/10/WebRoot/WEB-INF/lib/hibernate3.jar b/10/WebRoot/WEB-INF/lib/hibernate3.jar new file mode 100644 index 0000000..11c5f6a Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/hibernate3.jar differ diff --git a/10/WebRoot/WEB-INF/lib/iText-2.1.3.jar b/10/WebRoot/WEB-INF/lib/iText-2.1.3.jar new file mode 100644 index 0000000..6278a56 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/iText-2.1.3.jar differ diff --git a/10/WebRoot/WEB-INF/lib/iTextAsian.jar b/10/WebRoot/WEB-INF/lib/iTextAsian.jar new file mode 100644 index 0000000..3267e58 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/iTextAsian.jar differ diff --git a/10/WebRoot/WEB-INF/lib/javassist-3.4.GA.jar b/10/WebRoot/WEB-INF/lib/javassist-3.4.GA.jar new file mode 100644 index 0000000..a6bde77 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/javassist-3.4.GA.jar differ diff --git a/10/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar b/10/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar new file mode 100644 index 0000000..c773f85 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/jaxen-1.1-beta-7.jar differ diff --git a/10/WebRoot/WEB-INF/lib/jstl.jar b/10/WebRoot/WEB-INF/lib/jstl.jar new file mode 100644 index 0000000..a02abec Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/jstl.jar differ diff --git a/10/WebRoot/WEB-INF/lib/jta.jar b/10/WebRoot/WEB-INF/lib/jta.jar new file mode 100644 index 0000000..40a2cbd Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/jta.jar differ diff --git a/10/WebRoot/WEB-INF/lib/log4j-1.2.15.jar b/10/WebRoot/WEB-INF/lib/log4j-1.2.15.jar new file mode 100644 index 0000000..c930a6a Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/log4j-1.2.15.jar differ diff --git a/10/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar b/10/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar new file mode 100644 index 0000000..0539039 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar differ diff --git a/10/WebRoot/WEB-INF/lib/poi-3.2-FINAL-20081019.jar b/10/WebRoot/WEB-INF/lib/poi-3.2-FINAL-20081019.jar new file mode 100644 index 0000000..e860545 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/poi-3.2-FINAL-20081019.jar differ diff --git a/10/WebRoot/WEB-INF/lib/slf4j-api-1.5.0.jar b/10/WebRoot/WEB-INF/lib/slf4j-api-1.5.0.jar new file mode 100644 index 0000000..f4f06f0 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/slf4j-api-1.5.0.jar differ diff --git a/10/WebRoot/WEB-INF/lib/slf4j-log4j12-1.5.0.jar b/10/WebRoot/WEB-INF/lib/slf4j-log4j12-1.5.0.jar new file mode 100644 index 0000000..bb574a2 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/slf4j-log4j12-1.5.0.jar differ diff --git a/10/WebRoot/WEB-INF/lib/spring-webmvc-struts.jar b/10/WebRoot/WEB-INF/lib/spring-webmvc-struts.jar new file mode 100644 index 0000000..ed0cb1f Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/spring-webmvc-struts.jar differ diff --git a/10/WebRoot/WEB-INF/lib/spring-webmvc.jar b/10/WebRoot/WEB-INF/lib/spring-webmvc.jar new file mode 100644 index 0000000..613f595 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/spring-webmvc.jar differ diff --git a/10/WebRoot/WEB-INF/lib/spring.jar b/10/WebRoot/WEB-INF/lib/spring.jar new file mode 100644 index 0000000..5273670 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/spring.jar differ diff --git a/10/WebRoot/WEB-INF/lib/standard.jar b/10/WebRoot/WEB-INF/lib/standard.jar new file mode 100644 index 0000000..bc528ac Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/standard.jar differ diff --git a/10/WebRoot/WEB-INF/lib/struts.jar b/10/WebRoot/WEB-INF/lib/struts.jar new file mode 100644 index 0000000..7815901 Binary files /dev/null and b/10/WebRoot/WEB-INF/lib/struts.jar differ diff --git a/10/WebRoot/WEB-INF/struts-bean.tld b/10/WebRoot/WEB-INF/struts-bean.tld new file mode 100644 index 0000000..5fe94bd --- /dev/null +++ b/10/WebRoot/WEB-INF/struts-bean.tld @@ -0,0 +1,382 @@ + + + + + + + + + + +1.2 +1.1 +bean +http://struts.apache.org/tags-bean + +cookie +org.apache.struts.taglib.bean.CookieTag +org.apache.struts.taglib.bean.CookieTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +define +org.apache.struts.taglib.bean.DefineTag +org.apache.struts.taglib.bean.DefineTei +JSP + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +header +org.apache.struts.taglib.bean.HeaderTag +org.apache.struts.taglib.bean.HeaderTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +include +org.apache.struts.taglib.bean.IncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.struts.taglib.bean.MessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.struts.taglib.bean.PageTag +org.apache.struts.taglib.bean.PageTei +empty + +id +true +false + + +property +true +true + + + +parameter +org.apache.struts.taglib.bean.ParameterTag +org.apache.struts.taglib.bean.ParameterTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +resource +org.apache.struts.taglib.bean.ResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.struts.taglib.bean.SizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.struts.taglib.bean.StrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + +write +org.apache.struts.taglib.bean.WriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +true +true + + +property +false +true + + +scope +false +true + + + + + + diff --git a/10/WebRoot/WEB-INF/struts-config.xml b/10/WebRoot/WEB-INF/struts-config.xml new file mode 100644 index 0000000..40b5bc0 --- /dev/null +++ b/10/WebRoot/WEB-INF/struts-config.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/10/WebRoot/WEB-INF/struts-html.tld b/10/WebRoot/WEB-INF/struts-html.tld new file mode 100644 index 0000000..0fcc6f9 --- /dev/null +++ b/10/WebRoot/WEB-INF/struts-html.tld @@ -0,0 +1,3302 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html + +base +org.apache.struts.taglib.html.BaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.struts.taglib.html.ButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.struts.taglib.html.CancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.struts.taglib.html.CheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.html.ErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.html.FileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.html.FormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +frame +org.apache.struts.taglib.html.FrameTag + +bundle +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.struts.taglib.html.HiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.struts.taglib.html.HtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.struts.taglib.html.ImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.html.ImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +contextRelative +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.struts.taglib.html.JavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +scriptLanguage +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + +bundle +false +true + + + +link +org.apache.struts.taglib.html.LinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.html.MessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.html.MultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.struts.taglib.html.OptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.struts.taglib.html.OptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.html.OptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.html.PasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.html.RadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.struts.taglib.html.ResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.struts.taglib.html.RewriteTag +empty + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +select +org.apache.struts.taglib.html.SelectTag +JSP + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.html.SubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.html.TextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.html.TextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + diff --git a/10/WebRoot/WEB-INF/struts-logic.tld b/10/WebRoot/WEB-INF/struts-logic.tld new file mode 100644 index 0000000..f920868 --- /dev/null +++ b/10/WebRoot/WEB-INF/struts-logic.tld @@ -0,0 +1,652 @@ + + + + + + + + + +1.2 +1.1 +logic +http://struts.apache.org/tags-logic + +empty +org.apache.struts.taglib.logic.EmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.logic.EqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +forward +org.apache.struts.taglib.logic.ForwardTag +empty + +name +true +true + + + +greaterEqual +org.apache.struts.taglib.logic.GreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.logic.GreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.logic.IterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.logic.LessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.logic.LessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.logic.MatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.logic.MessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.logic.MessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.logic.NotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.logic.NotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.logic.NotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.logic.NotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.logic.PresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.struts.taglib.logic.RedirectTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + + + + diff --git a/10/WebRoot/WEB-INF/struts-nested.tld b/10/WebRoot/WEB-INF/struts-nested.tld new file mode 100644 index 0000000..9d2b7c8 --- /dev/null +++ b/10/WebRoot/WEB-INF/struts-nested.tld @@ -0,0 +1,3171 @@ + + + + + + + + + +1.2 +1.1 +nested +http://struts.apache.org/tags-nested + +nest +org.apache.struts.taglib.nested.NestedPropertyTag +JSP + +property +false +true + + + +writeNesting +org.apache.struts.taglib.nested.NestedWriteNestingTag +org.apache.struts.taglib.nested.NestedWriteNestingTei +JSP + +property +false +true + + +id +false +true + + +filter +false +true + + + +root +org.apache.struts.taglib.nested.NestedRootTag +JSP + +name +false +true + + + +define +org.apache.struts.taglib.nested.bean.NestedDefineTag +org.apache.struts.taglib.nested.bean.NestedDefineTei +empty + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +message +org.apache.struts.taglib.nested.bean.NestedMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +size +org.apache.struts.taglib.nested.bean.NestedSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +write +org.apache.struts.taglib.nested.bean.NestedWriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +checkbox +org.apache.struts.taglib.nested.html.NestedCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.nested.html.NestedErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.nested.html.NestedFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.nested.html.NestedFormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +hidden +org.apache.struts.taglib.nested.html.NestedHiddenTag + +alt +false +true + + +altKey +false +true + + +indexed +false +true + + +name +false +true + + +property +true +true + + +title +false +true + + +titleKey +false +true + + +styleClass +false +true + + +styleId +false +true + + +value +false +true + + +write +false +true + + + +image +org.apache.struts.taglib.nested.html.NestedImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.nested.html.NestedImgTag +empty + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +link +org.apache.struts.taglib.nested.html.NestedLinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.nested.html.NestedMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +true + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.nested.html.NestedMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +options +org.apache.struts.taglib.nested.html.NestedOptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.nested.html.NestedOptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.nested.html.NestedPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.nested.html.NestedRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +select +org.apache.struts.taglib.nested.html.NestedSelectTag +JSP + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.nested.html.NestedSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.nested.html.NestedTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.nested.html.NestedTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +empty +org.apache.struts.taglib.nested.logic.NestedEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.nested.logic.NestedEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterEqual +org.apache.struts.taglib.nested.logic.NestedGreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.nested.logic.NestedGreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.nested.logic.NestedIterateTag +org.apache.struts.taglib.nested.logic.NestedIterateTei +JSP + +collection +false +true + + +id +false +true + + +indexId +false +true + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.nested.logic.NestedLessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.nested.logic.NestedLessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.nested.logic.NestedMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.nested.logic.NestedMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.nested.logic.NestedNotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.nested.logic.NestedNotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.nested.logic.NestedNotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.nested.logic.NestedNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.nested.logic.NestedPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + + + + diff --git a/10/WebRoot/WEB-INF/struts-tiles.tld b/10/WebRoot/WEB-INF/struts-tiles.tld new file mode 100644 index 0000000..657334e --- /dev/null +++ b/10/WebRoot/WEB-INF/struts-tiles.tld @@ -0,0 +1,344 @@ + + + + + + + + + + +1.2 +1.1 +tiles +http://struts.apache.org/tags-tiles + +insert +org.apache.struts.taglib.tiles.InsertTag +JSP + +template +false +true + + +component +false +true + + +page +false +true + + +definition +false +true + + +attribute +false +false + + +name +false +true + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +flush +false +false + + +ignore +false +true + + +role +false +true + + +controllerUrl +false +true + + +controllerClass +false +true + + + +definition +org.apache.struts.taglib.tiles.DefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.struts.taglib.tiles.PutTag +JSP + +name +false +false + + +value +false +true + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +putList +org.apache.struts.taglib.tiles.PutListTag +JSP + +name +true +false + + + +add +org.apache.struts.taglib.tiles.AddTag +JSP + +value +false +false + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +get +org.apache.struts.taglib.tiles.GetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.struts.taglib.tiles.GetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.struts.taglib.tiles.UseAttributeTag +org.apache.struts.taglib.tiles.UseAttributeTei +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.struts.taglib.tiles.ImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.struts.taglib.tiles.InitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + diff --git a/10/WebRoot/WEB-INF/web.xml b/10/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..806071c --- /dev/null +++ b/10/WebRoot/WEB-INF/web.xml @@ -0,0 +1,47 @@ + + + + + CharacterEncodingFilter + com.jwy.tools.CharacterEncodingFilter + + encoding + GBK + + + + CharacterEncodingFilter + /* + REQUEST + FORWARD + + + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts-config.xml + + + debug + 3 + + + detail + 3 + + 0 + + + action + *.do + + + + index.jsp + + + diff --git a/10/WebRoot/database/db_database10.sql b/10/WebRoot/database/db_database10.sql new file mode 100644 index 0000000..58e6c71 --- /dev/null +++ b/10/WebRoot/database/db_database10.sql @@ -0,0 +1,214 @@ +-- MySQL Administrator dump 1.4 +-- +-- ------------------------------------------------------ +-- Server version 5.1.40-community + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + + +-- +-- Create schema db_database10 +-- + +CREATE DATABASE IF NOT EXISTS db_database10; +USE db_database10; + +-- +-- Definition of table `tb_course` +-- + +DROP TABLE IF EXISTS `tb_course`; +CREATE TABLE `tb_course` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '课程编号', + `name` varchar(40) NOT NULL COMMENT '课程名称', + `schooltime` varchar(40) NOT NULL COMMENT '上课时间', + `addr` varchar(50) NOT NULL COMMENT '上课地点', + `credit` decimal(3,0) NOT NULL COMMENT '课程学分', + `courseInfo` varchar(100) NOT NULL COMMENT '课程介绍', + `teacherName` varchar(20) NOT NULL COMMENT '授课教师', + `teacherInfo` varchar(100) NOT NULL COMMENT '教师介绍', + `isFinish` bit(1) NOT NULL COMMENT '是否结课', + `specialtyId` int(10) unsigned NOT NULL COMMENT '专业编号', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_course` +-- + +/*!40000 ALTER TABLE `tb_course` DISABLE KEYS */; +INSERT INTO `tb_course` (`id`,`name`,`schooltime`,`addr`,`credit`,`courseInfo`,`teacherName`,`teacherInfo`,`isFinish`,`specialtyId`) VALUES + (1,'大学英语1','每周二上午8点到12点','文科楼第一教室','5','英语基础课程','张老师','拥有多年教学经验的优秀教师',0x00,1), + (2,'平面设计','每周一、周四上午','文科楼第三教室','4','设计基础课程','李老师','一位优秀的教师',0x01,1), + (3,'国内贸易','每周一全天','文科楼第一教室','4','这里是介绍','孙老师','新来的一个老师',0x01,2), + (4,'大学英语1','每周一、周四上午','文科楼第一教室','5','这里是介绍','张老师','新来的一个老师',0x00,2), + (5,'计算机二级','每周日','阶梯教室','50','课程介绍课程介绍课程介绍课程介绍课程介绍课程介绍课程介绍课程介绍课程介绍课程介绍课程介绍课程介绍课程介绍','明明老师','明明老师毕业于XX大学,博士学位,有着丰富的教学经验.....',0x00,3), + (6,'数据','周一','学校','10','地在地圭','灵儿','地在地圭',0x01,4), + (7,'需要','城','城','20','霜','在','在',0x01,5); +/*!40000 ALTER TABLE `tb_course` ENABLE KEYS */; + + +-- +-- Definition of table `tb_specialty` +-- + +DROP TABLE IF EXISTS `tb_specialty`; +CREATE TABLE `tb_specialty` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '专业编号', + `enterYear` varchar(4) NOT NULL COMMENT '入学年份', + `name` varchar(40) NOT NULL COMMENT '专业名称', + `langthYear` varchar(10) NOT NULL COMMENT '学制', + `isFinish` bit(1) NOT NULL COMMENT '是否毕业', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_specialty` +-- + +/*!40000 ALTER TABLE `tb_specialty` DISABLE KEYS */; +INSERT INTO `tb_specialty` (`id`,`enterYear`,`name`,`langthYear`,`isFinish`) VALUES + (1,'2005','美术装潢设计','2',0x01), + (2,'2005','进出口贸易','4',0x01), + (3,'2010','计算机','3',0x01), + (4,'2010','数据','2',0x00), + (5,'2005','遥','2',0x00); +/*!40000 ALTER TABLE `tb_specialty` ENABLE KEYS */; + + +-- +-- Definition of table `tb_stucourse` +-- + +DROP TABLE IF EXISTS `tb_stucourse`; +CREATE TABLE `tb_stucourse` ( + `stuID` int(10) unsigned NOT NULL COMMENT '学生编号', + `courseID` int(10) unsigned NOT NULL COMMENT '课程编号', + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_stucourse` +-- + +/*!40000 ALTER TABLE `tb_stucourse` DISABLE KEYS */; +INSERT INTO `tb_stucourse` (`stuID`,`courseID`,`id`) VALUES + (6,1,3), + (11,1,4), + (10,1,5), + (12,1,6), + (12,2,7), + (7,2,8), + (10,2,9), + (7,7,10), + (44,6,11), + (45,7,12); +/*!40000 ALTER TABLE `tb_stucourse` ENABLE KEYS */; + + +-- +-- Definition of table `tb_stuuser` +-- + +DROP TABLE IF EXISTS `tb_stuuser`; +CREATE TABLE `tb_stuuser` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '学生编号', + `stuName` varchar(20) NOT NULL COMMENT '学生姓名', + `stuNo` varchar(15) NOT NULL COMMENT '学号', + `specialtyId` int(10) unsigned NOT NULL COMMENT '专业编号', + `stuSex` varchar(2) NOT NULL COMMENT '性别', + `birthday` varchar(10) NOT NULL COMMENT '出生日期', + `homeAddr` varchar(50) NOT NULL COMMENT '家庭住址', + `tel` varchar(20) NOT NULL COMMENT '联系电话', + `addr` varchar(50) NOT NULL COMMENT '现住址', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_stuuser` +-- + +/*!40000 ALTER TABLE `tb_stuuser` DISABLE KEYS */; +INSERT INTO `tb_stuuser` (`id`,`stuName`,`stuNo`,`specialtyId`,`stuSex`,`birthday`,`homeAddr`,`tel`,`addr`) VALUES + (5,'aa','123456',1,'男','1981-08-17','吉林省四平市','87793***','吉林省长春市'), + (6,'张三','654321',1,'男','1981-08-01','吉林省四平市','0431-84972266','吉林省长春市'), + (7,'bbb','555555',1,'男','1981-08-01','吉林省四平市','0431-84972266','吉林省长春市'), + (10,'555','005',1,'男','1981-08-01','吉林省四平市','0431-84972266','吉林省长春市'), + (11,'666','006',1,'男','1981-08-01','吉林省四平市','0431-84972266','吉林省长春市'), + (12,'777','007',1,'男','1981-08-01','吉林省四平市','0431-84972266','吉林省长春市'), + (15,'33','33',2,'女','33','3','33','333'), + (30,'3','4',2,'女','3','3','3','3'), + (31,'6','人',2,'女','2','2','2','2'), + (33,'8','8',2,'女','8','8','8','8'), + (35,'张大','12',4,'男','','','',''), + (36,'王明','120',4,'女','6','6','6','6'), + (37,'杨林','002',7,'','87','长春','0987822','吉林'), + (38,'2','2',5,'','2','2','2','2'), + (39,'明天','009',4,'','2','2','2','2'), + (40,'user22','2',2,'','','','',''), + (43,'小明','001',3,'男','1989-05-05','长春','1212','长春'), + (44,'一一','002',4,'女','1989-9-9','长春','55','长春'), + (45,'99','003',5,'','1898-08-08','长春','555','长春'); +/*!40000 ALTER TABLE `tb_stuuser` ENABLE KEYS */; + + +-- +-- Definition of table `tb_userlogin` +-- + +DROP TABLE IF EXISTS `tb_userlogin`; +CREATE TABLE `tb_userlogin` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户编号', + `loginName` varchar(20) NOT NULL COMMENT '登录名称', + `pwd` varchar(20) NOT NULL COMMENT '登录密码', + `type` varchar(1) NOT NULL COMMENT '用户类型', + `mail` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_userlogin` +-- + +/*!40000 ALTER TABLE `tb_userlogin` DISABLE KEYS */; +INSERT INTO `tb_userlogin` (`id`,`loginName`,`pwd`,`type`,`mail`) VALUES + (1,'mr','mrsoft','1','mr@mr.com'), + (5,'user2','user','2','user'), + (6,'user','111','2','111@mr.com'), + (7,'user1','555','2','111@mr.com'), + (8,'user3','111','2','111@mr.com'), + (9,'user4','111','2','111@mr.com'), + (10,'user5','111','2','111@mr.com'), + (11,'user6','111','2','111@mr.com'), + (12,'user7','111','2','111@mr.com'), + (36,'user9','3','2','3'), + (37,'user10','3','2','3'), + (38,'user11','3','2','3'), + (39,'user12','3','2','3'), + (40,'user22','111','2','mr'), + (41,'2223','33','2','33'), + (42,'cdd','cdd','2','we@163.com'), + (43,'小明','000000','2','88@88.com'), + (44,'00','000000','2','88@88.com'), + (45,'88','88888888','2','99@99'); +/*!40000 ALTER TABLE `tb_userlogin` ENABLE KEYS */; + + + + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/10/WebRoot/images/Thumbs.db b/10/WebRoot/images/Thumbs.db new file mode 100644 index 0000000..8ab4f9a Binary files /dev/null and b/10/WebRoot/images/Thumbs.db differ diff --git a/10/WebRoot/images/addCourse.gif b/10/WebRoot/images/addCourse.gif new file mode 100644 index 0000000..fa13c60 Binary files /dev/null and b/10/WebRoot/images/addCourse.gif differ diff --git a/10/WebRoot/images/addSpecialty.gif b/10/WebRoot/images/addSpecialty.gif new file mode 100644 index 0000000..61cccd8 Binary files /dev/null and b/10/WebRoot/images/addSpecialty.gif differ diff --git a/10/WebRoot/images/bottomM.gif b/10/WebRoot/images/bottomM.gif new file mode 100644 index 0000000..32be5a3 Binary files /dev/null and b/10/WebRoot/images/bottomM.gif differ diff --git a/10/WebRoot/images/bottomU.gif b/10/WebRoot/images/bottomU.gif new file mode 100644 index 0000000..d4898cd Binary files /dev/null and b/10/WebRoot/images/bottomU.gif differ diff --git a/10/WebRoot/images/css.css b/10/WebRoot/images/css.css new file mode 100644 index 0000000..16029fd --- /dev/null +++ b/10/WebRoot/images/css.css @@ -0,0 +1,79 @@ +.STYLE1 { + color: #FF0000; + font-weight: bold; + font-size: 9pt; +} +.STYLE3 { + color: #006600; + font-weight: bold; +} +.td1 { + padding: 0px; + border-bottom-style: solid; + border-bottom-color: #666666; + margin: 0px; + line-height: 24px; + border-bottom-width: 1px; + font-size: 9pt; + color: #666666; + background-position: center; + text-align:center +} +.td2 { + padding: 0px; + border-bottom-style: solid; + border-bottom-color: #666666; + margin: 0px; + line-height: 24px; + border-bottom-width: 1px; + font-size: 9pt; + color: #666666; +} +.td0 { + font-size: 9pt; + line-height: 24px; + font-weight: bold; + background-color: #e4f0d8; + text-align:center; + vertical-align:middle; + +} +body,td,th { + font-family: ; + font-size: 9pt; +} +body { + margin-left: 0px; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + background-color:#fafcf7; +} +a:link { + color: #006600; + text-decoration: none; +} +a:visited { + text-decoration: none; + color: #006600; +} +a:hover { + text-decoration: none; + color: #006600; +} +a:active { + text-decoration: none; + color: #006600; +} +a { + font-family: ; + color: #006600; + font-weight: bold; +} +.STYLE2 { + font-family: ""; + font-size: 9pt; + font-style: normal; + font-weight: bold; + color: #666666; +} diff --git a/10/WebRoot/images/index.jpg b/10/WebRoot/images/index.jpg new file mode 100644 index 0000000..54badde Binary files /dev/null and b/10/WebRoot/images/index.jpg differ diff --git a/10/WebRoot/images/jiantou.jpg b/10/WebRoot/images/jiantou.jpg new file mode 100644 index 0000000..67ae3a2 Binary files /dev/null and b/10/WebRoot/images/jiantou.jpg differ diff --git a/10/WebRoot/images/liftU.gif b/10/WebRoot/images/liftU.gif new file mode 100644 index 0000000..a327e88 Binary files /dev/null and b/10/WebRoot/images/liftU.gif differ diff --git a/10/WebRoot/images/mainU.gif b/10/WebRoot/images/mainU.gif new file mode 100644 index 0000000..51ecc65 Binary files /dev/null and b/10/WebRoot/images/mainU.gif differ diff --git a/10/WebRoot/images/style.css b/10/WebRoot/images/style.css new file mode 100644 index 0000000..9421629 --- /dev/null +++ b/10/WebRoot/images/style.css @@ -0,0 +1,57 @@ +.td0 { + background-color: #E4F0D8; +} +.td1 { + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #999999; +} +.td2 { + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #999999; + border-left-width: 1px; + border-left-style: solid; + border-left-color: #999999; +} + + +.STYLE2 { + color: #FF0000; + font-size: 10pt; + font-weight: bold; +} +body { + margin-left: 0px; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + background-color:#fafcf7; +} +body,td,th { + font-size: 9pt; +} +a:link { + color: #006600; + text-decoration: none; + font-size: 9pt; + font-weight: bold; +} +a:visited { + text-decoration: none; + color: #006600; + font-size: 9pt; + font-weight: bold; +} +a:hover { + text-decoration: none; + color: #006600; + font-size: 9pt; + font-weight: bold; +} +a:active { + text-decoration: none; + color: #FF0000; + font-size: 9pt; + font-weight: bold; +} diff --git a/10/WebRoot/images/topM.gif b/10/WebRoot/images/topM.gif new file mode 100644 index 0000000..e9f9640 Binary files /dev/null and b/10/WebRoot/images/topM.gif differ diff --git a/10/WebRoot/images/topNo.jpg b/10/WebRoot/images/topNo.jpg new file mode 100644 index 0000000..1e1446a Binary files /dev/null and b/10/WebRoot/images/topNo.jpg differ diff --git a/10/WebRoot/images/topU.gif b/10/WebRoot/images/topU.gif new file mode 100644 index 0000000..e4bfacf Binary files /dev/null and b/10/WebRoot/images/topU.gif differ diff --git a/10/WebRoot/index.jsp b/10/WebRoot/index.jsp new file mode 100644 index 0000000..775e282 --- /dev/null +++ b/10/WebRoot/index.jsp @@ -0,0 +1,54 @@ +<%@ page language="java" pageEncoding="GBK"%> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> + + + + Уѡϵͳҳ + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
    ${error}
     û
      룺
    + + + ûע +        +
     
    +
    + + + diff --git a/10/WebRoot/manager/addCourse.jsp b/10/WebRoot/manager/addCourse.jsp new file mode 100644 index 0000000..50669c3 --- /dev/null +++ b/10/WebRoot/manager/addCourse.jsp @@ -0,0 +1,92 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%> + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     ǰλãγ̹->¿γ
     
       + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ѡרҵ  + + + ${list.enterYear}${list.langthYear}${list.name}רҵ + + +  ѡרҵ
    γƣ   γ
    Ͽʱ䣺   Ͽʱ
    Ͽεص㣺   Ͽεص
    γѧ֣   γѧ
    γ̽ܣ   γ̽
    ڿνʦ   뽲ʦ
    ʦܣ   ڿνʦ
    +      +
    +
    +
     
    +
    + + +
    diff --git a/10/WebRoot/manager/addSpecialty.jsp b/10/WebRoot/manager/addSpecialty.jsp new file mode 100644 index 0000000..71c5a62 --- /dev/null +++ b/10/WebRoot/manager/addSpecialty.jsp @@ -0,0 +1,99 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> +<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     ǰλãרҵ->רҵ
     
        + + + + + + + + + + + + + + + + + + + + +
    +  ѧݣ  + +   + + 2005 + 2006 + 2007 + 2008 + 2009 + 2010 + + +  ѡרҵѧ  +
    +  רҵƣ  + +   + + +  רҵ  +
    +  ѧƣ  + +   + + 2 + 3 + 4 + 5 + + +  ѡרҵѧ  +
    + +
    +
    +
     
    + +
    diff --git a/10/WebRoot/manager/bottom.jsp b/10/WebRoot/manager/bottom.jsp new file mode 100644 index 0000000..c775526 --- /dev/null +++ b/10/WebRoot/manager/bottom.jsp @@ -0,0 +1,24 @@ +<%@ page language="java" contentType="text/html" pageEncoding="GBK"%> + + + + + + + +
    +
    + + diff --git a/10/WebRoot/manager/courseInfo.jsp b/10/WebRoot/manager/courseInfo.jsp new file mode 100644 index 0000000..4fed9a4 --- /dev/null +++ b/10/WebRoot/manager/courseInfo.jsp @@ -0,0 +1,96 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     ǰλãγ̹->γϸϢ
     
    + + + + + + + + + + + + +
    רҵϢ
    ʼݣ ${specialty.enterYear} רҵƣ ${specialty.name}ѧƣ ${specialty.langthYear}
    +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    γϢ
    γƣ ${course.name}γѧ֣ ${course.credit}
    Ͽʱ䣺 ${course.schooltime}Ͽεص㣺 ${course.addr}
    γ̽ܣ ${course.courseInfo}
    ڿνʦϢ
    ʦ ${course.teacherName}
    ʦ飺 ${course.teacherInfo}
    γǷѡ Ϊѡ + Ϊѡ +
    +
    + +
    diff --git a/10/WebRoot/manager/exit.jsp b/10/WebRoot/manager/exit.jsp new file mode 100644 index 0000000..54d0ec0 --- /dev/null +++ b/10/WebRoot/manager/exit.jsp @@ -0,0 +1,10 @@ +<%@ page language="java" contentType="text/html" pageEncoding="GBK"%> + + + + <% + session.invalidate(); + response.sendRedirect("../index.jsp"); + %> + + diff --git a/10/WebRoot/manager/left.jsp b/10/WebRoot/manager/left.jsp new file mode 100644 index 0000000..0152bec --- /dev/null +++ b/10/WebRoot/manager/left.jsp @@ -0,0 +1,13 @@ +<%@ page language="java" contentType="text/html" pageEncoding="GBK"%> + + + + 'left.jsp' + + + + + + diff --git a/10/WebRoot/manager/main.jsp b/10/WebRoot/manager/main.jsp new file mode 100644 index 0000000..b3dd045 --- /dev/null +++ b/10/WebRoot/manager/main.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html" pageEncoding="GBK"%> + + + + + + + + +
    + ӭʹøУѡϵͳģ
    + ģ¼ܣ
    + 1.רҵ
    + 2.γ̹
    + 3.Ϣͳƹ
    + 4.Ա޸Ĺ
    +
    + + + diff --git a/10/WebRoot/manager/manager.jsp b/10/WebRoot/manager/manager.jsp new file mode 100644 index 0000000..d98663b --- /dev/null +++ b/10/WebRoot/manager/manager.jsp @@ -0,0 +1,24 @@ +<%@ page language="java" contentType="text/html" pageEncoding="GBK"%> + + + + ҳ + + + + + + + + + + + + + <body> + </body> + + diff --git a/10/WebRoot/manager/right.jsp b/10/WebRoot/manager/right.jsp new file mode 100644 index 0000000..0152bec --- /dev/null +++ b/10/WebRoot/manager/right.jsp @@ -0,0 +1,13 @@ +<%@ page language="java" contentType="text/html" pageEncoding="GBK"%> + + + + 'left.jsp' + + + + + + diff --git a/10/WebRoot/manager/showCourse.jsp b/10/WebRoot/manager/showCourse.jsp new file mode 100644 index 0000000..b7600c2 --- /dev/null +++ b/10/WebRoot/manager/showCourse.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> + + + + + showCourse.jsp + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
      + +
    +
     ǰλãγ̹
    + + + + + + + + + + + +
     
    ѡרҵ + + ѡרҵ + + ${sList.enterYear}${sList.langthYear}${sList.name}רҵ + + ڿνʦ + γƣ +
    +
    +

    + + + + + + + + + + + + + + + + + + + + + +
    רҵγϿʱϿεصγѧڿνʦѧǷѡ
    ${cList[0].enterYear}${cList[0].langthYear}${cList[0].name}רҵ${cList[1].name}${cList[1].schooltime}${cList[1].addr}${cList[1].credit}${cList[1].teacherName}${cList[1].isFinish?"ѡ":"ѡ"}

    + +
    diff --git a/10/WebRoot/manager/showSpecialty.jsp b/10/WebRoot/manager/showSpecialty.jsp new file mode 100644 index 0000000..e9a250f --- /dev/null +++ b/10/WebRoot/manager/showSpecialty.jsp @@ -0,0 +1,98 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +   + + +
    +
    +   + + + + ǰλãרҵ +
    +

    + + + + + + + + + + + + + + + + + + + +
    + רҵ + + רҵ + + + + רҵѧ + + Ƿҵ + + +
    + ${specialty.id} + + ${specialty.name} + + ${specialty.enterYear} + + ${specialty.langthYear} + + ${specialty.isFinish?"":""} + + + ѽҵ + + Ϊѽҵ + +
    +

    + +
    diff --git a/10/WebRoot/manager/showStat.jsp b/10/WebRoot/manager/showStat.jsp new file mode 100644 index 0000000..2e205e1 --- /dev/null +++ b/10/WebRoot/manager/showStat.jsp @@ -0,0 +1,87 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     ǰλãͳϢ
    + + + + + + + + + + + + + + +
     
     ѡרҵ  + ѡרҵ + + ${sList.enterYear}${sList.langthYear}${sList.name}רҵ + + +  ڿνʦ  γƣ   +
    +
    +
    +

    + + + + + + + + + + + + + + + + + + + + + + +
    רҵγڿνʦϿεصϿʱϿѧԱ
    ${cList[5]}${cList[6]}${cList[7]}רҵ${cList[1]} ${cList[2]} ${cList[3]} ${cList[4]} 
    +

    + + +
    + + +
    diff --git a/10/WebRoot/manager/stuList.jsp b/10/WebRoot/manager/stuList.jsp new file mode 100644 index 0000000..27132df --- /dev/null +++ b/10/WebRoot/manager/stuList.jsp @@ -0,0 +1,77 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> + + + + + + + + + + + + + + + + + + + + + +
      + ǰλãרҵ
    + PDFĵ + Excelĵ +
    + + + + + + + + + + + +
    ${specialty.enterYear}${specialty.langthYear}${specialty.name}רҵ
    ${course.name} γԱ
    ڿνʦ${course.teacherName}
    + + + + + + + + + + + + + + + +
    ѧѧѧѧԱϵ绰
    ${stuList[0].stuName}${stuList[0].stuNo}${stuList[0].stuSex}${stuList[0].tel}
    +
    + + +
    \ No newline at end of file diff --git a/10/WebRoot/manager/top.jsp b/10/WebRoot/manager/top.jsp new file mode 100644 index 0000000..4ff0934 --- /dev/null +++ b/10/WebRoot/manager/top.jsp @@ -0,0 +1,31 @@ +<%@ page language="java" contentType="text/html" pageEncoding="GBK"%> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> + + + + 'top.jsp' + + + +
    + + + + + + +
    + + diff --git a/10/WebRoot/reg.jsp b/10/WebRoot/reg.jsp new file mode 100644 index 0000000..4cd23e5 --- /dev/null +++ b/10/WebRoot/reg.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" pageEncoding="GBK"%> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> + + + JSP for DynaActionForm form + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     ǰλãûע
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ${error}
    û   ϵͳ¼ʺ6-10λӢַ
       ¼6-10λӢַ
    ȷ룺   ֤¼
       ַ
    +      +
    +
    +
     
    + + \ No newline at end of file diff --git a/10/WebRoot/stu/addStuInfo.jsp b/10/WebRoot/stu/addStuInfo.jsp new file mode 100644 index 0000000..bb3c42d --- /dev/null +++ b/10/WebRoot/stu/addStuInfo.jsp @@ -0,0 +1,139 @@ +<%@ page language="java" pageEncoding="GBK"%> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%> + + + дϢ + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + +
     ǰλãдѧϢ
    +

    + ע⣺ѧȷϣ沢ʵдϢϢȷѧݣ
    + дϢ޷ѡΣԸ

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +  ѧ
    ѧţ  ѧ֤
    רҵ  + + ${list.enterYear}${list.langthYear}${list.name}רҵ + +  ѡרҵ
    Ա  + Ů +  ѡԱ
    գ  
    ַͥ  ͥסַ
    סַ  뵱ǰסַ
    ϵ绰  ϵ绰
         +
    +
    +
    + + + diff --git a/10/WebRoot/stu/courseInfo.jsp b/10/WebRoot/stu/courseInfo.jsp new file mode 100644 index 0000000..3adeb83 --- /dev/null +++ b/10/WebRoot/stu/courseInfo.jsp @@ -0,0 +1,98 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> + + + + + γϸϢ + + + + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + +
     ǰλãγϸϢ
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    γƣ  ${course.name}
    γѧ֣  ${course.credit}
    Ͽʱ䣺  ${course.schooltime}
    Ͽεص㣺  ${course.addr}
    γ̼飺  ${course.courseInfo}
    ڿνʦ  ${course.teacherName}
    ʦ飺  ${course.teacherInfo}
      
    +
    +
     
    + +
    diff --git a/10/WebRoot/stu/left.jsp b/10/WebRoot/stu/left.jsp new file mode 100644 index 0000000..a2d1939 --- /dev/null +++ b/10/WebRoot/stu/left.jsp @@ -0,0 +1,32 @@ +<%@ page language="java" pageEncoding="GBK"%> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> + + + + + + + + + + + + + + + + + + + +
    + ѯϢ +
    + ѡ¿γ +
    + ѯѡγ +
    + ޸ĵ¼ +
    + ˳ϵͳ +
     
    \ No newline at end of file diff --git a/10/WebRoot/stu/select.jsp b/10/WebRoot/stu/select.jsp new file mode 100644 index 0000000..e19bbd0 --- /dev/null +++ b/10/WebRoot/stu/select.jsp @@ -0,0 +1,79 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> + + + + + 鿴ѡγ + + + + + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + +
     ǰλãѯѡγ
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
     γڿνʦѧϿʱϿεص
    ${list[1].name}${list[1].teacherName}${list[1].credit }${list[1].schooltime}${list[1].addr}
    + ${list[0]==null?"ǰûпγ̿ɹѡ":" + "} +
    +
    +
     
    + +
    diff --git a/10/WebRoot/stu/selected.jsp b/10/WebRoot/stu/selected.jsp new file mode 100644 index 0000000..d6431d9 --- /dev/null +++ b/10/WebRoot/stu/selected.jsp @@ -0,0 +1,69 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> + + + + + selected.jsp + + + + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + +
     ǰλãѯѡγ
    + + + + + + + + + + + + + + + + + +
    γڿνʦѧϿʱϿεص
    + + ${list[1].name}${list[1].teacherName}${list[1].credit }${list[1].schooltime}${list[1].addr}
    +
     
    + +
    diff --git a/10/WebRoot/stu/stuUpdatePwd.jsp b/10/WebRoot/stu/stuUpdatePwd.jsp new file mode 100644 index 0000000..28d8726 --- /dev/null +++ b/10/WebRoot/stu/stuUpdatePwd.jsp @@ -0,0 +1,90 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> + + + + + welcome.jsp + + + + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + +
     ǰλã޸
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ${error}
    ¼ʺţ  +  ¼ʺŲ޸
      +  ԭʼ
      +  
    ȷ룺  +  ȷ
    ֤䣺  +  ע
    +      +
    +
    +
     
    + +
    diff --git a/10/WebRoot/stu/welcome.jsp b/10/WebRoot/stu/welcome.jsp new file mode 100644 index 0000000..efb1dcb --- /dev/null +++ b/10/WebRoot/stu/welcome.jsp @@ -0,0 +1,112 @@ +<%@ page language="java" pageEncoding="GBK"%> + +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> + + + + + welcome.jsp + + + + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + +
     ǰλãûϢ
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    רҵƣ  ${specialty.name}
    ѧݣ  ${specialty.enterYear}
    ѧƣ  ${specialty.langthYear}
      ${stuUser.stuName}
    ѧţ  ${stuUser.stuNo}
    Ա  ${stuUser.stuSex}
    ڣ  ${stuUser.birthday}
    ϵ绰  ${stuUser.tel}
    סַ  ${stuUser.addr}
    ַͥ  ${stuUser.homeAddr}
    +

    +

     
    + +
    diff --git a/10/WebRoot/updatePwd.jsp b/10/WebRoot/updatePwd.jsp new file mode 100644 index 0000000..b43897f --- /dev/null +++ b/10/WebRoot/updatePwd.jsp @@ -0,0 +1,69 @@ +<%@ page language="java" pageEncoding="GBK"%> +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> + + + + + + + + + + + + + + + + + + + + + + + +
     
      + ǰλã޸
     
       + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ${error}
    ¼ʺţ  ǰʺţ޸
      ԭʼ
      
    ȷ룺  ȷ
    ֤䣺  עʱ
    +      +
    +
    +
     
    + + + diff --git a/10/src/com/jwy/action/CourseAction.java b/10/src/com/jwy/action/CourseAction.java new file mode 100644 index 0000000..07d17f8 --- /dev/null +++ b/10/src/com/jwy/action/CourseAction.java @@ -0,0 +1,107 @@ +package com.jwy.action; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.DynaActionForm; +import org.apache.struts.actions.DispatchAction; +import com.jwy.dao.ICourseDao; +import com.jwy.dao.ISpecialtyDao; +import com.jwy.dto.Course; +import com.jwy.dto.Specialty; + +/** + * + * @author Jingweiyu + */ +/** + * + * @author Jingweiyu + */ +public class CourseAction extends DispatchAction { + private ISpecialtyDao specialtyDao; + private ICourseDao courseDao; + /** + * @param specialtyDao the specialtyDao to set + */ + public void setSpecialtyDao(ISpecialtyDao specialtyDao) { + this.specialtyDao = specialtyDao; + } + /** + * @param courseDao the courseDao to set + */ + public void setCourseDao(ICourseDao courseDao) { + this.courseDao = courseDao; + } + public ActionForward insert(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + DynaActionForm courseForm = (DynaActionForm) form; + Course course = new Course(); + course.setName(courseForm.getString("name")); + course.setSchooltime(courseForm.getString("schooltime")); + course.setAddr(courseForm.getString("addr")); + course.setCredit((Short)courseForm.get("credit")); + course.setCourseInfo(courseForm.getString("courseInfo")); + course.setTeacherName(courseForm.getString("teacherName")); + course.setTeacherInfo(courseForm.getString("teacherInfo")); + course.setIsFinish(true); //ǷѡΣĬΪ + course.setSpecialtyId((Integer)courseForm.get("specialtyId")); + courseDao.insert(course); + return findBySearch(mapping, courseForm, request, response); + } + public ActionForward updateIsFinish(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + Integer id = Integer.valueOf(request.getParameter("id")); + courseDao.updateIsFinish(id); + return courseInfo(mapping, form, request, response); + } + public ActionForward findBySearch(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + List sList = specialtyDao.findByAll(); + + Map map = new HashMap(); + if(request.getParameter("specialtyId")!=null&&!request.getParameter("specialtyId").equals("-1")){ + map.put("specialtyId", request.getParameter("specialtyId")); + } + if(request.getParameter("name")!=null&&!request.getParameter("name").equals("")){ + map.put("name", request.getParameter("name")); + } + if(request.getParameter("teacherName")!=null&&!request.getParameter("teacherName").equals("")){ + map.put("teacherName", request.getParameter("teacherName")); + } + + List clist = courseDao.findBySearch(map); + + request.setAttribute("sList", sList); + request.setAttribute("cList", clist); + return mapping.findForward("showCourse"); + } + + /** + * ¿γҳ + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward showInsert(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + List list = specialtyDao.findByAll(); + request.setAttribute("list", list); + return mapping.findForward("addCourse"); + } + public ActionForward courseInfo(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) { + Integer id = Integer.valueOf(request.getParameter("id")); + Course course = courseDao.findByID(id); + Specialty specialty = specialtyDao.findById(course.getSpecialtyId()); + request.setAttribute("course", course); + request.setAttribute("specialty", specialty); + return mapping.findForward("courseInfo"); + } +} diff --git a/10/src/com/jwy/action/RegAction.java b/10/src/com/jwy/action/RegAction.java new file mode 100644 index 0000000..cfa6ff2 --- /dev/null +++ b/10/src/com/jwy/action/RegAction.java @@ -0,0 +1,59 @@ +package com.jwy.action; + +import java.util.List; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import com.jwy.dao.ISpecialtyDao; +import com.jwy.dao.IUserLoginDao; +import com.jwy.dto.Specialty; +import com.jwy.dto.UserLogin; +public class RegAction extends Action { + private IUserLoginDao userLoginDao; + private ISpecialtyDao specialtyDao; + /** + * @param specialtyDao the specialtyDao to set + */ + public void setSpecialtyDao(ISpecialtyDao specialtyDao) { + this.specialtyDao = specialtyDao; + } + /** + * @param userLoginDao the userLoginDao to set + */ + public void setUserLoginDao(IUserLoginDao userLoginDao) { + this.userLoginDao = userLoginDao; + } + /** + * Method execute + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + */ + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + UserLogin userLogin = new UserLogin(); + userLogin.setType("2"); //ûΪѧ + userLogin.setLoginName(request.getParameter("loginName")); + userLogin.setPwd(request.getParameter("pwd")); + userLogin.setMail(request.getParameter("mail")); + if(!userLoginDao.findByLoginName(userLogin.getLoginName())){ + System.out.println("ûڿע"); + Integer id = userLoginDao.insert(userLogin); //Զɵ + request.getSession().setAttribute("id",id); + request.getSession().setAttribute("loginName", userLogin.getLoginName()); + //뵽дϢҳ + List list = specialtyDao.findStuByAll(); + request.setAttribute("list", list); + return mapping.findForward("addStuInfo"); + }else{ + request.setAttribute("error", "ûѾڣע"); + //صעҳ + return mapping.findForward("reg"); + } + } +} \ No newline at end of file diff --git a/10/src/com/jwy/action/SpecialtyAction.java b/10/src/com/jwy/action/SpecialtyAction.java new file mode 100644 index 0000000..eb25502 --- /dev/null +++ b/10/src/com/jwy/action/SpecialtyAction.java @@ -0,0 +1,65 @@ +package com.jwy.action; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.DynaActionForm; +import org.apache.struts.actions.DispatchAction; + +import com.jwy.dao.ISpecialtyDao; +import com.jwy.dto.Specialty; + +/** + * + * @author Jingweiyu + */ +public class SpecialtyAction extends DispatchAction { + + private ISpecialtyDao specialtyDao; + public void setSpecialtyDao(ISpecialtyDao specialtyDao) { + this.specialtyDao = specialtyDao; + } + + public ActionForward insert(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + DynaActionForm specialtyForm = (DynaActionForm) form; + Specialty specialty = new Specialty(); + specialty.setIsFinish(false); // ǷҵĬΪ + specialty.setName(specialtyForm.getString("name")); + specialty.setEnterYear(specialtyForm.getString("enterYear")); + specialty.setLangthYear(specialtyForm.getString("langthYear")); + specialtyDao.insert(specialty); + List list = specialtyDao.findByAll(); + System.out.println(list); + request.setAttribute("list", list); + return mapping.findForward("showSpecialty"); + } + + /** + * רҵΪѽҵ + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward updateIsFinish(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + Integer id = Integer.valueOf(request.getParameter("id")); + specialtyDao.updateIsFinish(id); + return findAll(mapping, form, request, response); + } + + public ActionForward findAll(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + List list = specialtyDao.findByAll(); + System.out.println(list); + request.setAttribute("list", list); + return mapping.findForward("showSpecialty"); + } +} \ No newline at end of file diff --git a/10/src/com/jwy/action/StatInfoAction.java b/10/src/com/jwy/action/StatInfoAction.java new file mode 100644 index 0000000..f57c4e0 --- /dev/null +++ b/10/src/com/jwy/action/StatInfoAction.java @@ -0,0 +1,295 @@ +package com.jwy.action; + +import java.awt.Color; +import java.io.OutputStream; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFRichTextString; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.hssf.util.CellRangeAddress; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.actions.DispatchAction; + +import com.jwy.dao.ICourseDao; +import com.jwy.dao.ISpecialtyDao; +import com.jwy.dto.Course; +import com.jwy.dto.Specialty; +import com.jwy.dto.StuUser; +import com.lowagie.text.Document; +import com.lowagie.text.Element; +import com.lowagie.text.Font; +import com.lowagie.text.PageSize; +import com.lowagie.text.Paragraph; +import com.lowagie.text.pdf.BaseFont; +import com.lowagie.text.pdf.PdfPCell; +import com.lowagie.text.pdf.PdfPTable; +import com.lowagie.text.pdf.PdfWriter; + +public class StatInfoAction extends DispatchAction { + + private ISpecialtyDao specialtyDao; + private ICourseDao courseDao; + + /** + * @param specialtyDao + * the specialtyDao to set + */ + public void setSpecialtyDao(ISpecialtyDao specialtyDao) { + this.specialtyDao = specialtyDao; + } + + /** + * @param courseDao + * the courseDao to set + */ + public void setCourseDao(ICourseDao courseDao) { + this.courseDao = courseDao; + } + + /** + * רҵţγƣڿνʦ + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward findBySearch(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + + List sList = specialtyDao.findByAll(); + Map map = new HashMap(); + if (request.getParameter("specialtyId") != null + && !request.getParameter("specialtyId").equals("-1")) { + map.put("specialtyId", request.getParameter("specialtyId")); + } + if (request.getParameter("name") != null + && !request.getParameter("name").equals("")) { + map.put("name", request.getParameter("name")); + } + if (request.getParameter("teacherName") != null + && !request.getParameter("teacherName").equals("")) { + map.put("teacherName", request.getParameter("teacherName")); + } + List clist = courseDao.findByStat(map); + request.setAttribute("sList", sList); + request.setAttribute("cList", clist); + return mapping.findForward("showStat"); + } + + /** + * ݿγ̱Ųѯѡſγ̵ѧ + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward stuList(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + + Integer specialtyId = Integer.valueOf(request + .getParameter("specialtyId")); + Specialty specialty = specialtyDao.findById(specialtyId);// רҵϢ + Integer courseId = Integer.valueOf(request.getParameter("courseId")); + List list = courseDao.findSelectStu(courseId); + Course course = courseDao.findByID(courseId); + System.out.println(courseId); + request.setAttribute("specialty", specialty); + request.setAttribute("stuList", list); + request.setAttribute("course", course); + return mapping.findForward("stuList"); + } + + /** + * ϿѧPDFĵ + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward exPDF(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws Exception { + + Integer specialtyId = Integer.valueOf(request.getParameter("specialtyId")); + Specialty specialty = specialtyDao.findById(specialtyId);// רҵϢ + Integer courseId = Integer.valueOf(request.getParameter("courseId")); + List list = courseDao.findSelectStu(courseId); + Course course = courseDao.findByID(courseId); + + response.setContentType("text/html;charset=GBK"); + response.setContentType("application/xml"); + response.setHeader("Content-Disposition", "attachment;filename=" + + new String(course.getName().getBytes(), "iso-8859-1")+".pdf"); + + OutputStream outs = response.getOutputStream(); // ȡ + + Document document = new Document(PageSize.A4); + + PdfWriter.getInstance(document, outs); + document.open(); + // + BaseFont bfChinese = BaseFont.createFont("STSong-Light", + "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); + + Font t1 = new Font(bfChinese, 20, Font.BOLD); // һ + Font t2 = new Font(bfChinese, 15, Font.BOLD); // ö + Font f1 = new Font(bfChinese, 12, Font.NORMAL); // + + Paragraph pragraph = new Paragraph( + specialty.getEnterYear() + "" + specialty.getLangthYear() + + "" + specialty.getName() + "רҵ", t1); + pragraph.setAlignment(Paragraph.ALIGN_CENTER); + document.add(pragraph); + + pragraph = new Paragraph(course.getName() + "γԱ"+" "+list.size()+" ", t2); + pragraph.setAlignment(Paragraph.ALIGN_CENTER); + document.add(pragraph); + pragraph = new Paragraph("ڿνʦ" + course.getTeacherName(), t2); + pragraph.setAlignment(Paragraph.ALIGN_CENTER); + document.add(pragraph); + + // һ + PdfPTable table = new PdfPTable(4); + table.setSpacingBefore(40f);// ñհ׿ + + // ɱͷ + String[] bt = new String[] { "ѧ", "ѧ", "Ա", "ϵ绰" }; + for (int i = 0; i < bt.length; i++) { + PdfPCell cell = new PdfPCell(new Paragraph(bt[i], f1)); // һԪ + cell.setBackgroundColor(Color.GRAY); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); // ˮƽʾ + cell.setVerticalAlignment(Element.ALIGN_MIDDLE); // ôֱ + table.addCell(cell); + } + + for (int i = 0; i < list.size(); i++) { + Object[] o = list.get(i); + StuUser stuUser = (StuUser) o[0]; + PdfPCell nameCell = new PdfPCell(new Paragraph(stuUser.getStuName(), f1)); // һԪ + nameCell.setHorizontalAlignment(Element.ALIGN_CENTER); // ˮƽʾ + nameCell.setVerticalAlignment(Element.ALIGN_MIDDLE); // ôֱ + PdfPCell stuNoCell = new PdfPCell(new Paragraph(stuUser.getStuNo(),f1)); // һԪ + stuNoCell.setHorizontalAlignment(Element.ALIGN_CENTER); // ˮƽʾ + stuNoCell.setVerticalAlignment(Element.ALIGN_MIDDLE); // ôֱ + PdfPCell stuSexCell = new PdfPCell(new Paragraph(stuUser.getStuSex(), f1)); // һԪ + stuSexCell.setHorizontalAlignment(Element.ALIGN_CENTER); // ˮƽʾ + stuSexCell.setVerticalAlignment(Element.ALIGN_MIDDLE); // ôֱ + PdfPCell telCell = new PdfPCell(new Paragraph(stuUser.getTel(), f1)); // һԪ + telCell.setHorizontalAlignment(Element.ALIGN_CENTER); // ˮƽʾ + telCell.setVerticalAlignment(Element.ALIGN_MIDDLE); // ôֱ + table.addCell(nameCell); + table.addCell(stuNoCell); + table.addCell(stuSexCell); + table.addCell(telCell); + } + document.add(table); + document.close(); + outs.close(); + + return null; + } + + /** + * ϿѧϢΪExcelĵ + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward exExcel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response)throws Exception { + + Integer specialtyId = Integer.valueOf(request.getParameter("specialtyId")); + Specialty specialty = specialtyDao.findById(specialtyId);// רҵϢ + Integer courseId = Integer.valueOf(request.getParameter("courseId")); + List list = courseDao.findSelectStu(courseId); + Course course = courseDao.findByID(courseId); + + response.setContentType("text/html;charset=GBK"); + response.setContentType("application/xml"); + response.setHeader("Content-Disposition", "attachment;filename=" + + new String(course.getName().getBytes(), "iso-8859-1")+ ".xls"); + + HSSFWorkbook workBook = new HSSFWorkbook(); // һexcelĵ + HSSFSheet sheet = workBook.createSheet(); // һ + HSSFCell cell = null; //Ԫ + + sheet.setColumnWidth(0,3000); + sheet.setColumnWidth(1,3000); + sheet.setColumnWidth(2,2000); + sheet.setColumnWidth(3,4000); + + HSSFCellStyle style = workBook.createCellStyle(); //ʽ + style.setAlignment(HSSFCellStyle.ALIGN_CENTER); + + // ϲԪ + sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 3)); + sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 3)); + sheet.addMergedRegion(new CellRangeAddress(2, 2, 0, 3)); + cell = sheet.createRow(0).createCell(0); + cell.setCellStyle(style); + cell.setCellValue(new HSSFRichTextString(specialty.getEnterYear() + "" + specialty.getLangthYear() + + "" + specialty.getName() + "רҵ")); + cell = sheet.createRow(1).createCell(0); + cell.setCellStyle(style); + cell.setCellValue(new HSSFRichTextString(course.getName() + "γԱ"+" "+list.size()+" ")); + cell = sheet.createRow(2).createCell(0); + cell.setCellStyle(style); + cell.setCellValue(new HSSFRichTextString("ڿνʦ" + course.getTeacherName())); + + //ñ߿ʽ + HSSFCellStyle tableStyle = workBook.createCellStyle(); + tableStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER); + tableStyle.setBorderTop((short)1); + tableStyle.setBorderBottom((short)1); + tableStyle.setBorderLeft((short)1); + tableStyle.setBorderRight((short)1); + + // ɱͷ + String[] bt = new String[] { "ѧ", "ѧ", "Ա", "ϵ绰" }; + HSSFRow row = sheet.createRow(3); // һж + for (int i = 0; i < bt.length; i++) { + cell = row.createCell(i); + cell.setCellStyle(tableStyle); + cell.setCellValue(new HSSFRichTextString(bt[i])); + } + //д + for (int i = 0; i < list.size(); i++) { + row = sheet.createRow(i+4); // һж + Object[] o = list.get(i); + StuUser stuUser = (StuUser) o[0]; + cell = row.createCell(0); + cell.setCellStyle(tableStyle); + cell.setCellValue(new HSSFRichTextString(stuUser.getStuName())); + cell = row.createCell(1); + cell.setCellStyle(tableStyle); + cell.setCellValue(new HSSFRichTextString(stuUser.getStuNo())); + cell = row.createCell(2); + cell.setCellStyle(tableStyle); + cell.setCellValue(new HSSFRichTextString(stuUser.getStuSex())); + cell = row.createCell(3); + cell.setCellStyle(tableStyle); + cell.setCellValue(new HSSFRichTextString(stuUser.getTel())); + } + workBook.write(response.getOutputStream()); //ĵдļ + return null; + } +} \ No newline at end of file diff --git a/10/src/com/jwy/action/StuUserAction.java b/10/src/com/jwy/action/StuUserAction.java new file mode 100644 index 0000000..ffcff91 --- /dev/null +++ b/10/src/com/jwy/action/StuUserAction.java @@ -0,0 +1,177 @@ +/* + * Generated by MyEclipse Struts + * Template path: templates/java/JavaClass.vtl + */ +package com.jwy.action; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.DynaActionForm; +import org.apache.struts.actions.DispatchAction; + +import com.jwy.dao.ICourseDao; +import com.jwy.dao.ISpecialtyDao; +import com.jwy.dao.IStuUserDao; +import com.jwy.dto.Course; +import com.jwy.dto.Specialty; +import com.jwy.dto.StuUser; + +/** + * MyEclipse Struts + * Creation date: 05-12-2009 + * + * XDoclet definition: + * @struts.action path="/stuInfo" name="stuInfoForm" input="/stu/stuInfo.jsp" scope="request" validate="true" + */ +public class StuUserAction extends DispatchAction { + private IStuUserDao stuUserDao; + private ICourseDao courseDao; + private ISpecialtyDao specialtyDao; + /** + * @param stuUserDao the stuUserDao to set + */ + public void setStuUserDao(IStuUserDao stuUserDao) { + this.stuUserDao = stuUserDao; + } + /** + * @param courseDao the courseDao to set + */ + public void setCourseDao(ICourseDao courseDao) { + this.courseDao = courseDao; + } + /** + * @param specialtyDao the specialtyDao to set + */ + public void setSpecialtyDao(ISpecialtyDao specialtyDao) { + this.specialtyDao = specialtyDao; + } + + /** + * ѧӻϢ + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward insert(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + DynaActionForm stu = (DynaActionForm) form; + StuUser user = new StuUser(); + user.setId((Integer)request.getSession().getAttribute("id")); + user.setStuName(stu.getString("stuName")); + user.setStuNo(stu.getString("stuNo")); + user.setSpecialtyId(Integer.valueOf(stu.getString("specialtyId"))); + user.setStuSex(stu.getString("stuSex")); + user.setBirthday(stu.getString("birthday")); + user.setHomeAddr(stu.getString("homeAddr")); + user.setTel(stu.getString("tel")); + user.setAddr(stu.getString("addr")); + stuUserDao.insert(user); + Specialty specialty = specialtyDao.findById(user.getSpecialtyId()); + request.setAttribute("stuUser", user); + request.setAttribute("specialty", specialty); + return mapping.findForward("welcome"); + } + /** + * ѧģҳ + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward welcome(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + Integer id = (Integer) request.getSession().getAttribute("id"); + StuUser stuUser = stuUserDao.findById(id); + Specialty specialty = specialtyDao.findById(stuUser.getSpecialtyId()); + request.setAttribute("stuUser", stuUser); + request.setAttribute("specialty", specialty); + return mapping.findForward("welcome"); + } + /** + * ѧ˳ϵͳ + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward exit(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + request.getSession().invalidate(); + return mapping.findForward("exit"); + } + /** + * ѧѯѡγ + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward selected(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + Integer id = (Integer) request.getSession().getAttribute("id"); + List list = stuUserDao.findSelected(id); + request.setAttribute("list", list); + return mapping.findForward("selected"); + } + /** + * ѧѯѡγ + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward select(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + Integer id = (Integer) request.getSession().getAttribute("id"); + List list = stuUserDao.findSelect(id); + request.setAttribute("list", list); + return mapping.findForward("select"); + } + /** + * ѧѡβ + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward selectting(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + Integer id = (Integer) request.getSession().getAttribute("id"); + String[] courseIds = request.getParameterValues("courseId"); + if(courseIds!=null){ + stuUserDao.insertSC(courseIds,id); + } + return select(mapping, form, request, response); + } + /** + * ѯγϸϢ + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward courseInfo(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + Integer id = Integer.valueOf(request.getParameter("id")); + String path = request.getParameter("path"); + Course course = courseDao.findByID(id); + request.setAttribute("course", course); + request.setAttribute("path", path); + return mapping.findForward("courseInfo"); + } + +} \ No newline at end of file diff --git a/10/src/com/jwy/action/UpdatePwdAction.java b/10/src/com/jwy/action/UpdatePwdAction.java new file mode 100644 index 0000000..394e4a7 --- /dev/null +++ b/10/src/com/jwy/action/UpdatePwdAction.java @@ -0,0 +1,52 @@ +package com.jwy.action; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; + +import com.jwy.dao.IUserLoginDao; + +public class UpdatePwdAction extends Action { + + private IUserLoginDao userLoginDao; + public void setUserLoginDao(IUserLoginDao userLoginDao) { + this.userLoginDao = userLoginDao; + } + + /** + * Method execute + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + */ + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + String loginName = (String) request.getSession().getAttribute("loginName"); + String pwd = request.getParameter("pwd"); + String pwd1 = request.getParameter("pwd1"); + String pwd2 = request.getParameter("pwd2"); + String mail = request.getParameter("mail"); + Integer id = userLoginDao.findByNPM(loginName, pwd, mail); + if(id==-1||!pwd1.equals(pwd2)){ + System.out.println("Ϣȷ޸"); + request.setAttribute("error", "Ϣȷ޸"); + }else{ + userLoginDao.updatePwd(id, pwd1); + System.out.println("޸ijɹ"); + request.setAttribute("error", "޸ijɹ"); + } + if(request.getParameter("type").equals("m")){ + System.out.println("m"); + return mapping.findForward("updatePwd"); + }else{ + System.out.println("u"); + return mapping.findForward("stuUpdatePwd"); + } + } +} \ No newline at end of file diff --git a/10/src/com/jwy/action/UserLoginAction.java b/10/src/com/jwy/action/UserLoginAction.java new file mode 100644 index 0000000..3689cf4 --- /dev/null +++ b/10/src/com/jwy/action/UserLoginAction.java @@ -0,0 +1,82 @@ +package com.jwy.action; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.DynaActionForm; + +import com.jwy.dao.ISpecialtyDao; +import com.jwy.dao.IStuUserDao; +import com.jwy.dao.IUserLoginDao; +import com.jwy.dto.Specialty; +import com.jwy.dto.StuUser; +import com.jwy.dto.UserLogin; + +public class UserLoginAction extends Action { + + private IUserLoginDao userLoginDao; + private IStuUserDao stuUserDao; + private ISpecialtyDao specialtyDao; + + public void setSpecialtyDao(ISpecialtyDao specialtyDao) { + this.specialtyDao = specialtyDao; + } + + public void setStuUserDao(IStuUserDao stuUserDao) { + this.stuUserDao = stuUserDao; + } + + public void setUserLoginDao(IUserLoginDao userLoginDao) { + this.userLoginDao = userLoginDao; + } + + /** + * Method execute + * + * @param mapping + * @param form + * @param request + * @param response + * @return ActionForward + */ + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + DynaActionForm userLoginForm = (DynaActionForm) form; + UserLogin userLogin = userLoginDao.findbyNameAndPwd(userLoginForm + .getString("loginName"), userLoginForm.getString("pwd")); + if (userLogin == null) { + request.setAttribute("error", "û¼ʧܣû벻ȷ"); + return mapping.findForward("index"); + } else { + request.getSession().setAttribute("loginName", + userLogin.getLoginName()); + request.getSession().setAttribute("id", userLogin.getId()); + if (userLogin.getType().equals("1")) { + System.out.println("Ա¼"); + return mapping.findForward("manager"); + } else { + // жѧûдϢ + StuUser stuUser = stuUserDao.findById(userLogin.getId()); + if (stuUser == null) { + System.out.println("ûдϢ"); + List list = specialtyDao.findStuByAll(); + request.setAttribute("list", list); + return mapping.findForward("addStuInfo"); + } else { + Specialty specialty = specialtyDao.findById(stuUser + .getSpecialtyId()); + request.setAttribute("specialty", specialty); + request.setAttribute("stuUser", stuUser); + System.out.println("дϢ"); + return mapping.findForward("welcome"); + } + } + } + } +} \ No newline at end of file diff --git a/10/src/com/jwy/dao/CourseDao.java b/10/src/com/jwy/dao/CourseDao.java new file mode 100644 index 0000000..d82f1f4 --- /dev/null +++ b/10/src/com/jwy/dao/CourseDao.java @@ -0,0 +1,117 @@ +package com.jwy.dao; + +import java.util.List; +import java.util.Map; + +import org.hibernate.Query; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import com.jwy.dto.Course; + +/** + * + * @author Jingweiyu + */ +public class CourseDao extends HibernateDaoSupport implements ICourseDao { + + /* (non-Javadoc) + * @see com.jwy.dao.ICourseDao#findByAll() + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public List findByAll() { + List list = getHibernateTemplate().find("from Course"); + return list; + } + + /* (non-Javadoc) + * @see com.jwy.dao.ICourseDao#findByID(java.lang.Integer) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public Course findByID(Integer id) { + Course course = (Course) getHibernateTemplate().get(Course.class, id); + return course; + } + + /* (non-Javadoc) + * @see com.jwy.dao.ICourseDao#findBySearch(java.util.Map) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public List findBySearch(Map map) { + + String sql = "FROM Specialty s, Course c Where s.id=c.specialtyId "; + if(map.get("specialtyId")!=null){ + sql += " AND c.specialtyId = "+map.get("specialtyId"); + } + if(map.get("name")!=null){ + sql += " AND c.name like '%"+map.get("name")+"%'"; + } + if(map.get("teacherName")!=null){ + sql += " AND c.teacherName like '%"+map.get("teacherName")+"%'"; + } + List list = getHibernateTemplate().find(sql); + return list; + } + + /* (non-Javadoc) + * @see com.jwy.dao.ICourseDao#insert(com.jwy.dto.Course) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED) + public void insert(Course course) { + getHibernateTemplate().save(course); + } + + /* (non-Javadoc) + * @see com.jwy.dao.ICourseDao#updateIsFinish(com.jwy.dto.Course) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED) + public void updateIsFinish(Integer id) { + Query q = getSession().createQuery("UPDATE Course c SET c.isFinish=? WHERE c.id=?"); + q.setBoolean(0, false);//˿γΪѡ + q.setInteger(1, id); + q.executeUpdate(); + } + + /* (non-Javadoc) + * @see com.jwy.dao.ICourseDao#findByStat(java.util.Map) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public List findByStat(Map map) { + String sql = "SELECT c.id,c.name,c.teacherName,c.schooltime,c.addr," + + "s.enterYear,s.langthYear,s.name,s.id " + + "FROM Course c,Specialty s " + + "WHERE s.id=c.specialtyId "; + if(map.get("specialtyId")!=null){ + sql += " AND c.specialtyId = "+map.get("specialtyId"); + } + if(map.get("name")!=null){ + sql += " AND c.name like '%"+map.get("name")+"%'"; + } + if(map.get("teacherName")!=null){ + sql += " AND c.teacherName like '%"+map.get("teacherName")+"%'"; + } + List list = getHibernateTemplate().find(sql); + System.out.println(list.size()); + return list; + } + + /* (non-Javadoc) + * @see com.jwy.dao.ICourseDao#findSelectStu(java.lang.Integer) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public List findSelectStu(Integer id) { + String sql = "FROM StuUser s,StuCourse sc WHERE sc.courseId=? AND s.id=sc.stuId"; + Query q = getSession().createQuery(sql); + q.setInteger(0, id); + List list = q.list(); + return list; + } +} diff --git a/10/src/com/jwy/dao/ICourseDao.java b/10/src/com/jwy/dao/ICourseDao.java new file mode 100644 index 0000000..f3a29e3 --- /dev/null +++ b/10/src/com/jwy/dao/ICourseDao.java @@ -0,0 +1,20 @@ +package com.jwy.dao; + +import java.util.List; +import java.util.Map; + +import com.jwy.dto.Course; + +/** + * + * @author Jingweiyu + */ +public interface ICourseDao { + public void insert(Course course); //¿γ + public void updateIsFinish(Integer id); //γΪѧ + public List findBySearch(Map map);//רҵơγƣڿνʦ + public Course findByID(Integer id); //տγ̱Ų + public List findByAll(); //ѯпγ + public List findByStat(Map map); //ѯγ + public List findSelectStu(Integer id); //ѯѡ˿γ̵ѧ +} diff --git a/10/src/com/jwy/dao/ISpecialtyDao.java b/10/src/com/jwy/dao/ISpecialtyDao.java new file mode 100644 index 0000000..037c7f6 --- /dev/null +++ b/10/src/com/jwy/dao/ISpecialtyDao.java @@ -0,0 +1,17 @@ +package com.jwy.dao; + +import java.util.List; + +import com.jwy.dto.Specialty; + +/** + * + * @author Jingweiyu + */ +public interface ISpecialtyDao { + public void insert(Specialty specialty); //רҵ + public void updateIsFinish(Integer id); //ָרҵΪѾҵ + public Specialty findById(Integer id); //ָŲרҵ + public List findByAll(); //ѯרҵ + public List findStuByAll(); //ѯδҵרҵ +} diff --git a/10/src/com/jwy/dao/IStuUserDao.java b/10/src/com/jwy/dao/IStuUserDao.java new file mode 100644 index 0000000..8f6135f --- /dev/null +++ b/10/src/com/jwy/dao/IStuUserDao.java @@ -0,0 +1,17 @@ +package com.jwy.dao; + +import java.util.List; + +import com.jwy.dto.StuUser; + +/** + * + * @author Jingweiyu + */ +public interface IStuUserDao { + public StuUser findById(Integer id); //ձŲѯû + public List findSelect(Integer id); //ѯָûѡγ + public List findSelected(Integer id); //ѯָûѾѡĿγ + public void insert(StuUser user); //û + public void insertSC(String[] courseIds,Integer stuId); //ûγ̱Ź +} diff --git a/10/src/com/jwy/dao/IUserLoginDao.java b/10/src/com/jwy/dao/IUserLoginDao.java new file mode 100644 index 0000000..58e79f6 --- /dev/null +++ b/10/src/com/jwy/dao/IUserLoginDao.java @@ -0,0 +1,16 @@ +package com.jwy.dao; + +import com.jwy.dto.UserLogin; + +/** + * + * @author Jingweiyu + */ +public interface IUserLoginDao { + public UserLogin findbyNameAndPwd(String name,String pwd); //ûû + public boolean findByLoginName(String loginName); //֤ûǷѾ + public Integer findByNPM(String name,String pwd,String mail); //֤޸Ϣ + public Integer insert(UserLogin user); //ûע + public void updatePwd(Integer id,String pwd); //޸ + +} diff --git a/10/src/com/jwy/dao/SpecialtyDao.java b/10/src/com/jwy/dao/SpecialtyDao.java new file mode 100644 index 0000000..7004cf6 --- /dev/null +++ b/10/src/com/jwy/dao/SpecialtyDao.java @@ -0,0 +1,70 @@ +package com.jwy.dao; + +import java.util.List; + +import org.hibernate.Query; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import com.jwy.dto.Specialty; + +/** + * + * @author Jingweiyu + */ +public class SpecialtyDao extends HibernateDaoSupport implements ISpecialtyDao { + + /* (non-Javadoc) + * @see com.jwy.dao.ISpecialtyDao#findByAll() + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public List findByAll() { + List list = getHibernateTemplate().find("FROM Specialty"); + return list; + } + + /* (non-Javadoc) + * @see com.jwy.dao.ISpecialtyDao#findById(java.lang.Integer) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public Specialty findById(Integer id) { + Specialty specialty = (Specialty) getHibernateTemplate().get(Specialty.class, id); + return specialty; + } + + /* (non-Javadoc) + * @see com.jwy.dao.ISpecialtyDao#insert(com.jwy.dto.Specialty) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED) + public void insert(Specialty specialty) { + getHibernateTemplate().save(specialty); + } + + + /* (non-Javadoc) + * @see com.jwy.dao.ISpecialtyDao#updateIsFinash(java.lang.Integer) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED) + public void updateIsFinish(Integer id) { + Query q = getSession().createQuery("UPDATE Specialty s SET s.isFinish=? WHERE s.id=?"); + q.setBoolean(0, true); + q.setInteger(1, id); + q.executeUpdate(); + } + + /* (non-Javadoc) + * @see com.jwy.dao.ISpecialtyDao#findStuByAll() + */ + @Override + @Transactional(propagation = Propagation.REQUIRED,readOnly=true) + public List findStuByAll() { + Query q = getSession().createQuery("FROM Specialty WHERE isFinish=false"); + List list = q.list(); + return list; + } +} diff --git a/10/src/com/jwy/dao/StuUserDao.java b/10/src/com/jwy/dao/StuUserDao.java new file mode 100644 index 0000000..6abed97 --- /dev/null +++ b/10/src/com/jwy/dao/StuUserDao.java @@ -0,0 +1,98 @@ +package com.jwy.dao; + +import java.util.List; + +import org.hibernate.Query; +import org.hibernate.Session; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import com.jwy.dto.Course; +import com.jwy.dto.StuCourse; +import com.jwy.dto.StuUser; + +/** + * + * @author Jingweiyu + */ +public class StuUserDao extends HibernateDaoSupport implements IStuUserDao { + + /* (non-Javadoc) + * @see com.jwy.dao.IStuUserDao#findById(java.lang.Integer) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public StuUser findById(Integer id) { + StuUser user = (StuUser) getHibernateTemplate().get(StuUser.class, id); + return user; + } + + /* (non-Javadoc) + * @see com.jwy.dao.IStuUserDao#insert(com.jwy.dto.StuUser) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED) + public void insert(StuUser user) { + getHibernateTemplate().save(user); + + } + + /* (non-Javadoc) + * @see com.jwy.dao.IStuUserDao#findSelect(java.lang.Integer) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public List findSelect(Integer id) { + String sql = "FROM StuUser stu,Course c WHERE stu.id=? " + + "AND stu.specialtyId=c.specialtyId AND c.isFinish=true AND c.id NOT IN " + + "(SELECT courseId FROM StuCourse WHERE stuId=?)"; + Query q = getSession().createQuery(sql); + q.setInteger(0, id); + q.setInteger(1, id); + List list = q.list(); + if(!list.isEmpty()){ + Object[] o = list.get(0); + Course course = (Course) o[1]; + System.out.println(course.getName()); + } + return list; + } + + /* (non-Javadoc) + * @see com.jwy.dao.IStuUserDao#findSelected(java.lang.Integer) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public List findSelected(Integer id) { + String sql = "FROM StuUser stu,Course c,StuCourse sc WHERE stu.id=? AND stu.id=sc.stuId And c.id=sc.courseId"; + Query q = getSession().createQuery(sql); + q.setInteger(0, id); + List list = q.list(); + if(!list.isEmpty()){ + Object[] o = list.get(0); + Course course = (Course) o[1]; + System.out.println(course.getName()); + } + return list; + } + + /* (non-Javadoc) + * @see com.jwy.dao.IStuUserDao#insertSC(java.lang.String[]) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED) + public void insertSC(String[] courseIds,Integer stuId) { + Session session = getSession(); + for (int i = 0; i < courseIds.length; i++) { + StuCourse sc = new StuCourse(); + sc.setStuId(stuId); + sc.setCourseId(Integer.valueOf(courseIds[i])); + session.save(sc); + if(i%5==0){ //ֹڴÿ5¼ֶˢһ + session.flush(); + session.clear(); + } + } + } +} diff --git a/10/src/com/jwy/dao/UserLoginDao.java b/10/src/com/jwy/dao/UserLoginDao.java new file mode 100644 index 0000000..5d539d5 --- /dev/null +++ b/10/src/com/jwy/dao/UserLoginDao.java @@ -0,0 +1,95 @@ +package com.jwy.dao; + +import java.util.List; + +import org.hibernate.Query; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import com.jwy.dto.UserLogin; + +/** + * + * @author Jingweiyu + */ +public class UserLoginDao extends HibernateDaoSupport implements IUserLoginDao { + + /* (non-Javadoc) + * @see com.jwy.dao.IUserLoginDao#findbyNameAndPwd() + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public UserLogin findbyNameAndPwd(String name,String pwd) { + Query q = getSession().createQuery("FROM UserLogin WHERE loginName=? and pwd = ?"); + q.setString(0, name); + q.setString(1, pwd); + List list = q.list(); + if(list.isEmpty()){ + System.out.println("¼ʧ"); + return null; + }else{ + System.out.println("¼ɹ"); + UserLogin userLogin = (UserLogin) list.get(0); + return userLogin; + } +// return null; + } + + /* (non-Javadoc) + * @see com.jwy.dao.IUserLoginDao#findByLoginName(java.lang.String) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public boolean findByLoginName(String loginName) { + Query q = getSession().createQuery("FROM UserLogin WHERE loginName=?"); + q.setString(0, loginName); + List list = q.list(); + if(list.isEmpty()){ + return false; + }else{ + return true; + } + } + + /* (non-Javadoc) + * @see com.jwy.dao.IUserLoginDao#insert(com.jwy.dto.UserLogin) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED) + public Integer insert(UserLogin user) { + getHibernateTemplate().save(user); + return user.getId(); + } + + /* (non-Javadoc) + * @see com.jwy.dao.IUserLoginDao#findByNPM(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED, readOnly = true) + public Integer findByNPM(String name, String pwd, String mail) { + Query q = getSession().createQuery("FROM UserLogin WHERE loginName=? AND pwd=? and mail=?"); + q.setString(0, name); + q.setString(1, pwd); + q.setString(2, mail); + List list = q.list(); + if(!list.isEmpty()){ + UserLogin user = (UserLogin) list.get(0); + return user.getId(); + }else{ + return -1; + } + } + + /* (non-Javadoc) + * @see com.jwy.dao.IUserLoginDao#updatePwd(java.lang.String) + */ + @Override + @Transactional(propagation = Propagation.REQUIRED) + public void updatePwd(Integer id,String pwd) { + Query q = getSession().createQuery("UPDATE UserLogin user Set user.pwd = ? WHERE id = ?"); + q.setString(0, pwd); + q.setInteger(1, id); + q.executeUpdate(); + } +} diff --git a/10/src/com/jwy/dto/Course.hbm.xml b/10/src/com/jwy/dto/Course.hbm.xml new file mode 100644 index 0000000..cde9e82 --- /dev/null +++ b/10/src/com/jwy/dto/Course.hbm.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + 课程名称 + + + + + 上课时间 + + + + + 上课地点 + + + + + 课程学分 + + + + + 课程介绍 + + + + + 授课教师 + + + + + 教师介绍 + + + + + 是否结课 + + + + + 专业编号 + + + + diff --git a/10/src/com/jwy/dto/Course.java b/10/src/com/jwy/dto/Course.java new file mode 100644 index 0000000..19a74a0 --- /dev/null +++ b/10/src/com/jwy/dto/Course.java @@ -0,0 +1,121 @@ +package com.jwy.dto; + + + +public class Course implements java.io.Serializable { + + private Integer id; //γ̱ţԶ + private String name; //γ + private String schooltime; //Ͽʱ + private String addr; //Ͽεص + private Short credit; //γѧ + private String courseInfo; //γ̽ + private String teacherName; //ʦ + private String teacherInfo; //ʦ + private Boolean isFinish; //Ƿѡ + private Integer specialtyId;//רҵ + + // Constructors + + /** default constructor */ + public Course() { + } + + /** full constructor */ + public Course(String name, String schooltime, String addr, Short credit, + String courseInfo, String teacherName, String teacherInfo, + Boolean isFinish, Integer specialtyId) { + this.name = name; + this.schooltime = schooltime; + this.addr = addr; + this.credit = credit; + this.courseInfo = courseInfo; + this.teacherName = teacherName; + this.teacherInfo = teacherInfo; + this.isFinish = isFinish; + this.specialtyId = specialtyId; + } + + // Property accessors + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSchooltime() { + return this.schooltime; + } + + public void setSchooltime(String schooltime) { + this.schooltime = schooltime; + } + + public String getAddr() { + return this.addr; + } + + public void setAddr(String addr) { + this.addr = addr; + } + + public Short getCredit() { + return this.credit; + } + + public void setCredit(Short credit) { + this.credit = credit; + } + + public String getCourseInfo() { + return this.courseInfo; + } + + public void setCourseInfo(String courseInfo) { + this.courseInfo = courseInfo; + } + + public String getTeacherName() { + return this.teacherName; + } + + public void setTeacherName(String teacherName) { + this.teacherName = teacherName; + } + + public String getTeacherInfo() { + return this.teacherInfo; + } + + public void setTeacherInfo(String teacherInfo) { + this.teacherInfo = teacherInfo; + } + + public Boolean getIsFinish() { + return this.isFinish; + } + + public void setIsFinish(Boolean isFinish) { + this.isFinish = isFinish; + } + + public Integer getSpecialtyId() { + return this.specialtyId; + } + + public void setSpecialtyId(Integer specialtyId) { + this.specialtyId = specialtyId; + } + +} \ No newline at end of file diff --git a/10/src/com/jwy/dto/Specialty.hbm.xml b/10/src/com/jwy/dto/Specialty.hbm.xml new file mode 100644 index 0000000..d78baaf --- /dev/null +++ b/10/src/com/jwy/dto/Specialty.hbm.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + 入学年份 + + + + + 专业名称 + + + + + 学制 + + + + + 是否毕业 + + + + diff --git a/10/src/com/jwy/dto/Specialty.java b/10/src/com/jwy/dto/Specialty.java new file mode 100644 index 0000000..86cc153 --- /dev/null +++ b/10/src/com/jwy/dto/Specialty.java @@ -0,0 +1,81 @@ +package com.jwy.dto; + +public class Specialty implements java.io.Serializable { + + + // Fields + + private Integer id; + private String enterYear; + private String name; + private String langthYear; + private Boolean isFinish; + + + // Constructors + + /** default constructor */ + public Specialty() { + } + + + /** full constructor */ + public Specialty(String enterYear, String name, String langthYear, Boolean isFinish) { + this.enterYear = enterYear; + this.name = name; + this.langthYear = langthYear; + this.isFinish = isFinish; + } + + + // Property accessors + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getEnterYear() { + return this.enterYear; + } + + public void setEnterYear(String enterYear) { + this.enterYear = enterYear; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLangthYear() { + return this.langthYear; + } + + public void setLangthYear(String langthYear) { + this.langthYear = langthYear; + } + + public Boolean getIsFinish() { + return this.isFinish; + } + + public void setIsFinish(Boolean isFinish) { + this.isFinish = isFinish; + } + + + + + + + + + +} \ No newline at end of file diff --git a/10/src/com/jwy/dto/StuCourse.hbm.xml b/10/src/com/jwy/dto/StuCourse.hbm.xml new file mode 100644 index 0000000..fa84985 --- /dev/null +++ b/10/src/com/jwy/dto/StuCourse.hbm.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + 学生编号 + + + + + 课程编号 + + + + diff --git a/10/src/com/jwy/dto/StuCourse.java b/10/src/com/jwy/dto/StuCourse.java new file mode 100644 index 0000000..b73b35e --- /dev/null +++ b/10/src/com/jwy/dto/StuCourse.java @@ -0,0 +1,47 @@ +package com.jwy.dto; + +public class StuCourse implements java.io.Serializable { + + private Integer id; //ţԶ + private Integer stuId; //ѧ + private Integer courseId; //γ̱ + + // Constructors + + /** default constructor */ + public StuCourse() { + } + + /** full constructor */ + public StuCourse(Integer stuId, Integer courseId) { + this.stuId = stuId; + this.courseId = courseId; + } + + // Property accessors + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getStuId() { + return this.stuId; + } + + public void setStuId(Integer stuId) { + this.stuId = stuId; + } + + public Integer getCourseId() { + return this.courseId; + } + + public void setCourseId(Integer courseId) { + this.courseId = courseId; + } + +} \ No newline at end of file diff --git a/10/src/com/jwy/dto/StuUser.hbm.xml b/10/src/com/jwy/dto/StuUser.hbm.xml new file mode 100644 index 0000000..cadfd35 --- /dev/null +++ b/10/src/com/jwy/dto/StuUser.hbm.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + 学生姓名 + + + + + 学号 + + + + + 专业编号 + + + + + 性别 + + + + + 出生日期 + + + + + 家庭住址 + + + + + 联系电话 + + + + + 现住址 + + + + diff --git a/10/src/com/jwy/dto/StuUser.java b/10/src/com/jwy/dto/StuUser.java new file mode 100644 index 0000000..5e6485f --- /dev/null +++ b/10/src/com/jwy/dto/StuUser.java @@ -0,0 +1,109 @@ +package com.jwy.dto; + +public class StuUser implements java.io.Serializable { + private Integer id; //ѧ + private String stuName; //ѧ + private String stuNo; //ѧѧ + private Integer specialtyId;//ѧѧרҵ + private String stuSex; //ѧԱ + private String birthday; //ѧ + private String homeAddr; //ѧַͥ + private String tel; //ѧ绰 + private String addr; //ѧǰסַ + + // Constructors + + /** default constructor */ + public StuUser() { + } + + /** full constructor */ + public StuUser(Integer id, String stuName, String stuNo, + Integer specialtyId, String stuSex, String birthday, + String homeAddr, String tel, String addr) { + this.id = id; + this.stuName = stuName; + this.stuNo = stuNo; + this.specialtyId = specialtyId; + this.stuSex = stuSex; + this.birthday = birthday; + this.homeAddr = homeAddr; + this.tel = tel; + this.addr = addr; + } + + // Property accessors + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getStuName() { + return this.stuName; + } + + public void setStuName(String stuName) { + this.stuName = stuName; + } + + public String getStuNo() { + return this.stuNo; + } + + public void setStuNo(String stuNo) { + this.stuNo = stuNo; + } + + public Integer getSpecialtyId() { + return this.specialtyId; + } + + public void setSpecialtyId(Integer specialtyId) { + this.specialtyId = specialtyId; + } + + public String getStuSex() { + return this.stuSex; + } + + public void setStuSex(String stuSex) { + this.stuSex = stuSex; + } + + public String getBirthday() { + return this.birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getHomeAddr() { + return this.homeAddr; + } + + public void setHomeAddr(String homeAddr) { + this.homeAddr = homeAddr; + } + + public String getTel() { + return this.tel; + } + + public void setTel(String tel) { + this.tel = tel; + } + + public String getAddr() { + return this.addr; + } + + public void setAddr(String addr) { + this.addr = addr; + } + +} \ No newline at end of file diff --git a/10/src/com/jwy/dto/UserLogin.hbm.xml b/10/src/com/jwy/dto/UserLogin.hbm.xml new file mode 100644 index 0000000..bffa85b --- /dev/null +++ b/10/src/com/jwy/dto/UserLogin.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + 登录名称 + + + + + 登录密码 + + + + + 用户类型 + + + + + + + diff --git a/10/src/com/jwy/dto/UserLogin.java b/10/src/com/jwy/dto/UserLogin.java new file mode 100644 index 0000000..d52596f --- /dev/null +++ b/10/src/com/jwy/dto/UserLogin.java @@ -0,0 +1,69 @@ +package com.jwy.dto; + +public class UserLogin implements java.io.Serializable { + + // Fields + + private Integer id; + private String loginName; + private String pwd; + private String type; + private String mail; + + // Constructors + + /** default constructor */ + public UserLogin() { + } + + /** full constructor */ + public UserLogin(String loginName, String pwd, String type, String mail) { + this.loginName = loginName; + this.pwd = pwd; + this.type = type; + this.mail = mail; + } + + // Property accessors + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getLoginName() { + return this.loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public String getPwd() { + return this.pwd; + } + + public void setPwd(String pwd) { + this.pwd = pwd; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public String getMail() { + return this.mail; + } + + public void setMail(String mail) { + this.mail = mail; + } + +} \ No newline at end of file diff --git a/10/src/com/jwy/tools/CharacterEncodingFilter.java b/10/src/com/jwy/tools/CharacterEncodingFilter.java new file mode 100644 index 0000000..e4ab967 --- /dev/null +++ b/10/src/com/jwy/tools/CharacterEncodingFilter.java @@ -0,0 +1,38 @@ +package com.jwy.tools; + +import java.io.IOException; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; + +/** + * @function + * @author jingweiyu + */ +public class CharacterEncodingFilter implements Filter{ + + protected String encoding = null; + protected FilterConfig filterConfig = null; + + public void init(FilterConfig filterConfig) throws ServletException { + this.filterConfig = filterConfig; + this.encoding = filterConfig.getInitParameter("encoding"); + } + + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { + if (encoding != null) { + request.setCharacterEncoding(encoding); + response.setContentType("text/html; charset="+encoding); + } + chain.doFilter(request, response); + } + + public void destroy() { + this.encoding = null; + this.filterConfig = null; + } +} diff --git a/10/src/log4j.properties b/10/src/log4j.properties new file mode 100644 index 0000000..7cac493 --- /dev/null +++ b/10/src/log4j.properties @@ -0,0 +1,4 @@ +log4j.rootLogger=WARN,stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] -%m %n \ No newline at end of file diff --git "a/10/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/10/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..b94b607 Binary files /dev/null and "b/10/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/11/.classpath b/11/.classpath new file mode 100644 index 0000000..0f4b791 --- /dev/null +++ b/11/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/11/.mymetadata b/11/.mymetadata new file mode 100644 index 0000000..9827dd8 --- /dev/null +++ b/11/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/11/.project b/11/.project new file mode 100644 index 0000000..50dc7bd --- /dev/null +++ b/11/.project @@ -0,0 +1,50 @@ + + + 11 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/11/.settings/.jsdtscope b/11/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/11/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/11/.settings/org.eclipse.jdt.core.prefs b/11/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4a5c80a --- /dev/null +++ b/11/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Mon Feb 14 16:52:43 CST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/11/.settings/org.eclipse.wst.jsdt.ui.superType.container b/11/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/11/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/11/.settings/org.eclipse.wst.jsdt.ui.superType.name b/11/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/11/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/11/WebRoot/CSS/style.css b/11/WebRoot/CSS/style.css new file mode 100644 index 0000000..b198acd --- /dev/null +++ b/11/WebRoot/CSS/style.css @@ -0,0 +1,141 @@ + + \ No newline at end of file diff --git a/11/WebRoot/Database/db_shop_Data.MDF b/11/WebRoot/Database/db_shop_Data.MDF new file mode 100644 index 0000000..1a838e7 Binary files /dev/null and b/11/WebRoot/Database/db_shop_Data.MDF differ diff --git a/11/WebRoot/Database/db_shop_Log.LDF b/11/WebRoot/Database/db_shop_Log.LDF new file mode 100644 index 0000000..0f59932 Binary files /dev/null and b/11/WebRoot/Database/db_shop_Log.LDF differ diff --git a/11/WebRoot/JS/AjaxAssistantFun.js b/11/WebRoot/JS/AjaxAssistantFun.js new file mode 100644 index 0000000..8748163 --- /dev/null +++ b/11/WebRoot/JS/AjaxAssistantFun.js @@ -0,0 +1,14 @@ +/*****************************************************/ +function onerror(){ +alert("IJ"); +window.location.href="index.jsp"; +} +/***************************ؽʾ******************************/ +//ӻ޸ƷϢʱӦ +function deal_type(){ + subType.innerHTML=this.req.responseText; +} +//޸ĹʱӦ +function deal_cart(){ + totalSum.innerHTML=this.req.responseText; +} diff --git a/11/WebRoot/JS/AjaxRequest.js b/11/WebRoot/JS/AjaxRequest.js new file mode 100644 index 0000000..2c449eb --- /dev/null +++ b/11/WebRoot/JS/AjaxRequest.js @@ -0,0 +1,54 @@ +var net=new Object(); +net.AjaxRequest=function(url,onload,onerror,method,params){ + this.req=null; + this.onload=onload; + this.onerror=(onerror) ? onerror : this.defaultError; + this.loadDate(url,method,params); +} + +net.AjaxRequest.prototype.loadDate=function(url,method,params){ + if (!method){ + method="GET"; + } + if (window.XMLHttpRequest){ + this.req=new XMLHttpRequest(); + } else if (window.ActiveXObject){ + this.req=new ActiveXObject("Microsoft.XMLHTTP"); + } + if (this.req){ + try{ + var loader=this; + this.req.onreadystatechange=function(){ + net.AjaxRequest.onReadyState.call(loader); + } + this.req.open(method,url,true); + //this.req.send(params); + this.req.send(null); + }catch (err){ + this.onerror.call(this); + } + } +} + + +net.AjaxRequest.onReadyState=function(){ + var req=this.req; + var ready=req.readyState; + if (ready==4){ + if (req.status==200 ){ + this.onload.call(this); + }else{ + this.onerror.call(this); + } + } +} + +net.AjaxRequest.prototype.defaultError=function(){ + alert("error fetching data!" + +"\n\nreadyState:"+this.req.readyState + +"\nstatus: "+this.req.status + +"\nheaders: "+this.req.getAllResponseHeaders()); +} + + + diff --git a/11/WebRoot/JS/check.js b/11/WebRoot/JS/check.js new file mode 100644 index 0000000..a15d4fa --- /dev/null +++ b/11/WebRoot/JS/check.js @@ -0,0 +1,114 @@ +//жûǷϷ +function check(){ + if (myform.username.value==""){ + alert("û");myform.username.focus();return; + } + if (myform.truename.value==""){ + alert("ʵ");myform.truename.focus();return; + } + if (myform.pwd.value==""){ + alert("룡");myform.pwd.focus();return; + } + if (myform.pwd.value.length<1){ + alert("Ϊ6λ룡");myform.pwd.focus();return; + } + if (myform.pwd1.value==""){ + alert("ȷ룡");myform.pwd1.focus();return; + } + if (myform.pwd.value!=myform.pwd1.value){ + alert("벻һ£룡");myform.pwd.focus();return; + } + if(myform.cardno.value==""){ + alert("֤룡");myform.cardno.focus();return; + } + if (myform.email.value==""){ + alert("Emailַ");myform.email.focus();return; + } + var i=myform.email.value.indexOf("@"); + var j=myform.email.value.indexOf("."); + if((i<0)||(i-j>0)||(j<0)){ + alert("Emailַȷ룡");myform.email.value="";myform.email.focus();return; + } + myform.submit(); +} +function check_modi(){ + if (myform.truename.value==""){ + alert("ʵ");myform.truename.focus();return; + } + if (myform.oldpwd.value==""){ + alert("ԭ룡");myform.oldpwd.focus();return; + } + if(myform.holdpwd.value!=myform.oldpwd.value){ + alert("ԭ벻ȷ룡");myform.oldpwd.value="";myform.oldpwd.focus();return; + } + if (myform.pwd.value==""){ + alert("룡");myform.pwd.focus();return; + } + if (myform.pwd.value.length<1){ + alert("Ϊ6λ룡");myform.pwd.focus();return; + } + if (myform.pwd1.value==""){ + alert("ȷ룡");myform.pwd1.focus();return; + } + if (myform.pwd.value!=myform.pwd1.value){ + alert("벻һ£룡");myform.pwd.focus();return; + } + if(myform.cardno.value==""){ + alert("֤룡");myform.cardno.focus();return; + } + if (myform.email.value==""){ + alert("Emailַ");myform.email.focus();return; + } + var i=myform.email.value.indexOf("@"); + var j=myform.email.value.indexOf("."); + if((i<0)||(i-j>0)||(j<0)){ + alert("Emailַȷ룡");myform.email.value="";myform.email.focus();return; + } + myform.submit(); +} +function checkU(myform){ + if(myform.username.value==""){ + alert("û!");myform.username.focus();return; + } + if(myform.PWD.value==""){ + alert("!");myform.PWD.focus();return; + } + myform.submit(); +} + +function checkM(myform){ + if(myform.manager.value==""){ + alert("Ա!");myform.manager.focus();return false; + } + if(myform.PWD.value==""){ + alert("!");myform.PWD.focus();return false; + } +} +function CheckAll(elementsA,elementsB){ + for(i=0;i + +<% +String username=(String)session.getAttribute("username"); +ResultSet rs=conn.executeQuery("select ID,GoodsName,Introduce,nowprice,picture from tb_goods where newgoods=1 order by GoodsName"); +int goodsID=-1; +String goodsName=""; +String introduce=""; +float nowprice=(float)0.0; +String picture=""; +%> + + +MR繺 + + + + + + + + + + + + +
    + + + + + + + + + + + + +
     
     
    + <% + while(rs.next()){ + goodsID=rs.getInt(1); + goodsName=rs.getString(2); + introduce=rs.getString(3); + nowprice=rs.getFloat(4); + picture=rs.getString(5); + %> + + + + + <%}%> +
    + + + + + + + + + + + + + +
    Ʒƣ<%=goodsName%>
    Ʒ۸<%=nowprice%>(Ԫ)
    Ʒ˵<%=introduce%>
    +   + <%if (username!=null && username!=""){%> +   + <%}%>
    + + + +<%conn.close();%> diff --git a/11/WebRoot/SellSort.jsp b/11/WebRoot/SellSort.jsp new file mode 100644 index 0000000..8101ee1 --- /dev/null +++ b/11/WebRoot/SellSort.jsp @@ -0,0 +1,64 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String username=(String)session.getAttribute("username"); +ResultSet rs=conn.executeQuery("select top 10 GoodsID,GoodsName, sum(number) as sumNum from V_order_detail group by GoodsName,GoodsID order by sumNum desc"); +int goodsID=-1; +String goodsName=""; +%> + + +MR繺 + + + + + + + + + + + + +
    + + + + + + + + + + + + +
     
     
    + <%int m=1; + while(rs.next()){ + goodsID=rs.getInt(1); + goodsName=rs.getString(2); + %> + + + + + + +
         <%=goodsName%><%if (username!=null && username!=""){%>  + + <%}else{out.println("¼ɹ");}%>
    + <% + m++; + }%> +
    + + +
    + + + +<%conn.close();%> diff --git a/11/WebRoot/WEB-INF/classes/com/connDB.properties b/11/WebRoot/WEB-INF/classes/com/connDB.properties new file mode 100644 index 0000000..4d0bf2a --- /dev/null +++ b/11/WebRoot/WEB-INF/classes/com/connDB.properties @@ -0,0 +1,6 @@ +DB_CLASS_NAME=com.microsoft.sqlserver.jdbc.SQLServerDriver +DB_URL=jdbc:sqlserver://localhost:1433;DatabaseName=db_shop +#DB_USER=saû +DB_USER=sa +#DB_PWDû룩= +DB_PWD= diff --git a/11/WebRoot/WEB-INF/classes/com/dao/GoodsDao.class b/11/WebRoot/WEB-INF/classes/com/dao/GoodsDao.class new file mode 100644 index 0000000..3dd8221 Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/dao/GoodsDao.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/dao/GoodsDaoImpl.class b/11/WebRoot/WEB-INF/classes/com/dao/GoodsDaoImpl.class new file mode 100644 index 0000000..2a196cb Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/dao/GoodsDaoImpl.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/dao/MemberDao.class b/11/WebRoot/WEB-INF/classes/com/dao/MemberDao.class new file mode 100644 index 0000000..4dacc9e Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/dao/MemberDao.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/dao/MemberDaoImpl.class b/11/WebRoot/WEB-INF/classes/com/dao/MemberDaoImpl.class new file mode 100644 index 0000000..e0f2208 Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/dao/MemberDaoImpl.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/dao/PlacardDao.class b/11/WebRoot/WEB-INF/classes/com/dao/PlacardDao.class new file mode 100644 index 0000000..3cb887d Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/dao/PlacardDao.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/dao/PlacardDaoImpl.class b/11/WebRoot/WEB-INF/classes/com/dao/PlacardDaoImpl.class new file mode 100644 index 0000000..775f22e Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/dao/PlacardDaoImpl.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/dao/SubtypeDao.class b/11/WebRoot/WEB-INF/classes/com/dao/SubtypeDao.class new file mode 100644 index 0000000..836518a Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/dao/SubtypeDao.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/dao/SubtypeDaoImpl.class b/11/WebRoot/WEB-INF/classes/com/dao/SubtypeDaoImpl.class new file mode 100644 index 0000000..adb985c Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/dao/SubtypeDaoImpl.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/dao/SuperTypeDaoImpl.class b/11/WebRoot/WEB-INF/classes/com/dao/SuperTypeDaoImpl.class new file mode 100644 index 0000000..3a92714 Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/dao/SuperTypeDaoImpl.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/dao/SupertypeDao.class b/11/WebRoot/WEB-INF/classes/com/dao/SupertypeDao.class new file mode 100644 index 0000000..b68b1e1 Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/dao/SupertypeDao.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/model/Goods.class b/11/WebRoot/WEB-INF/classes/com/model/Goods.class new file mode 100644 index 0000000..8aa028a Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/model/Goods.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/model/Goodselement.class b/11/WebRoot/WEB-INF/classes/com/model/Goodselement.class new file mode 100644 index 0000000..f4e7abf Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/model/Goodselement.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/model/Member.class b/11/WebRoot/WEB-INF/classes/com/model/Member.class new file mode 100644 index 0000000..795d8d1 Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/model/Member.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/model/Placard.class b/11/WebRoot/WEB-INF/classes/com/model/Placard.class new file mode 100644 index 0000000..9eabff3 Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/model/Placard.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/model/SubType.class b/11/WebRoot/WEB-INF/classes/com/model/SubType.class new file mode 100644 index 0000000..8a6e4f9 Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/model/SubType.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/model/SuperType.class b/11/WebRoot/WEB-INF/classes/com/model/SuperType.class new file mode 100644 index 0000000..ae7c000 Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/model/SuperType.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/tools/ChStr.class b/11/WebRoot/WEB-INF/classes/com/tools/ChStr.class new file mode 100644 index 0000000..873551b Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/tools/ChStr.class differ diff --git a/11/WebRoot/WEB-INF/classes/com/tools/ConnDB.class b/11/WebRoot/WEB-INF/classes/com/tools/ConnDB.class new file mode 100644 index 0000000..28cca04 Binary files /dev/null and b/11/WebRoot/WEB-INF/classes/com/tools/ConnDB.class differ diff --git a/11/WebRoot/WEB-INF/lib/jstl.jar b/11/WebRoot/WEB-INF/lib/jstl.jar new file mode 100644 index 0000000..55ff4e1 Binary files /dev/null and b/11/WebRoot/WEB-INF/lib/jstl.jar differ diff --git a/11/WebRoot/WEB-INF/lib/sqljdbc.jar b/11/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/11/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/11/WebRoot/WEB-INF/lib/standard.jar b/11/WebRoot/WEB-INF/lib/standard.jar new file mode 100644 index 0000000..89a03cd Binary files /dev/null and b/11/WebRoot/WEB-INF/lib/standard.jar differ diff --git a/11/WebRoot/WEB-INF/web.xml b/11/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..cb0657f --- /dev/null +++ b/11/WebRoot/WEB-INF/web.xml @@ -0,0 +1,10 @@ + + + + index.jsp + + diff --git a/11/WebRoot/ad.jsp b/11/WebRoot/ad.jsp new file mode 100644 index 0000000..70bb22c --- /dev/null +++ b/11/WebRoot/ad.jsp @@ -0,0 +1,10 @@ + + + + + + + +
    +<%@ page contentType="text/html; charset=gb2312" language="java" %> + diff --git a/11/WebRoot/bbs_detail.jsp b/11/WebRoot/bbs_detail.jsp new file mode 100644 index 0000000..5f4f99d --- /dev/null +++ b/11/WebRoot/bbs_detail.jsp @@ -0,0 +1,74 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +int ID=-1; +ID=Integer.parseInt(request.getParameter("ID")); +if(ID>0){ + ResultSet rs=conn.executeQuery("select * from tb_bbs where ID="+ID); + String title=""; + String content=""; + String intime=""; + if(rs.next()){ + title=rs.getString(2); + content=rs.getString(3); + intime=rs.getString(4); + } +%> + + +MR繺 + + + + + + + + + + + + +
    + + + + + + + + + + + +
     
     
    + + + + + + + + + + + + + + + + + + + + +
      <%=title%> 
      <%=chStr.convertStr(content)%> 
      ڣ<%=intime%> 
          +
    + + + +<%conn.close(); +}else{ + out.println(""); +} +String Username=""; +Username=(String)session.getAttribute("username"); +if (Username!=""){ +try{ +ResultSet rs_user=conn.executeQuery("select * from tb_Member where username='"+Username+"'"); +if(!rs_user.next()){ + session.invalidate(); + out.println(""); + return; +}else{ + String Truename=rs_user.getString("Truename"); + String address=rs_user.getString("address"); + String postcode=rs_user.getString("postcode"); + String tel=rs_user.getString("tel"); +%> + + + +MR繺 + + + + + + + + + + + + + +
    + + + + + + + + + + + + +
     
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      ע⣺ҪǷύɲҪ鷳
    + *
    ʵ + *
    ϵַ + *
    + *
    ϵ绰 + *
    ʽ + *
    ͷʽ + *
        ע
    +   +
    +
    + + +
    + + + +<%} +}catch(Exception e){ +out.println(e.toString()); +} +}else{ + session.invalidate(); + out.println(""); +} +%> \ No newline at end of file diff --git a/11/WebRoot/cart_clear.jsp b/11/WebRoot/cart_clear.jsp new file mode 100644 index 0000000..8b306e2 --- /dev/null +++ b/11/WebRoot/cart_clear.jsp @@ -0,0 +1,5 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<% +session.removeAttribute("cart"); +response.sendRedirect("cart_null.jsp"); +%> diff --git a/11/WebRoot/cart_modify.jsp b/11/WebRoot/cart_modify.jsp new file mode 100644 index 0000000..a78aabb --- /dev/null +++ b/11/WebRoot/cart_modify.jsp @@ -0,0 +1,27 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.util.Vector"%> +<%@ page import="com.model.Goodselement"%> +<% +Vector cart=(Vector)session.getAttribute("cart"); +int ID=Integer.parseInt(request.getParameter("ID")); +int number=Integer.parseInt(request.getParameter("number")); +Vector newcart=new Vector(); +float sum=0; +for(int i=0;ialert('IJ!');history.back();"); + return; + } +} +session.setAttribute("cart",newcart); //ﳵеƷ浽session +out.println("ϼܽ"+sum+""); +%> diff --git a/11/WebRoot/cart_move.jsp b/11/WebRoot/cart_move.jsp new file mode 100644 index 0000000..497f136 --- /dev/null +++ b/11/WebRoot/cart_move.jsp @@ -0,0 +1,11 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.util.*"%> +<% +Vector cart=(Vector)session.getAttribute("cart"); +try{ + int id=Integer.parseInt(request.getParameter("ID")); + cart.removeElementAt(id); + session.setAttribute("cart",cart); + response.sendRedirect("cart_see.jsp"); + }catch(Exception e){ +} +%> diff --git a/11/WebRoot/cart_null.jsp b/11/WebRoot/cart_null.jsp new file mode 100644 index 0000000..6a785b6 --- /dev/null +++ b/11/WebRoot/cart_null.jsp @@ -0,0 +1,49 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +MR繺 + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
     
     
    + + + + + + + + + + +
     ĹﳵΪգ
    + +
    + + + \ No newline at end of file diff --git a/11/WebRoot/cart_order.jsp b/11/WebRoot/cart_order.jsp new file mode 100644 index 0000000..5659ca3 --- /dev/null +++ b/11/WebRoot/cart_order.jsp @@ -0,0 +1,112 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.util.Vector"%> +<%@ page import="com.model.Goodselement"%> + + +<% + if(session.getAttribute("cart")==""){ + out.println(""); +} +String Username=""; +Username=(String)session.getAttribute("username"); +if (Username!=""){ +try{ +ResultSet rs_user=conn.executeQuery("select * from tb_Member where username='"+Username+"'"); +if(!rs_user.next()){ + session.invalidate(); + out.println(""); + return; +}else{ + String username=chStr.chStr(request.getParameter("username")); + String truename=chStr.chStr(request.getParameter("truename")); + String address=chStr.chStr(request.getParameter("address")); + String postcode=request.getParameter("postcode"); + String tel=request.getParameter("tel"); + String pay=chStr.chStr(request.getParameter("pay")); + String carry=chStr.chStr(request.getParameter("carry")); + String bz=chStr.chStr(request.getParameter("bz")); + int orderID=0; + // + float rebate=1; + ResultSet rs_rebate=conn.executeQuery("select rebate from V_Member where username='"+username+"'"); + + if (rs_rebate.next()){ + rebate=rs_rebate.getFloat("rebate"); + } + Vector cart=(Vector)session.getAttribute("cart"); + int number=0; + float nowprice=0f; + float sum=0f; + float Totalsum=0f; + String flag="True"; + int temp=0; + int ID=-1; + //붩 + float bnumber=cart.size(); + String sql="insert into tb_Order(bnumber,username,truename,address,postcode,tel,pay,carry,rebate,bz) values("+bnumber+",'"+username+"','"+truename+"','"+address+"','"+postcode+"','"+tel+"','"+pay+"','"+carry+"',"+rebate+",'"+bz+"')"; + temp=conn.executeUpdate_id(sql); + //out.print("sql:"+sql); + if (temp==0){ + flag="false"; + // out.print(flag+""); + }else{ + orderID=temp; + } + String str=""; + //붩ϸ + for(int i=0;ialert('Ч');history.back();"); + }else{ + session.removeAttribute("cart"); + out.println(""); + } + conn.close(); +} +}catch(Exception e){ +out.println(e.toString()); +} +}else{ + session.invalidate(); + out.println(""); +} +%> + \ No newline at end of file diff --git a/11/WebRoot/cart_see.jsp b/11/WebRoot/cart_see.jsp new file mode 100644 index 0000000..35f0dbd --- /dev/null +++ b/11/WebRoot/cart_see.jsp @@ -0,0 +1,137 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.util.Vector"%> +<%@ page import="com.model.Goodselement"%> + +<% +String username=""; +username=(String)session.getAttribute("username"); +if(username=="" || username==null){ + out.println(""); +}else{ + Vector cart=(Vector)session.getAttribute("cart"); + if(cart==null || cart.size()==0){ + response.sendRedirect("cart_null.jsp"); + }else{ + %> + + +MR繺 + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
     
     
    + + + + + +
    + + + + +
    +
    + + + + + + + + + + + <% + float sum=0; + int ID=-1; + String goodsname=""; + for(int i=0;i0){ + ResultSet rs_goods=conn.executeQuery("select * from tb_goods where ID="+ID); + if (rs_goods.next()){ + goodsname=rs_goods.getString("goodsname"); + } + } + %> + + + + + + + + + <% + } + + %> +
    ƷƷ˻
    <%=i+1%><%=ID%><%=goodsname%><%=goodsitem.nowprice%> + <%=(goodsitem.nowprice*goodsitem.number)%>
    +
    + + + + + + + + + + + + +
       
     ϼܽ<%=sum%>
    | ȥ̨ | չﳵ
    + +
    + + + +<%conn.close(); +}} +%> \ No newline at end of file diff --git a/11/WebRoot/checkUserName.jsp b/11/WebRoot/checkUserName.jsp new file mode 100644 index 0000000..c0ab6aa --- /dev/null +++ b/11/WebRoot/checkUserName.jsp @@ -0,0 +1,38 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String username=chStr.chStr(request.getParameter("username")); +ResultSet rs=conn.executeQuery("select * from tb_member where username='"+username+"'"); +%> + + + +û + + + + + + + + + + <% + if(rs.next()){ + %> + + + + + <%}else{%> + + + + <%}%> + + + +
     
    <%out.println("ܱǸ!

    ["+username+"]ûѾע!");%>
    <%out.println("ף!

    ["+username+"]ûûбע!");%>
    + + diff --git a/11/WebRoot/copyright.jsp b/11/WebRoot/copyright.jsp new file mode 100644 index 0000000..7b131f9 --- /dev/null +++ b/11/WebRoot/copyright.jsp @@ -0,0 +1,16 @@ +<%@ page contentType="text/html; charset=gb2312"%> + + + + + + + + + + + + + +
    +
    | | ؼƷ | | QQ | ˢҳ | ̨
    All CopyRights © reserved 2011 ʡտƼ޹˾
    ͷߣ0431-84978981 E-mailmingrisoft@mingrisoft.com
    diff --git a/11/WebRoot/goodsType.jsp b/11/WebRoot/goodsType.jsp new file mode 100644 index 0000000..04607a8 --- /dev/null +++ b/11/WebRoot/goodsType.jsp @@ -0,0 +1,95 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +ResultSet rs_superType=conn.executeQuery("select ID,superType from V_Type group by ID,superType order by superType desc"); +%> + + + + +
    + + + + + + + +
    + + <% + int ID_superType=0; + String superType=""; + int m=1; + while(rs_superType.next()){ + ID_superType=rs_superType.getInt(1); + superType=rs_superType.getString(2); + String sql="select * from V_Type where ID="+ID_superType; + ResultSet rs_subType=conn.executeQuery(sql); + String subType=""; + int subID=0; + //ȡ¼ + rs_subType.last(); + int subType_RC=rs_subType.getRow(); + rs_subType.first(); + %> + + + <%if (subType_RC>0){%> + + + <%}%> + + <% }%> +
    <% + if(subType_RC<=0){ + %> +      <%=superType%> + <% + }else{ + %> +     չ <%=superType%> + <% + } + %>
    + + + + + + + + + +
    + \ No newline at end of file diff --git a/11/WebRoot/goods_detail.jsp b/11/WebRoot/goods_detail.jsp new file mode 100644 index 0000000..d208a8b --- /dev/null +++ b/11/WebRoot/goods_detail.jsp @@ -0,0 +1,84 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String username=(String)session.getAttribute("username"); +int ID=-1; +ID=Integer.parseInt(request.getParameter("ID")); +if(ID>0){ + ResultSet rs=conn.executeQuery("select ID,GoodsName,Introduce,nowprice,picture from tb_goods where ID="+ID); + int goodsID=-1; + String goodsName=""; + String introduce=""; + float nowprice=(float)0.0; + String picture=""; + if(rs.next()){ + goodsID=rs.getInt(1); + goodsName=rs.getString(2); + introduce=rs.getString(3); + nowprice=rs.getFloat(4); + picture=rs.getString(5); + } +%> + + +MR繺 + + + + + + + + + + + + +
    + + + + + + + + + + + + +
     
     
    + + + + + + + + + + + + + + + + + + + + +
     
     Ʒƣ<%=goodsName%>
     ۣ<%=nowprice%>(Ԫ)
     Ʒ˵<%=introduce%>
      + <%if (username!=null && username!=""){%> +   + <%}%>
     
    + + +
    + + + +<%conn.close(); +}else{ + out.println(""); + } + }else{ + out.println(""); + } +}catch(Exception e){ + out.println(""); +} +conn.close(); +%> diff --git a/11/WebRoot/login_u.jsp b/11/WebRoot/login_u.jsp new file mode 100644 index 0000000..7093eb6 --- /dev/null +++ b/11/WebRoot/login_u.jsp @@ -0,0 +1,32 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %> +<%String username=(String)session.getAttribute("username"); +if (username==null || username==""){%> + + + + + + + + +
      Ա + +    룺 + +   + + +  ע
    + + <%}else{%> + + + + + +
      [<%=username%>]ãӭMR繺ģڿԹˣϣڱĹ죡 + +   + +
    +<%}%> diff --git a/11/WebRoot/logout.jsp b/11/WebRoot/logout.jsp new file mode 100644 index 0000000..7189e82 --- /dev/null +++ b/11/WebRoot/logout.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" %> + + +Untitled Document + + + + +<% +session.invalidate(); +response.sendRedirect("index.jsp"); +%> + + diff --git a/11/WebRoot/manage/Login_M.jsp b/11/WebRoot/manage/Login_M.jsp new file mode 100644 index 0000000..dffbf75 --- /dev/null +++ b/11/WebRoot/manage/Login_M.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + + +̨! + + + + + + + + + + +
    + + + + + + + + + +
     
      + + + + + + + + + +
     û +
       룺 + +
    +   + +   +
    + + + + +
    All CopyRights © reserved 2011 ʡտƼ޹˾
    +
    + + diff --git a/11/WebRoot/manage/Login_M_deal.jsp b/11/WebRoot/manage/Login_M_deal.jsp new file mode 100644 index 0000000..9f863e4 --- /dev/null +++ b/11/WebRoot/manage/Login_M_deal.jsp @@ -0,0 +1,22 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String manager=chStr.chStr(request.getParameter("manager"));//˴бתûʱ +try{ + ResultSet rs=conn.executeQuery("select * from tb_manager where manager='"+manager+"'"); + if(rs.next()){ + String PWD=request.getParameter("PWD"); + if(PWD.equals(rs.getString("PWD"))){ + session.setAttribute("manager",manager); + response.sendRedirect("index.jsp"); + }else{ + out.println(""); + } + }else{ + out.println(""); + } +}catch(Exception e){ + out.println(""); +} +%> diff --git a/11/WebRoot/manage/banner.jsp b/11/WebRoot/manage/banner.jsp new file mode 100644 index 0000000..fea0355 --- /dev/null +++ b/11/WebRoot/manage/banner.jsp @@ -0,0 +1,7 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + +
    \ No newline at end of file diff --git a/11/WebRoot/manage/copyright.jsp b/11/WebRoot/manage/copyright.jsp new file mode 100644 index 0000000..84c5a7e --- /dev/null +++ b/11/WebRoot/manage/copyright.jsp @@ -0,0 +1,16 @@ +<%@ page contentType="text/html; charset=gb2312"%> + + + + + + + + + + + + + +
    +
    | | ؼƷ | | QQ | ˢҳ
    All CopyRights © reserved 2011 ʡտƼ޹˾
    ͷߣ0431-84978981 E-mailmingrisoft@mingrisoft.com
    \ No newline at end of file diff --git a/11/WebRoot/manage/goods_add.jsp b/11/WebRoot/manage/goods_add.jsp new file mode 100644 index 0000000..903dfea --- /dev/null +++ b/11/WebRoot/manage/goods_add.jsp @@ -0,0 +1,146 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +ResultSet rs_super=conn.executeQuery("select ID,superType from V_type group by ID,superType"); +int superID=-1; +String superName=""; +if(rs_super.next()){ + superID=rs_super.getInt(1); +}else{ + out.println(""); + return; +} +%> + + +MR繺ġ̨ + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + +
       [Ϣ]    [СϢ]    [ƷϢ] 
       
      ƷϢ  
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     Ʒƣ  +   
     ࣺ  +  СࣺڵСϢ
     ͼƬļ  + +  ۣ  + + (Ԫ)
     ǷƷ  + + + Ƿؼۣ + + +
     Ʒ飺  +
    + +  + +   + +
    +
    + +
    + + + +
    + + + diff --git a/11/WebRoot/manage/goods_add_deal.jsp b/11/WebRoot/manage/goods_add_deal.jsp new file mode 100644 index 0000000..7e73c6f --- /dev/null +++ b/11/WebRoot/manage/goods_add_deal.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + + + + +<% +String goodsName=chStr.chStr(goods.getGoodsName()); +ResultSet rs=conn.executeQuery("select * from tb_goods where goodsname='"+goodsName+"'"); +if (rs.next()){ + out.println(""); +}else{ + int ret=0; + ret=ins_goods.insert(goods); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> \ No newline at end of file diff --git a/11/WebRoot/manage/goods_del.jsp b/11/WebRoot/manage/goods_del.jsp new file mode 100644 index 0000000..26adde8 --- /dev/null +++ b/11/WebRoot/manage/goods_del.jsp @@ -0,0 +1,126 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String PID=""; +String goodsname=""; +String superType=""; +String subType=""; +String introduce=""; +String picture=""; +float price=(float)0.0; +float nowprice=(float)0.0; +int sale=0; +int newgoods=0; +PID=request.getParameter("ID"); +if (PID!=null && PID!=""){ + int ID=Integer.parseInt(PID); + ResultSet rs=conn.executeQuery("select * from V_goods where ID="+ID); + if(!rs.next()){ + out.println(""); + }else{ + superType=rs.getString("superType"); + subType=rs.getString("subType"); + goodsname=rs.getString("goodsname"); + introduce=rs.getString("introduce"); + price=rs.getFloat("Price"); + nowprice=rs.getFloat("nowPrice"); + picture=rs.getString("picture"); + newgoods=rs.getInt("newgoods"); + sale=rs.getInt("sale"); + } +%> + + +MR繺ġ̨ + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + +
       [Ϣ]    [СϢ]    [ƷϢ] 
       
      ɾƷϢ  
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     Ʒƣ  + + <%=goodsname%> +   
     ࣺ <%=superType%>  Сࣺ <%=subType%>
     ͼƬļ  + <%=picture%>
    ۣ <%=price%>(Ԫ)    ۣ  <%=nowprice%>(Ԫ)
     ǷƷ  <%if(newgoods==0){out.print("Ʒ");} + else{out.print("Ʒ");} + %> Ƿؼۣ<%if(sale==0){out.print("ؼƷ");} + else{out.print("ؼƷ");} + %>
     Ʒ飺  + <%=introduce%>
    + +   +
    +
    + +
    + + + +
    + + + +<%}else{ + out.println(""); +}else{ + int ret=0; + ret=del_goods.delete(goods); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} + +%> diff --git a/11/WebRoot/manage/goods_detail.jsp b/11/WebRoot/manage/goods_detail.jsp new file mode 100644 index 0000000..a17c4c5 --- /dev/null +++ b/11/WebRoot/manage/goods_detail.jsp @@ -0,0 +1,88 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String username=(String)session.getAttribute("username"); +int ID=-1; +ID=Integer.parseInt(request.getParameter("ID")); +if(ID>0){ + ResultSet rs=conn.executeQuery("select ID,GoodsName,Introduce,nowprice,picture from tb_goods where ID="+ID); + int goodsID=-1; + String goodsName=""; + String introduce=""; + float nowprice=(float)0.0; + String picture=""; + if(rs.next()){ + goodsID=rs.getInt(1); + goodsName=rs.getString(2); + introduce=rs.getString(3); + nowprice=rs.getFloat(4); + picture=rs.getString(5); + } +%> + + +MR繺ġ̨ + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
       [Ϣ]    [СϢ]    [ƷϢ] 
       
      ƷϸϢ  
      
    + + + + + + + + + + + + + + + +
    <%=goodsName%>
    ۣ<%=nowprice%>(Ԫ)
    <%=introduce%>
    +
    + + + +
    + + + +<%conn.close(); +}else{ + out.println(""); + }else{ + superID1=rs.getInt("superID"); + subID1=rs.getInt("subID"); + goodsname=rs.getString("goodsname"); + introduce=rs.getString("introduce"); + price=rs.getFloat("Price"); + nowprice=rs.getFloat("nowPrice"); + picture=rs.getString("picture"); + newgoods=rs.getInt("newgoods"); + sale=rs.getInt("sale"); + } + ResultSet rs_super=conn.executeQuery("select ID,superType from V_type group by ID,superType"); + int superID=-1; + String superName=""; + if(!rs_super.next()){ + out.println(""); + return; + } +%> + + +MR繺ġ̨ + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + +
       [Ϣ]    [СϢ]    [ƷϢ] 
       
      ޸ƷϢ  
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     Ʒƣ +   + +   
     ࣺ  +  СࣺڵСϢ
     ͼƬļ  + + (˴ֻдͼƬļ·)
    ۣ  + (Ԫ)    ۣ   +(Ԫ)
     ǷƷ  > + + > + Ƿؼۣ> + + > +
     Ʒ飺  +
    + +  + +   + +
    +
    + +
    + + + +
    + + + + +<%}else{ + out.println(""); +}else{ + int ret=0; + ret=up_goods.update(goods); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} + +%> diff --git a/11/WebRoot/manage/index.jsp b/11/WebRoot/manage/index.jsp new file mode 100644 index 0000000..34d016e --- /dev/null +++ b/11/WebRoot/manage/index.jsp @@ -0,0 +1,128 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +ResultSet rs=conn.executeQuery("select * from tb_goods order by INTime Desc"); +%> + + +MR繺ġ̨ + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + +
       [Ϣ]    [СϢ]    [ƷϢ] 
       
      Ʒб  
    + + + + + +
    + + + + +
     
    + + + + + + + + + +<% +String str=(String)request.getParameter("Page"); +if(str==null){ + str="0"; +} +int pagesize=10; +rs.last(); +int RecordCount=rs.getRow(); +int maxPage=0; +maxPage=(RecordCount%pagesize==0)?(RecordCount/pagesize):(RecordCount/pagesize+1); + +int Page=Integer.parseInt(str); +if(Page<1){ + Page=1; +}else{ + if(Page>maxPage){ + Page=maxPage; + } +} +rs.absolute((Page-1)*pagesize+1); +for(int i=1;i<=pagesize;i++){ + int ID=rs.getInt("ID"); + String goodsName=rs.getString("goodsName"); + String introduce=rs.getString("introduce"); + String newgoods=rs.getInt("newgoods")==0 ? "":""; + String sale=rs.getInt("sale")==0 ? "":""; + %> + + + + + + + + + +<% + try{ + if(!rs.next()){break;} + }catch(Exception e){} +} +%> +
    ƷǷƷǷؼ޸ɾ
    <%=goodsName%><%=introduce%><%=newgoods%><%=sale%>
    + + + + +
    ǰҳ[<%=Page%>/<%=maxPage%>]  + <%if(Page>1){%> + һҳһҳ + <% + } + if(Page + һҳһҳ  + <%} + %> +
    + +
    + + + +
    + + + diff --git a/11/WebRoot/manage/logout.jsp b/11/WebRoot/manage/logout.jsp new file mode 100644 index 0000000..1d8845b --- /dev/null +++ b/11/WebRoot/manage/logout.jsp @@ -0,0 +1,5 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +session.invalidate(); +response.sendRedirect("../index.jsp"); +%> diff --git a/11/WebRoot/manage/member_detail.jsp b/11/WebRoot/manage/member_detail.jsp new file mode 100644 index 0000000..b5cb89a --- /dev/null +++ b/11/WebRoot/manage/member_detail.jsp @@ -0,0 +1,131 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +if (request.getParameter("ID")!=null){ + int ID=Integer.parseInt(request.getParameter("ID")); + ResultSet rs=conn.executeQuery("select * from tb_member where ID="+ID); + String username=""; + String Truename=""; + String city=""; + String address=""; + String postcode=""; + String CardNO=""; + String CardType=""; + float Amount=0; + String Tel=""; + String Email=""; + if(!rs.next()){ + out.println(""); + }else{ + username=rs.getString("username"); + Truename=rs.getString("Truename"); + city=rs.getString("city"); + address=rs.getString("address"); + postcode=rs.getString("postcode"); + CardNO=rs.getString("CardNO"); + CardType=rs.getString("CardType"); + Amount=rs.getFloat("Amount"); + Tel=rs.getString("Tel"); + Email=rs.getString("Email"); + } +%> + + +MR繺ġ̨ + + + + + + + + + + + + + +
    + + + + + + + + + + + + +
       
      ԱϸϢ  
    + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       <%=username%>
     ʵ <%=Truename%>
         У <%=city%> +
         ַ <%=address%>
     룺 <%=postcode%> +
     ֤ͣ <%=CardType%>
     ֤룺 <%=CardNO%> +
          <%=Tel%>
     Email <%=Email%>
       <%=Amount%> (Ԫ)
    + +
    + +
    + + + +
    + + + +<% +}else{ + out.println(""); +}%> \ No newline at end of file diff --git a/11/WebRoot/manage/member_freeze.jsp b/11/WebRoot/manage/member_freeze.jsp new file mode 100644 index 0000000..77358b3 --- /dev/null +++ b/11/WebRoot/manage/member_freeze.jsp @@ -0,0 +1,16 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +if(request.getParameter("ID")!=""){ + int ID=Integer.parseInt(request.getParameter("ID")); + String sql="update tb_member set freeze=1 where ID="+ID; + int ret=0; + ret=conn.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> diff --git a/11/WebRoot/manage/member_thaw.jsp b/11/WebRoot/manage/member_thaw.jsp new file mode 100644 index 0000000..0ebb036 --- /dev/null +++ b/11/WebRoot/manage/member_thaw.jsp @@ -0,0 +1,25 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + +Untitled Document + + + + +<% +if(request.getParameter("ID")!=""){ + int ID=Integer.parseInt(request.getParameter("ID")); + String sql="update tb_member set freeze=0 where ID="+ID; + int ret=0; + ret=conn.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> + + diff --git a/11/WebRoot/manage/membermanage.jsp b/11/WebRoot/manage/membermanage.jsp new file mode 100644 index 0000000..4c9c859 --- /dev/null +++ b/11/WebRoot/manage/membermanage.jsp @@ -0,0 +1,128 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +ResultSet rs=conn.executeQuery("select * from tb_Member"); +%> + + +MR繺ġ̨ + + + + + + + + + + + + + +
    + + + + + + + + + + + + +
       
      Աб  
    + + + + + +
     
    + + + + + + + + + + +<% +String str=(String)request.getParameter("Page"); +if(str==null){ + str="0"; +} +int pagesize=10; +rs.last(); +int RecordCount=rs.getRow(); +int maxPage=0; +maxPage=(RecordCount%pagesize==0)?(RecordCount/pagesize):(RecordCount/pagesize+1); + +int Page=Integer.parseInt(str); +if(Page<1){ + Page=1; +}else{ + if(((Page-1)*pagesize+1)>RecordCount){ + Page=maxPage; + } +} +rs.absolute((Page-1)*pagesize+1); +for(int i=1;i<=pagesize;i++){ + int ID=rs.getInt("ID"); + String username=rs.getString("username"); + String Truename=rs.getString("Truename"); + String city=rs.getString("city"); + String CardNO=rs.getString("CardNO"); + String CardType=rs.getString("CardType"); + float Amount=rs.getFloat("Amount"); + String Tel=rs.getString("Tel"); + String Email=rs.getString("Email"); + int freeze=rs.getInt("freeze"); + %> + + + + + + + + + + +<% + try{ + if(!rs.next()){break;} + }catch(Exception e){} +} +%> +
    + ûʵEmailѶ/ⶳ
    <%=username%> <%=Truename%> <%=city%> <%=Tel%> <%=Email%> <%=Amount%><%if(freeze==0){%> + <%}%> + <%if(freeze==1){%>ⶳ + <%}%>
    + + + + +
    ǰҳ[<%=Page%>/<%=maxPage%>]  + <%if(Page>1){%> + һҳһҳ + <% + } + if(Page + һҳһҳ  + <%} + %>
    + +
    + + + +
    + + + diff --git a/11/WebRoot/manage/navigation.jsp b/11/WebRoot/manage/navigation.jsp new file mode 100644 index 0000000..3f6fc9d --- /dev/null +++ b/11/WebRoot/manage/navigation.jsp @@ -0,0 +1,43 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + +
    Ʒ
    + Goods Manage
    Ա
    + Member Manage

    + Order Manage

    + Manage Placard
    ˳̨
    + Exit Background
    diff --git a/11/WebRoot/manage/onclock.JS b/11/WebRoot/manage/onclock.JS new file mode 100644 index 0000000..8f13b31 --- /dev/null +++ b/11/WebRoot/manage/onclock.JS @@ -0,0 +1,42 @@ + function clockon(bgclock){ + var now=new Date(); + var year=now.getYear(); + var month=now.getMonth(); + var date=now.getDate(); + var day=now.getDay(); + var hour=now.getHours(); + var minu=now.getMinutes(); + var sec=now.getSeconds(); + var week; + month=month+1; + if(month<10) month="0"+month; + if(date<10) date="0"+date; + switch (day) + { case 1: + week="һ"; + break; + case 2: + week="ڶ"; + break; + case 3: + week=""; + break; + case 4: + week=""; + break; + case 5: + week=""; + break; + case 6: + week=""; + break; + default: + week=""; + break; + } + var time=""; + time=year+""+month+""+date+" "+week; + if(document.all){ + bgclock.innerHTML="^_^ "+time + } + } diff --git a/11/WebRoot/manage/order_detail.jsp b/11/WebRoot/manage/order_detail.jsp new file mode 100644 index 0000000..3c7773f --- /dev/null +++ b/11/WebRoot/manage/order_detail.jsp @@ -0,0 +1,117 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +if (request.getParameter("ID")!=null){ + int ID=Integer.parseInt(request.getParameter("ID")); + ResultSet rs_main=conn.executeQuery("select * from tb_order where orderID="+ID); + int orderID=0; + String address=""; + String postcode=""; + String tel=""; + String bz=""; + int goodID=-1; + String goodsname=""; + float nowprice=0; + int number=0; + if(rs_main.next()){ + orderID=rs_main.getInt("orderID"); + address=rs_main.getString("address"); + postcode=rs_main.getString("postcode"); + tel=rs_main.getString("tel"); + bz=rs_main.getString("bz"); + if (bz.equals("")){ + bz=""; + } + } +%> + + +MR繺ġ̨ + + + + + + + + + + + + + +
    + + + + + + + + + + + + +
       
      ϸϢ  
    + + + + + +
    + + + + + + + + + + + + + + + + +
    ţ <%=orderID%>
        ַ <%=address%>
    룺 <%=postcode%>
         <%=tel%>
        ע <%=bz%>
    + + + + + + + + <%ResultSet rs=conn.executeQuery("select * from V_order_detail where orderID="+orderID); + while(rs.next()){ + goodID=rs.getInt("goodsID"); + goodsname=rs.getString("goodsname"); + nowprice=rs.getFloat("price"); + number=rs.getInt("number"); + %> + + + + + + + <%}%> +
    ƷƷ
    <%=goodsname%><%=goodsname%><%=nowprice%>(Ԫ)<%=number%>
    + + + + +
    + +
    + + + +
    + + + +<%} +%> \ No newline at end of file diff --git a/11/WebRoot/manage/order_enforce.jsp b/11/WebRoot/manage/order_enforce.jsp new file mode 100644 index 0000000..2e32ed5 --- /dev/null +++ b/11/WebRoot/manage/order_enforce.jsp @@ -0,0 +1,25 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + +Untitled Document + + + + +<% +if(request.getParameter("ID")!=""){ + int ID=Integer.parseInt(request.getParameter("ID")); + String sql="update tb_order set enforce=1 where orderID="+ID; + int ret=0; + ret=conn.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> + + diff --git a/11/WebRoot/manage/ordermanage.jsp b/11/WebRoot/manage/ordermanage.jsp new file mode 100644 index 0000000..01b6627 --- /dev/null +++ b/11/WebRoot/manage/ordermanage.jsp @@ -0,0 +1,132 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +ResultSet rs=conn.executeQuery("select * from tb_order"); +int orderID=0; +String username=""; +int bnumber=0; +String truename=""; +String address=""; +String postcode=""; +String tel=""; +String pay=""; +String carry=""; +float rebate=1; +String orderDate=""; +String bz=""; +int enforce=0; +%> + + +MR繺ġ̨ + + + + + + + + + + + + + +
    + + + + + + + + + + + + +
       
      б  
    + + + + + + + + + + + + +<% +String str=(String)request.getParameter("Page"); +if(str==null){ + str="0"; +} +int pagesize=10; +rs.last(); +int RecordCount=rs.getRow(); +int maxPage=0; +maxPage=(RecordCount%pagesize==0)?(RecordCount/pagesize):(RecordCount/pagesize+1); + +int Page=Integer.parseInt(str); +if(Page<1){ + Page=1; +}else{ + if(((Page-1)*pagesize+1)>RecordCount){ + Page=maxPage; + } +} +rs.absolute((Page-1)*pagesize+1); +for(int i=1;i<=pagesize;i++){ + orderID=rs.getInt("orderID"); + bnumber=rs.getInt("bnumber"); + truename=rs.getString("truename"); + pay=rs.getString("pay"); + carry=rs.getString("carry"); + rebate=rs.getFloat("rebate"); + orderDate=rs.getString("orderDate"); + enforce=rs.getInt("enforce"); + %> + + + + + + + + + + +<% + try{ + if(!rs.next()){break;} + }catch(Exception e){} +} +%> +
    Ʒʵʽͷʽۿִ
    <%=orderID%><%=bnumber%><%=truename%><%=pay%><%=carry%><%=rebate*100%>%<%=orderDate%><%if(enforce==0){%> + <%}else{%>ִ<%}%>
    + + + + +
    ǰҳ[<%=Page%>/<%=maxPage%>]  + <%if(Page>1){%> + һҳһҳ + <% + } + if(Page + һҳһҳ  + <%} + %>
    + +
    + + + +
    + + + + diff --git a/11/WebRoot/manage/placard_Del_deal.jsp b/11/WebRoot/manage/placard_Del_deal.jsp new file mode 100644 index 0000000..3ff45a1 --- /dev/null +++ b/11/WebRoot/manage/placard_Del_deal.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +String ID[]=request.getParameterValues("delid"); +String bbsID=""; +if (ID.length>0){ + for(int i=0;ialert('Ϣɾʧ!');window.location.href='placardmanage.jsp';"); + }else{ + out.println(""); + } +}else{ + out.println(""); +} +%> diff --git a/11/WebRoot/manage/placard_add.jsp b/11/WebRoot/manage/placard_add.jsp new file mode 100644 index 0000000..28f5519 --- /dev/null +++ b/11/WebRoot/manage/placard_add.jsp @@ -0,0 +1,78 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +MR繺ġ̨ + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + +
       [Ϣ] 
       
      ӹϢ  
    + +
    + + + + + + + + + + + + +
     ݣ +
    + +  + +   + +
    +
    + +
    + + + +
    + + + \ No newline at end of file diff --git a/11/WebRoot/manage/placard_add_deal.jsp b/11/WebRoot/manage/placard_add_deal.jsp new file mode 100644 index 0000000..684a91b --- /dev/null +++ b/11/WebRoot/manage/placard_add_deal.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + + + + +<% +String title=chStr.chStr(placard.getTitle()); +ResultSet rs=conn.executeQuery("select * from tb_bbs where title='"+title+"'"); +if (rs.next()){ + out.println(""); +}else{ + int ret=0; + ret=ins_placard.insert(placard); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> \ No newline at end of file diff --git a/11/WebRoot/manage/placardmanage.jsp b/11/WebRoot/manage/placardmanage.jsp new file mode 100644 index 0000000..01fbcc4 --- /dev/null +++ b/11/WebRoot/manage/placardmanage.jsp @@ -0,0 +1,95 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +ResultSet rs=conn.executeQuery("select * from tb_BBS order by INTime Desc"); +%> + + +MR繺ġ̨ + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + +
       [ӹϢ] 
       
      Ϣб  
    + +
    + + + + +
    + + + + + + + <% +int ID=0; +String content=""; +String title=""; +while(rs.next()){ + ID=rs.getInt(1); + title=rs.getString(2); + content=rs.getString(3); +%> + + + + + + <% +} +%> +
    ɾ
    <%=chStr.convertStr(title)%><%=chStr.convertStr(content)%>
    + + + + + + + +
      + [ȫѡ/ѡ] [ɾ] +
    + +
    +
    + +
    + + + +
    + + + diff --git a/11/WebRoot/manage/safe.jsp b/11/WebRoot/manage/safe.jsp new file mode 100644 index 0000000..385e097 --- /dev/null +++ b/11/WebRoot/manage/safe.jsp @@ -0,0 +1,4 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<%if (session.getAttribute("manager")==null){ + out.println(""); +}%> diff --git a/11/WebRoot/manage/selSubType.jsp b/11/WebRoot/manage/selSubType.jsp new file mode 100644 index 0000000..bd74cbb --- /dev/null +++ b/11/WebRoot/manage/selSubType.jsp @@ -0,0 +1,30 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String str_subID=request.getParameter("subID"); +int P_superID=-1; +int superID=-1; +ResultSet rs_sub=null; +//ѯСĬѡ +if(request.getParameter("superID")=="" || request.getParameter("superID")==null){ + P_superID=superID; +}else{ + P_superID=Integer.parseInt(request.getParameter("superID")); +} +rs_sub=conn.executeQuery("select * from tb_subType where superType="+P_superID); +int subID=-1; +String subName=""; +%> + diff --git a/11/WebRoot/manage/subType.jsp b/11/WebRoot/manage/subType.jsp new file mode 100644 index 0000000..1473f61 --- /dev/null +++ b/11/WebRoot/manage/subType.jsp @@ -0,0 +1,96 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +ResultSet rs=conn.executeQuery("select * from V_Type order by ID Desc"); +%> + + +MR繺ġ̨ + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + +
      [СϢ] 
       
      СϢб  
    + +
    + + + + +
    + + + + + + + <% +int ID=0; +String superType=""; +String subType=""; +while(rs.next()){ + superType=rs.getString(2); + subType=rs.getString(3); + ID=rs.getInt(4); +%> + + + + + + <% +} +%> +
    ϢСϢɾ
    <%=superType%><%=subType%>
    + + + + + + + +
      + [ȫѡ/ѡ] [ɾ] +
    + +
    +
    + + +
    + + + +
    + + + \ No newline at end of file diff --git a/11/WebRoot/manage/subType_Del_deal.jsp b/11/WebRoot/manage/subType_Del_deal.jsp new file mode 100644 index 0000000..f88728a --- /dev/null +++ b/11/WebRoot/manage/subType_Del_deal.jsp @@ -0,0 +1,25 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +String ID[]=request.getParameterValues("delid"); +String subTypeID=""; +if (ID.length>0){ + for(int i=0;ialert('СϢɾʧ');window.location.href='subType.jsp';"); + }else{ + out.println(""); + } +}else{ + out.println(""); +} + +%> diff --git a/11/WebRoot/manage/subType_add_deal.jsp b/11/WebRoot/manage/subType_add_deal.jsp new file mode 100644 index 0000000..4df4a1c --- /dev/null +++ b/11/WebRoot/manage/subType_add_deal.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + + + + +<% +String typename=chStr.chStr(SubType.gettypename()); +ResultSet rs=conn.executeQuery("select * from tb_subType where typename='"+typename+"'"); +if (rs.next()){ + out.println(""); +}else{ + int ret=0; + ret=ins_subType.insert(SubType); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> \ No newline at end of file diff --git a/11/WebRoot/manage/sub_add.jsp b/11/WebRoot/manage/sub_add.jsp new file mode 100644 index 0000000..a20f01e --- /dev/null +++ b/11/WebRoot/manage/sub_add.jsp @@ -0,0 +1,87 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +ResultSet rs=conn.executeQuery("select * from tb_superType order by ID Desc"); +%> + + +MR繺ġ̨ + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + +
      [СϢ] 
       
      СϢ  
    + +
    + + + + + + + + + + + + +
    ѡࣺ
    Сƣ
    + +  + +   +
    +
    + +
    + + + +
    + + + diff --git a/11/WebRoot/manage/superType.jsp b/11/WebRoot/manage/superType.jsp new file mode 100644 index 0000000..e9daf01 --- /dev/null +++ b/11/WebRoot/manage/superType.jsp @@ -0,0 +1,89 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +ResultSet rs=conn.executeQuery("select * from tb_superType order by ID Desc"); +%> + + +MR繺ġ̨ + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + +
       [ӴϢ]
       
      Ϣб  
    + +
    + + + + +
    + + + + + + <% +int ID=0; +String superType=""; +while(rs.next()){ + ID=rs.getInt(1); + superType=rs.getString(2); +%> + + + + + <% +} +%> +
    Ϣɾ
    <%=superType%>
    + + + + + + + +
      + [ȫѡ/ѡ] [ɾ] +
    + +
    +
    + +
    + + + +
    + + + diff --git a/11/WebRoot/manage/superType_Del_deal.jsp b/11/WebRoot/manage/superType_Del_deal.jsp new file mode 100644 index 0000000..cbbb521 --- /dev/null +++ b/11/WebRoot/manage/superType_Del_deal.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +String ID[]=request.getParameterValues("delid"); +String superTypeID=""; +if (ID.length>0){ + for(int i=0;ialert('÷ѾӷϢɾСϢٽɾ!');window.location.href='superType.jsp';"); + }else{ + out.println(""); + } +}else{ + out.println(""); +} +%> diff --git a/11/WebRoot/manage/superType_add_deal.jsp b/11/WebRoot/manage/superType_add_deal.jsp new file mode 100644 index 0000000..59164f9 --- /dev/null +++ b/11/WebRoot/manage/superType_add_deal.jsp @@ -0,0 +1,25 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<%@ page import="com.dao.SuperTypeDaoImpl"%> + + + + + + +<% +String typename=chStr.chStr(SuperType.gettypename()); +ResultSet rs=conn.executeQuery("select * from tb_superType where typename='"+typename+"'"); +if (rs.next()){ + out.println(""); +}else{ + int ret=0; + SuperTypeDaoImpl ins_SuperType=new SuperTypeDaoImpl(); + ret=ins_SuperType.insert(SuperType); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> \ No newline at end of file diff --git a/11/WebRoot/manage/super_add.jsp b/11/WebRoot/manage/super_add.jsp new file mode 100644 index 0000000..67f4ed0 --- /dev/null +++ b/11/WebRoot/manage/super_add.jsp @@ -0,0 +1,73 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +MR繺ġ̨ + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + +
      [Ϣ] 
       
      ӴϢ  
    + +
    + + + + + + + + + + + + +
    ƣ
      
    + +  + +   +
    +
    + +
    + + + +
    + + + diff --git a/11/WebRoot/modifyMember.jsp b/11/WebRoot/modifyMember.jsp new file mode 100644 index 0000000..c624fb2 --- /dev/null +++ b/11/WebRoot/modifyMember.jsp @@ -0,0 +1,142 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<% +String username=(String)session.getAttribute("username"); +if(username!=null && username!=""){ + String sql="select * from tb_member where username='"+username+"'"; + ResultSet rs=conn.executeQuery(sql); + int id=-1; + String truename=""; + String PWD=""; + String city=""; + String address=""; + String postcode=""; + String cardNO=""; + String cardType=""; + String tel=""; + String email=""; + if(rs.next()){ + id=rs.getInt(1); + truename=rs.getString(3); + PWD=rs.getString(4); + city=rs.getString(5); + address=rs.getString(6); + postcode=rs.getString(7); + cardNO=rs.getString(8); + cardType=rs.getString(9); + tel=rs.getString(12); + email=rs.getString(13); + } +%> + + +MR繺 + + + + + + + + + + + + + +
    + + + + + + + + + + + + +
     
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + (û޸) + +
    ʵ + *
    ԭ 룺 +
     룺 + *
    ȷ룺 + *
    ڳУ
    ϵַ
    ֤룺 + *
    ֤> + ֤  + > + ֤ + > + ѧ֤
    ϵ绰
    Email + *
      + + +
    +
    + + +
    + + + +<%conn.close(); +}else{ + out.println(""); +}%> diff --git a/11/WebRoot/modifyMember_deal.jsp b/11/WebRoot/modifyMember_deal.jsp new file mode 100644 index 0000000..2a2fc69 --- /dev/null +++ b/11/WebRoot/modifyMember_deal.jsp @@ -0,0 +1,32 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + + + +ԱϢ޸! + + + + +<% +request.setCharacterEncoding("gb2312"); +Integer id=member.getID(); +ResultSet rs=conn.executeQuery("select * from tb_Member where ID='"+id+"'"); +if (!rs.next()){ + out.println(""); +}else{ + int ret=0; + ret=ins_member.update(member); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} + +%> + + diff --git a/11/WebRoot/navigation.jsp b/11/WebRoot/navigation.jsp new file mode 100644 index 0000000..73f9545 --- /dev/null +++ b/11/WebRoot/navigation.jsp @@ -0,0 +1,51 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + + + + + + + + + + +
    + + + + + + + + + +
     Ϊҳղرվϵ
    + + + + + + +
      + + + + + + + + + + + + + + + + +
    վҳƷؼƷƷԱ޸ 
    + + + + +
    diff --git a/11/WebRoot/order.jsp b/11/WebRoot/order.jsp new file mode 100644 index 0000000..a6bfc7c --- /dev/null +++ b/11/WebRoot/order.jsp @@ -0,0 +1,90 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String username=""; +username=(String)session.getAttribute("username"); +if(username=="" || username==null){ + out.println(""); +}else{ + ResultSet rs=conn.executeQuery("select * from tb_order where username='"+username+"'"); + int orderID=0; + int bnumber=0; + String truename=""; + String pay=""; + String carry=""; + float rebate=1; + String orderDate=""; +%> + + +MR繺 + + + + + + + + + + + + + +
    + + + + + + + + + + + + +
     
     
    + + + + + + + + + + + <% + while(rs.next()){ + orderID=rs.getInt("orderID"); + bnumber=rs.getInt("bnumber"); + truename=rs.getString("truename"); + pay=rs.getString("pay"); + carry=rs.getString("carry"); + rebate=rs.getFloat("rebate"); + orderDate=rs.getString("orderDate"); + %> + + + + + + + + + + <%}%> +
    Ʒʵʽͷʽۿ
    <%=orderID%><%=bnumber%><%=truename%><%=pay%><%=carry%><%=rebate*100%>%<%=orderDate%>
    +
    + + +
    + + + +<%conn.close(); +} +%> \ No newline at end of file diff --git a/11/WebRoot/order_detail.jsp b/11/WebRoot/order_detail.jsp new file mode 100644 index 0000000..e6c378f --- /dev/null +++ b/11/WebRoot/order_detail.jsp @@ -0,0 +1,117 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String username=""; +username=(String)session.getAttribute("username"); +if(username.equals("")){ + out.println(""); +}else{ + if (request.getParameter("ID")!=null){ + int ID=Integer.parseInt(request.getParameter("ID")); + ResultSet rs_main=conn.executeQuery("select * from tb_order where orderID="+ID); + int orderID=0; + String address=""; + String postcode=""; + String tel=""; + String bz=""; + int goodID=0; + String goodsname=""; + float nowprice=0; + int number=0; + if(rs_main.next()){ + orderID=rs_main.getInt("orderID"); + address=rs_main.getString("address"); + postcode=rs_main.getString("postcode"); + tel=rs_main.getString("tel"); + bz=rs_main.getString("bz"); + if (bz.equals("")){ + bz=""; + } + } +%> + + +MR繺 + + + + + + + + + + + + +
    + + + + + + + + + + + + + +
     
     
    + + + + + + + + + + + + + + + + +
    ţ <%=orderID%>
        ַ <%=address%>
    룺 <%=postcode%>
         <%=tel%>
        ע <%=bz%>
    + + + + + + + + <%ResultSet rs=conn.executeQuery("select * from V_order_detail where orderID="+orderID); + while(rs.next()){ + goodID=rs.getInt("goodsID"); + goodsname=rs.getString("goodsname"); + nowprice=rs.getFloat("price"); + number=rs.getInt("number"); + %> + + + + + + + <%}%> +
    ƷƷ
    <%=goodsname%><%=goodsname%><%=nowprice%>(Ԫ)<%=number%>
    + + + + +
     
    + + +
    + + + +<%conn.close(); +}} +%> diff --git a/11/WebRoot/register.jsp b/11/WebRoot/register.jsp new file mode 100644 index 0000000..5024912 --- /dev/null +++ b/11/WebRoot/register.jsp @@ -0,0 +1,115 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + + +MR繺 + + + + + + + + + + + + + +
    + + + + + + + + + + + + +
     
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + * [û]
    ʵ + *
        룺 + *
    ȷ룺 + *
    ڳУ
    ϵַ
    ֤룺 + *
    ֤ + ֤  + + ֤ + + ѧ֤
    ϵ绰
    Email + *
      + + +
    +
    + + +
    + + + \ No newline at end of file diff --git a/11/WebRoot/register_deal.jsp b/11/WebRoot/register_deal.jsp new file mode 100644 index 0000000..a9a61ab --- /dev/null +++ b/11/WebRoot/register_deal.jsp @@ -0,0 +1,32 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + + + +ûעɹ! + + + + +<% +request.setCharacterEncoding("gb2312"); +String username=member.getUsername(); +ResultSet rs=conn.executeQuery("select * from tb_Member where username='"+username+"'"); +if (rs.next()){ + out.println(""); +}else{ + int ret=0; + ret=ins_member.insert(member); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} + +%> + + diff --git a/11/WebRoot/right.jsp b/11/WebRoot/right.jsp new file mode 100644 index 0000000..14cc1db --- /dev/null +++ b/11/WebRoot/right.jsp @@ -0,0 +1,84 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + +<% +ResultSet rs_bbs=conn.executeQuery("select top 5 * from tb_bbs order by INTime desc"); +ResultSet rs_sort=conn.executeQuery("select GoodsID,GoodsName, sum(number) as sumNum from V_order_detail group by GoodsName,GoodsID order by sumNum desc"); +%> + + + + + + + + + + +
    + <% + int ID_bbs=0; + String title=""; + while(rs_bbs.next()){ + ID_bbs=rs_bbs.getInt(1); + title=rs_bbs.getString(2); +%> + + + + + +<% }%> +
     <%=title%>
    + + + + + + + + + + +
    + <% + int ID_sort=0; + String goodsname=""; + while(rs_sort.next()){ + ID_sort=rs_sort.getInt(1); + goodsname=rs_sort.getString(2); +%> + + + + + +<%}%> +
     <%=goodsname%>
    + + + + +
      
    + + + + + + + + + + +
    + + + + + + + + + +
    + \ No newline at end of file diff --git a/11/WebRoot/safe.jsp b/11/WebRoot/safe.jsp new file mode 100644 index 0000000..d80fde4 --- /dev/null +++ b/11/WebRoot/safe.jsp @@ -0,0 +1,4 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<%if (session.getAttribute("username")==null){ + out.println(""); +}%> diff --git a/11/WebRoot/sale.jsp b/11/WebRoot/sale.jsp new file mode 100644 index 0000000..ed700d6 --- /dev/null +++ b/11/WebRoot/sale.jsp @@ -0,0 +1,81 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String username=(String)session.getAttribute("username"); +ResultSet rs=conn.executeQuery("select ID,GoodsName,Introduce,price,nowprice,picture from tb_goods where sale=1 order by GoodsName"); +int goodsID=-1; +String goodsName=""; +String introduce=""; +float price=(float)0.0; +float nowprice=(float)0.0; +String picture=""; +%> + + +MR繺 + + + + + + + + + + + + +
    + + + + + + + + + + + + +
     
     
    +<% + while(rs.next()){ + goodsID=rs.getInt(1); + goodsName=rs.getString(2); + introduce=rs.getString(3); + price=rs.getFloat(4); + nowprice=rs.getFloat(5); + picture=rs.getString(6); + %> + + + + + <%}%> +
    + + + + + + + + + + + + + + + + +
    Ʒƣ<%=goodsName%>
    ԭۣ<%=price%> (Ԫ)
    ּۣ<%=nowprice%>(Ԫ)
    Ʒ˵<%=introduce%>
    +   + <%if (username!=null && username!=""){%> +   + <%}%>
    + + + +<%conn.close();%> \ No newline at end of file diff --git a/11/WebRoot/search.jsp b/11/WebRoot/search.jsp new file mode 100644 index 0000000..a650f19 --- /dev/null +++ b/11/WebRoot/search.jsp @@ -0,0 +1,42 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> + + +<% +ResultSet rs_type=conn.executeQuery("select ID,supertype from V_Type group by ID,supertype order by supertype"); +int id=-1; +String typename=""; +%> + + + + + + + +
    + + + + + + + + + + + + +
    ѯ +
    + +
    +    
    +
    diff --git a/11/WebRoot/search_deal.jsp b/11/WebRoot/search_deal.jsp new file mode 100644 index 0000000..f83c4c6 --- /dev/null +++ b/11/WebRoot/search_deal.jsp @@ -0,0 +1,103 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String username=(String)session.getAttribute("username"); +String type=request.getParameter("type"); +String key=chStr.chStr(request.getParameter("key")); +String sql=""; +String typename=""; +if(type!=null){ + if(!type.equals("0")){ + sql="where superID="+type; + if(!key.equals("") && !key.equals(null)){ + sql=sql+" and GoodsName like '%"+key+"%'"; + } + ResultSet rs_type=conn.executeQuery("select typename from tb_superType where ID="+type); + if(rs_type.next()){ + typename=rs_type.getString(1); + } + }else{ + typename="ȫ"; + if(!key.equals("") && !key.equals(null)){ + sql="where GoodsName like '%"+key+"%'"; + } + } + sql="select * from V_goods "+sql; + ResultSet rs_search=conn.executeQuery(sql); + int goodsID=-1; + String goodsName=""; + String introduce=""; + float nowprice=(float)0.0; +%> + + +MR繺 + + + + + + + + + + + + +
    + + + + + + + + + + + + +
     
     
    + + + + +
    [<%=typename%>] ѯؼ֣[<%=key%>]
    + <% + while(rs_search.next()){ + goodsID=rs_search.getInt("ID"); + goodsName=rs_search.getString("goodsName"); + introduce=rs_search.getString("introduce"); + nowprice=rs_search.getFloat("nowprice"); + if(introduce.length()>20){ + introduce=introduce.substring(0,20)+"..."; + } + %> + + + + + + + <%if (username!=null && username!=""){%> + + <%}%> + +
    <%=goodsName%> + <%=introduce%><%=nowprice%>(Ԫ)  +
    + <%}%> +
    + + +
    + + + +<%conn.close(); +}else{ + out.println(""); +}%> \ No newline at end of file diff --git a/11/WebRoot/testDatabase.jsp b/11/WebRoot/testDatabase.jsp new file mode 100644 index 0000000..58df3dd --- /dev/null +++ b/11/WebRoot/testDatabase.jsp @@ -0,0 +1,26 @@ +<%@ page contentType="text/html;charset=gb2312"%> +<%@ page import="java.sql.*"%> + + +<%Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); +String url="jdbc:sqlserver://localhost:1433;DatabaseName=db_test"; +//String url="jdbc:sqlserver://LLL-FJMTD6CSEGT\\LLL2005;1433 DatabaseName=db_test"; +//String url="jdbc:sqlserver://LLL-FJMTD6CSEGT\\LLL2005;DatabaseName=db_test"; +//pubsΪҪӵݿ +String user="sa"; +String password=""; +Connection conn= DriverManager.getConnection(url,user,password); +Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); +String sql="select top 2 * from tb_test"; +ResultSet rs=stmt.executeQuery(sql); +while(rs.next()) {%> +һֶΪ<%=rs.getString(1)%>
    +ڶֶΪ<%=rs.getString(2)%>
    +<%}%> +<%out.print("ݿɹף");%> +<%rs.close(); +stmt.close(); +conn.close(); +%> + + diff --git a/11/WebRoot/type.jsp b/11/WebRoot/type.jsp new file mode 100644 index 0000000..3e66cb3 --- /dev/null +++ b/11/WebRoot/type.jsp @@ -0,0 +1,88 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String username=(String)session.getAttribute("username"); +String type=""; +type=request.getParameter("Type"); +String sql_r=""; +if(type.equals("null") || type.equals("")){ + out.println(""); +}else{ + sql_r="select * from V_goods where subID="+type; + ResultSet rs_r=conn.executeQuery(sql_r); + int goodsID=-1; + String goodsName=""; + String introduce=""; + float nowprice=(float)0.0; + String subTypename=""; + String superTypename=""; + ResultSet rs_type=conn.executeQuery("select * from V_type where subID="+type); + if(rs_type.next()){ + superTypename=rs_type.getString(2); + subTypename=rs_type.getString(3); + } +%> + + +MR繺 + + + + + + + + + + + + + + + + +
    + + + + + + + +
     
    + + + + +
    >> ǰѡ[ <%=superTypename%> ]->[ <%=subTypename%> ]
    + <% + while(rs_r.next()){ + goodsID=rs_r.getInt("ID"); + goodsName=rs_r.getString("goodsName"); + introduce=rs_r.getString("introduce"); + nowprice=rs_r.getFloat("nowprice"); + if(introduce.length()>8){ + introduce=introduce.substring(0,8)+"..."; + } + %> + + + + + + <%if (username!=null && username!=""){%> + + <%}%> + +
    <%=goodsName%> +  <%=introduce%><%=nowprice%>(Ԫ)  + +
    + <%}}%> + +
    +
    + + + +<%conn.close();%> diff --git a/11/src/com/connDB.properties b/11/src/com/connDB.properties new file mode 100644 index 0000000..4d0bf2a --- /dev/null +++ b/11/src/com/connDB.properties @@ -0,0 +1,6 @@ +DB_CLASS_NAME=com.microsoft.sqlserver.jdbc.SQLServerDriver +DB_URL=jdbc:sqlserver://localhost:1433;DatabaseName=db_shop +#DB_USER=saû +DB_USER=sa +#DB_PWDû룩= +DB_PWD= diff --git a/11/src/com/dao/GoodsDao.java b/11/src/com/dao/GoodsDao.java new file mode 100644 index 0000000..f844545 --- /dev/null +++ b/11/src/com/dao/GoodsDao.java @@ -0,0 +1,11 @@ +package com.dao; + +import com.model.Goods; + +public interface GoodsDao { + public int insert(Goods g); + + public int update(Goods g); + + public int delete(Goods g); +} diff --git a/11/src/com/dao/GoodsDaoImpl.java b/11/src/com/dao/GoodsDaoImpl.java new file mode 100644 index 0000000..0e81b35 --- /dev/null +++ b/11/src/com/dao/GoodsDaoImpl.java @@ -0,0 +1,70 @@ +package com.dao; + +import com.model.Goods; +import com.tools.ChStr; +import com.tools.ConnDB; + +public class GoodsDaoImpl implements GoodsDao { + ConnDB conn = new ConnDB(); + ChStr chStr = new ChStr(); + + public int insert(Goods g) { + int ret = -1; + try { + String sql = "Insert into tb_goods (TypeID,GoodsName,Introduce,Price,nowPrice,picture,newgoods,sale) values(" + + g.getTypeID() + + ",'" + + chStr.chStr(g.getGoodsName()) + + "','" + + chStr.chStr(g.getIntroduce()) + + "'," + + g.getPrice() + + "," + + g.getPrice() + + ",'" + + chStr.chStr(g.getPicture()) + + "'," + + g.getNewGoods() + + "," + g.getSale() + ")"; + + ret = conn.executeUpdate(sql); + } catch (Exception e) { + ret = 0; + } + conn.close(); + return ret; + } + + public int update(Goods g) { + int ret = -1; + try { + String sql = "update tb_Goods set TypeID=" + g.getTypeID() + + ",GoodsName='" + chStr.chStr(g.getGoodsName()) + + "',introduce='" + chStr.chStr(g.getIntroduce()) + + "',price=" + g.getPrice() + ",nowprice=" + + g.getNowPrice() + ",picture='" + + chStr.chStr(g.getPicture()) + "',newgoods=" + + g.getNewGoods() + ",sale=" + g.getSale() + " where ID=" + + g.getID(); + ret = conn.executeUpdate(sql); + } catch (Exception e) { + ret = 0; + } + conn.close(); + return ret; + } + + public int delete(Goods g) { + int ret = -1; + try { + String sql = "Delete from tb_goods where ID=" + g.getID(); + ret = conn.executeUpdate(sql); + } catch (Exception e) { + ret = 0; + } + conn.close(); + return ret; + + } + +} diff --git a/11/src/com/dao/MemberDao.java b/11/src/com/dao/MemberDao.java new file mode 100644 index 0000000..0320baf --- /dev/null +++ b/11/src/com/dao/MemberDao.java @@ -0,0 +1,13 @@ +package com.dao; + +import java.util.List; + +import com.model.Member; + +public interface MemberDao { + public int insert(Member m); + public int update(Member m); + public int delete(Member m); + public List select(); + public Member select1(); +} diff --git a/11/src/com/dao/MemberDaoImpl.java b/11/src/com/dao/MemberDaoImpl.java new file mode 100644 index 0000000..ec525ff --- /dev/null +++ b/11/src/com/dao/MemberDaoImpl.java @@ -0,0 +1,91 @@ +package com.dao; + + +import com.model.Member; +import com.tools.ChStr; +import com.tools.ConnDB; + +import java.util.List; +import java.util.ArrayList; +import java.sql.*; + +public class MemberDaoImpl + implements MemberDao { + private ConnDB conn = new ConnDB(); + ChStr chStr = new ChStr(); + //ִв + public int insert(Member m) { + int ret = -1; + try { + String sql = "Insert into tb_Member (UserName,TrueName,PassWord,City,address,postcode,CardNO,CardType,Tel,Email) values('" + + chStr.chStr(m.getUsername()) + "','" + chStr.chStr(m.getTruename()) + + "','" + chStr.chStr(m.getPwd()) + + "','" + chStr.chStr(m.getCity()) + "','" + chStr.chStr(m.getAddress()) + + "','" + + chStr.chStr(m.getPostcode()) + + "','" + chStr.chStr(m.getCardno()) + "','" + + chStr.chStr(m.getCardtype()) + "','" + chStr.chStr(m.getTel()) + + "','" + chStr.chStr(m.getEmail()) + "')"; + ret = conn.executeUpdate(sql); + } + catch (Exception e) { + ret = 0; + } + conn.close(); + return ret; + } + + //ִ޸IJ + public int update(Member m) { + int ret = -1; + try { + String sql = "update tb_member set TrueName='" + + chStr.chStr(m.getTruename()) + + "',PassWord='" + chStr.chStr(m.getPwd()) + "',City='" + + chStr.chStr(m.getCity()) + "',address='" + chStr.chStr(m.getAddress()) + + "',postcode='" + chStr.chStr(m.getPostcode()) + + "',CardNO='" + chStr.chStr(m.getCardno()) + "',CardType='" + + chStr.chStr(m.getCardtype()) + "',Tel='" + chStr.chStr(m.getTel()) + + "',Email='" + chStr.chStr(m.getEmail()) + "' where ID=" + m.getID(); + ret = conn.executeUpdate(sql); + } + catch (Exception e) { + ret = 0; + } + conn.close(); + return ret; + } + + //ִɾ + public int delete(Member m) { + String sql = "delect from tb_member where ID=" + m.getID(); + int ret = conn.executeUpdate(sql); + conn.close(); + return 0; + } + + //ִвѯ + public List select() { + Member form = null; + List list = new ArrayList(); + String sql = "select * from tb_member"; + ResultSet rs = conn.executeQuery(sql); + try { + while (rs.next()) { + form = new Member(); + form.setID(Integer.valueOf(rs.getString(1))); + + list.add(form); + } + } + catch (SQLException ex) { + } + conn.close(); + return list; + } + + public Member select1() { + return null; + } + +} diff --git a/11/src/com/dao/PlacardDao.java b/11/src/com/dao/PlacardDao.java new file mode 100644 index 0000000..4d39a45 --- /dev/null +++ b/11/src/com/dao/PlacardDao.java @@ -0,0 +1,7 @@ +package com.dao; + +import com.model.Placard; + +public interface PlacardDao { + public int insert(Placard p); +} diff --git a/11/src/com/dao/PlacardDaoImpl.java b/11/src/com/dao/PlacardDaoImpl.java new file mode 100644 index 0000000..163e3c1 --- /dev/null +++ b/11/src/com/dao/PlacardDaoImpl.java @@ -0,0 +1,24 @@ +package com.dao; + + +import com.model.Placard; +import com.tools.ChStr; +import com.tools.ConnDB; + +public class PlacardDaoImpl implements PlacardDao{ + ConnDB conn=new ConnDB(); + ChStr chStr=new ChStr(); + public int insert(Placard p) { + int ret=-1; + try{ + String sql = "insert into tb_bbs (title,content) values('" + + chStr.chStr(p.getTitle()) + "','" + chStr.chStr(p.getContent()) + + "')"; + ret = conn.executeUpdate(sql); + }catch (Exception e){ + ret=0; + } + return ret; + } + +} diff --git a/11/src/com/dao/SubtypeDao.java b/11/src/com/dao/SubtypeDao.java new file mode 100644 index 0000000..50502f8 --- /dev/null +++ b/11/src/com/dao/SubtypeDao.java @@ -0,0 +1,7 @@ +package com.dao; + +import com.model.SubType; + +public interface SubtypeDao { + public int insert(SubType st); +} diff --git a/11/src/com/dao/SubtypeDaoImpl.java b/11/src/com/dao/SubtypeDaoImpl.java new file mode 100644 index 0000000..8f83ba8 --- /dev/null +++ b/11/src/com/dao/SubtypeDaoImpl.java @@ -0,0 +1,26 @@ +package com.dao; + + +import com.model.SubType; +import com.tools.ChStr; +import com.tools.ConnDB; + +public class SubtypeDaoImpl implements SubtypeDao { + public SubtypeDaoImpl() { + } +ConnDB conn=new ConnDB(); +ChStr chStr=new ChStr(); +public int insert(SubType st) { +int ret=-1; +try{ + String sql = "insert into tb_subType (superType,typename) values("+st.getsuperid()+",'" + chStr.chStr(st.gettypename()) + + "')"; + ret = conn.executeUpdate(sql); +}catch (Exception e){ + ret=0; +} +return ret; +} + +} + diff --git a/11/src/com/dao/SuperTypeDaoImpl.java b/11/src/com/dao/SuperTypeDaoImpl.java new file mode 100644 index 0000000..c7a68f0 --- /dev/null +++ b/11/src/com/dao/SuperTypeDaoImpl.java @@ -0,0 +1,23 @@ +package com.dao; + + +import com.model.SuperType; +import com.tools.ChStr; +import com.tools.ConnDB; + +public class SuperTypeDaoImpl implements SupertypeDao { + ConnDB conn=new ConnDB(); + ChStr chStr=new ChStr(); + public int insert(SuperType spt) { + int ret=-1; + try{ + String sql = "insert into tb_superType (typename) values('" + chStr.chStr(spt.gettypename()) + + "')"; + ret = conn.executeUpdate(sql); + }catch (Exception e){ + ret=0; + } + return ret; +} + +} diff --git a/11/src/com/dao/SupertypeDao.java b/11/src/com/dao/SupertypeDao.java new file mode 100644 index 0000000..10c9a50 --- /dev/null +++ b/11/src/com/dao/SupertypeDao.java @@ -0,0 +1,7 @@ +package com.dao; + +import com.model.SuperType; + +public interface SupertypeDao { + public int insert(SuperType spt); +} diff --git a/11/src/com/model/Goods.java b/11/src/com/model/Goods.java new file mode 100644 index 0000000..44b3660 --- /dev/null +++ b/11/src/com/model/Goods.java @@ -0,0 +1,74 @@ +package com.model; + +public class Goods { + private Integer ID=Integer.getInteger("-1"); + private int typeID=-1; + private String goodsName=""; + private String introduce=""; + private float price=0f; + private float nowPrice=0f; + private String picture=""; + private int newGoods=-1; + private int sale=-1; + + public void goods(){ + } + + public Integer getID(){ + return ID; +} +public void setID(Integer ID){ + this.ID=ID; +} + + public int getTypeID() { + return typeID; + } +public void setTypeID(int typeID) { + this.typeID = typeID; +} + +public String getGoodsName(){ + return goodsName; +} +public void setGoodsName(String goodsName){ + this.goodsName=goodsName; +} + +public String getIntroduce(){ + return introduce; +} +public void setIntroduce(String introduce){ + this.introduce=introduce; +} +public float getPrice(){ + return price; +} +public void setPrice(float price){ + this.price=price; +} +public float getNowPrice(){ + return nowPrice; +} +public void setNowPrice(float nowPrice){ + this.nowPrice=nowPrice; +} +public String getPicture(){ + return picture; +} +public void setPicture(String picture){ + this.picture=picture; +} +public int getNewGoods() { + return newGoods; +} +public void setNewGoods(int newGoods) { +this.newGoods = newGoods; +} +public int getSale() { + return sale; +} +public void setSale(int sale) { +this.sale = sale; +} +} diff --git a/11/src/com/model/Goodselement.java b/11/src/com/model/Goodselement.java new file mode 100644 index 0000000..0e540b0 --- /dev/null +++ b/11/src/com/model/Goodselement.java @@ -0,0 +1,7 @@ +package com.model; + +public class Goodselement { + public int ID; //ƷID + public float nowprice; //ּ + public int number; // + } diff --git a/11/src/com/model/Member.java b/11/src/com/model/Member.java new file mode 100644 index 0000000..692919a --- /dev/null +++ b/11/src/com/model/Member.java @@ -0,0 +1,85 @@ +package com.model; + +public class Member { + private Integer ID=Integer.valueOf("-1"); + private String username=""; + private String truename=""; + private String pwd=""; + private String city=""; + private String address=""; + private String postcode=""; + private String cardno=""; + private String cardtype=""; + private String tel=""; + private String email=""; + public void member(){ // + } + + public Integer getID(){ + return ID; +} +public void setID(Integer ID){ + this.ID=ID; +} + + public String getUsername(){ + return username; + } + public void setUsername(String username){ + this.username=username; + } + public String getTruename(){ + return truename; + } + public void setTruename(String truename){ + this.truename =truename; + } + public String getPwd(){ + return pwd; + } + public void setPwd(String pwd){ + this.pwd =pwd; + } + public String getCity(){ + return city; + } + public void setCity(String city){ + this.city=city; + } + public String getAddress(){ + return address; + } + public void setAddress(String address){ + this.address=address; + } + public String getPostcode(){ + return postcode; + } + public void setPostcode(String postcode){ + this.postcode=postcode; + } + public String getCardno(){ + return cardno; + } + public void setCardno(String cardno){ + this.cardno=cardno; + } + public String getCardtype(){ + return cardtype; + } + public void setCardtype(String cardtype){ + this.cardtype=cardtype; + } + public String getTel(){ + return tel; + } + public void setTel(String tel){ + this.tel=tel; + } + public String getEmail(){ + return email; + } + public void setEmail(String email){ + this.email =email; + } +} diff --git a/11/src/com/model/Placard.java b/11/src/com/model/Placard.java new file mode 100644 index 0000000..f4cea86 --- /dev/null +++ b/11/src/com/model/Placard.java @@ -0,0 +1,20 @@ +package com.model; + +public class Placard { + private String title=""; + private String content=""; + public void placard(){ + } + public String getTitle(){ + return title; + } + public void setTitle(String title){ + this.title=title; + } + public String getContent(){ + return content; + } + public void setContent(String content){ + this.content=content; + } +} diff --git a/11/src/com/model/SubType.java b/11/src/com/model/SubType.java new file mode 100644 index 0000000..7358054 --- /dev/null +++ b/11/src/com/model/SubType.java @@ -0,0 +1,20 @@ +package com.model; + +public class SubType { + private int superid=0; + private String typename=""; + public void SubType() { + } + public int getsuperid(){ + return superid; + } + public void setsuperid(int superid){ + this.superid=superid; + } + public String gettypename(){ + return typename; + } + public void settypename(String typename){ + this.typename=typename; + } +} diff --git a/11/src/com/model/SuperType.java b/11/src/com/model/SuperType.java new file mode 100644 index 0000000..0f68152 --- /dev/null +++ b/11/src/com/model/SuperType.java @@ -0,0 +1,13 @@ +package com.model; + +public class SuperType { + private String typename=""; + public void SuperType() { + } + public String gettypename(){ + return typename; + } + public void settypename(String typename){ + this.typename=typename; + } +} diff --git a/11/src/com/tools/ChStr.java b/11/src/com/tools/ChStr.java new file mode 100644 index 0000000..f4e15bc --- /dev/null +++ b/11/src/com/tools/ChStr.java @@ -0,0 +1,43 @@ +package com.tools; +public class ChStr { + /*************************************************** + *method name: chStr() + *method function: + *return value: String + ****************************************************/ + public String chStr(String str){ + if(str==null){ //strΪnullʱ + str=""; //strֵΪ + }else{ + try{ + str=(new String(str.getBytes("iso-8859-1"),"GBK")).trim();//ַתΪGBK + }catch(Exception e){ + e.printStackTrace(System.err); //쳣Ϣ + } + } + return str; //תstr + } + + /*************************************************** + *method name:convertStr() + *method function:ʾıеĻسСո񼰱֤HTMLǵ + *return value: String + * author:wgh + ****************************************************/ + public String convertStr(String str1){ + if(str1==null){ + str1=""; + }else{ + try{ + //replaceAll(String str1,String str2)ΪJDK1.4.x·ʹstr2滻ַеstr2ַ + str1=str1.replaceAll("<","<");//滻ַе"<"">"ַ֤HTMLǵ + str1=str1.replaceAll(">",">"); + str1=str1.replaceAll(" "," "); + str1=str1.replaceAll("\r\n","
    "); + }catch(Exception e){ + e.printStackTrace(System.err); + } + } + return str1; + } +} diff --git a/11/src/com/tools/ConnDB.java b/11/src/com/tools/ConnDB.java new file mode 100644 index 0000000..bb6742f --- /dev/null +++ b/11/src/com/tools/ConnDB.java @@ -0,0 +1,125 @@ +package com.tools; + +import java.sql.*; +import java.io.*; +import java.util.*; + +public class ConnDB { + public Connection conn = null; + public Statement stmt = null; + public ResultSet rs = null; + private static String propFileName = "/com/connDB.properties"; // ָԴļλ + private static Properties prop = new Properties(); + private static String dbClassName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; + private static String dbUrl = "jdbc:sqlserver://localhost:1433;DatabaseName=db_shop"; + private static String dbUser = "sa"; + private static String dbPwd = ""; + + public ConnDB() { + try { + InputStream in = getClass().getResourceAsStream(propFileName); + prop.load(in); // ͨPropertiesļ + dbClassName = prop.getProperty("DB_CLASS_NAME"); // ȡݿ + dbUrl = prop.getProperty("DB_URL", dbUrl); + dbUser = prop.getProperty("DB_USER", dbUser); + dbPwd = prop.getProperty("DB_PWD", dbPwd); + } catch (Exception e) { + e.printStackTrace(); // 쳣Ϣ + } + } + + public static Connection getConnection() { + Connection conn = null; + try { + Class.forName(dbClassName).newInstance(); + conn = DriverManager.getConnection(dbUrl, dbUser, dbPwd); + } catch (Exception ee) { + ee.printStackTrace(); + } + if (conn == null) { + System.err + .println(": DbConnectionManager.getConnection() ݿʧ.\r\n\r\n:" + + dbClassName + + "\r\nλ:" + + dbUrl + + "\r\nû/" + + dbUser + "/" + dbPwd); + } + return conn; + } + + /* + * ܣִвѯ + */ + public ResultSet executeQuery(String sql) { + try { // ׽쳣 + conn = getConnection(); // getConnection()Connectionһʵconn + stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = stmt.executeQuery(sql); + } catch (SQLException ex) { + System.err.println(ex.getMessage()); // 쳣Ϣ + } + return rs; // ؽ + } + + /* + * :ִи² + */ + public int executeUpdate(String sql) { + int result = 0; // 屣淵ֵı + try { // ׽쳣 + conn = getConnection(); // getConnection()Connectionһʵconn + stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + result = stmt.executeUpdate(sql); // ִи² + } catch (SQLException ex) { + result = 0; // 淵ֵıֵΪ0 + } + try { + stmt.close(); + } catch (SQLException ex1) { + } + return result; // ر淵ֵı + } + + public int executeUpdate_id(String sql) { + int result = 0; // 屣淵ֵı + try { // ׽쳣 + conn = getConnection(); // getConnection()Connectionһʵconn + stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + result = stmt.executeUpdate(sql); // ִи² + // ȡող¼Զ + String ID = "select @@IDENTITY as id"; + rs = stmt.executeQuery(ID); + if (rs.next()) { + int autoID = rs.getInt("id"); + result = autoID; + } + } catch (SQLException ex) { + result = 0; + } + return result; // ظողԶ + } + + /* + * :رݿ + */ + public void close() { + try { // ׽쳣 + if (rs != null) { // ResultSetʵrsΪʱ + rs.close(); // رResultSet + } + if (stmt != null) { // StatementʵstmtΪʱ + stmt.close(); // رStatement + } + if (conn != null) { // ConnectionʵconnΪʱ + conn.close(); // رConnection + } + } catch (Exception e) { + e.printStackTrace(System.err); // 쳣Ϣ + } + } + +} diff --git "a/11/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216\344\271\246.doc" "b/11/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216\344\271\246.doc" new file mode 100644 index 0000000..a6d0401 Binary files /dev/null and "b/11/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216\344\271\246.doc" differ diff --git a/12/.classpath b/12/.classpath new file mode 100644 index 0000000..d31f738 --- /dev/null +++ b/12/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/12/.mymetadata b/12/.mymetadata new file mode 100644 index 0000000..02336d8 --- /dev/null +++ b/12/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/12/.project b/12/.project new file mode 100644 index 0000000..f8639a8 --- /dev/null +++ b/12/.project @@ -0,0 +1,50 @@ + + + 12 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/12/.refactorings/2011/2/8/refactorings.history b/12/.refactorings/2011/2/8/refactorings.history new file mode 100644 index 0000000..253e8e3 --- /dev/null +++ b/12/.refactorings/2011/2/8/refactorings.history @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/12/.refactorings/2011/2/8/refactorings.index b/12/.refactorings/2011/2/8/refactorings.index new file mode 100644 index 0000000..83de05c --- /dev/null +++ b/12/.refactorings/2011/2/8/refactorings.index @@ -0,0 +1,2 @@ +1298084031017 Delete element +1298092680680 Delete element diff --git a/12/.refactorings/2011/2/9/refactorings.history b/12/.refactorings/2011/2/9/refactorings.history new file mode 100644 index 0000000..1529973 --- /dev/null +++ b/12/.refactorings/2011/2/9/refactorings.history @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/12/.refactorings/2011/2/9/refactorings.index b/12/.refactorings/2011/2/9/refactorings.index new file mode 100644 index 0000000..e87465d --- /dev/null +++ b/12/.refactorings/2011/2/9/refactorings.index @@ -0,0 +1,5 @@ +1298518311882 Delete element +1298518320661 Delete elements +1298518350181 Delete elements +1298523307318 Delete element +1298523986959 Delete element diff --git a/12/.refactorings/2011/3/12/refactorings.history b/12/.refactorings/2011/3/12/refactorings.history new file mode 100644 index 0000000..e351e6e --- /dev/null +++ b/12/.refactorings/2011/3/12/refactorings.history @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/12/.refactorings/2011/3/12/refactorings.index b/12/.refactorings/2011/3/12/refactorings.index new file mode 100644 index 0000000..77d15c1 --- /dev/null +++ b/12/.refactorings/2011/3/12/refactorings.index @@ -0,0 +1 @@ +1300263580927 Delete element diff --git a/12/.settings/.jsdtscope b/12/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/12/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/12/.settings/org.eclipse.jdt.core.prefs b/12/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..49f0948 --- /dev/null +++ b/12/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Sat Feb 19 08:39:56 CST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/12/.settings/org.eclipse.ltk.core.refactoring.prefs b/12/.settings/org.eclipse.ltk.core.refactoring.prefs new file mode 100644 index 0000000..9aad8d1 --- /dev/null +++ b/12/.settings/org.eclipse.ltk.core.refactoring.prefs @@ -0,0 +1,3 @@ +#Thu Feb 24 11:53:38 CST 2011 +eclipse.preferences.version=1 +org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=true diff --git a/12/.settings/org.eclipse.wst.jsdt.ui.superType.container b/12/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/12/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/12/.settings/org.eclipse.wst.jsdt.ui.superType.name b/12/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/12/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/12/WebRoot/CSS/style.css b/12/WebRoot/CSS/style.css new file mode 100644 index 0000000..2592c54 --- /dev/null +++ b/12/WebRoot/CSS/style.css @@ -0,0 +1,127 @@ + + \ No newline at end of file diff --git a/12/WebRoot/Database/db_librarysys.sql b/12/WebRoot/Database/db_librarysys.sql new file mode 100644 index 0000000..dad121d --- /dev/null +++ b/12/WebRoot/Database/db_librarysys.sql @@ -0,0 +1,346 @@ +-- MySQL Administrator dump 1.4 +-- +-- ------------------------------------------------------ +-- Server version 5.1.40-community + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + + +-- +-- Create schema db_librarysys +-- + +CREATE DATABASE IF NOT EXISTS db_librarysys; +USE db_librarysys; + +-- +-- Definition of table `tb_bookcase` +-- + +DROP TABLE IF EXISTS `tb_bookcase`; +CREATE TABLE `tb_bookcase` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(30) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_bookcase` +-- + +/*!40000 ALTER TABLE `tb_bookcase` DISABLE KEYS */; +INSERT INTO `tb_bookcase` (`id`,`name`) VALUES + (4,'左A-1'), + (5,'左A-2'), + (6,'右A-1'); +/*!40000 ALTER TABLE `tb_bookcase` ENABLE KEYS */; + + +-- +-- Definition of table `tb_bookinfo` +-- + +DROP TABLE IF EXISTS `tb_bookinfo`; +CREATE TABLE `tb_bookinfo` ( + `barcode` varchar(30) DEFAULT NULL, + `bookname` varchar(70) DEFAULT NULL, + `typeid` int(10) unsigned DEFAULT NULL, + `author` varchar(30) DEFAULT NULL, + `translator` varchar(30) DEFAULT NULL, + `ISBN` varchar(20) DEFAULT NULL, + `price` float(8,2) DEFAULT NULL, + `page` int(10) unsigned DEFAULT NULL, + `bookcase` int(10) unsigned DEFAULT NULL, + `inTime` date DEFAULT NULL, + `operator` varchar(30) DEFAULT NULL, + `del` tinyint(1) DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_bookinfo` +-- + +/*!40000 ALTER TABLE `tb_bookinfo` DISABLE KEYS */; +INSERT INTO `tb_bookinfo` (`barcode`,`bookname`,`typeid`,`author`,`translator`,`ISBN`,`price`,`page`,`bookcase`,`inTime`,`operator`,`del`,`id`) VALUES + ('9787302210337','Java Web开发实战宝典',4,'王国辉','','302',89.00,834,4,'2011-02-24','mr',0,7), + ('9787115195975','Java Web开发典型模块大全',4,'王国辉、王毅、王殊宇','','115',89.00,752,5,'2011-02-24','mr',0,8), + ('4521212','njknjn',5,'mnm','','115',11.00,0,4,'2011-02-24','mr',1,9), + ('gf','gfhgf',4,'','','111',26.00,0,4,'2011-02-24','mr',1,10); +/*!40000 ALTER TABLE `tb_bookinfo` ENABLE KEYS */; + + +-- +-- Definition of table `tb_booktype` +-- + +DROP TABLE IF EXISTS `tb_booktype`; +CREATE TABLE `tb_booktype` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `typename` varchar(30) DEFAULT NULL, + `days` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_booktype` +-- + +/*!40000 ALTER TABLE `tb_booktype` DISABLE KEYS */; +INSERT INTO `tb_booktype` (`id`,`typename`,`days`) VALUES + (4,'网络编程',20), + (5,'数据库开发',15); +/*!40000 ALTER TABLE `tb_booktype` ENABLE KEYS */; + + +-- +-- Definition of table `tb_borrow` +-- + +DROP TABLE IF EXISTS `tb_borrow`; +CREATE TABLE `tb_borrow` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `readerid` int(10) unsigned DEFAULT NULL, + `bookid` int(10) DEFAULT NULL, + `borrowTime` date DEFAULT NULL, + `backTime` date DEFAULT NULL, + `operator` varchar(30) DEFAULT NULL, + `ifback` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_borrow` +-- + +/*!40000 ALTER TABLE `tb_borrow` DISABLE KEYS */; +INSERT INTO `tb_borrow` (`id`,`readerid`,`bookid`,`borrowTime`,`backTime`,`operator`,`ifback`) VALUES + (7,4,7,'2011-02-24','2011-03-16','mr',1), + (8,4,7,'2011-02-24','2011-03-16','mr',0), + (9,5,8,'2011-02-24','2011-04-05','mr',0); +/*!40000 ALTER TABLE `tb_borrow` ENABLE KEYS */; + + +-- +-- Definition of table `tb_giveback` +-- + +DROP TABLE IF EXISTS `tb_giveback`; +CREATE TABLE `tb_giveback` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `readerid` int(11) DEFAULT NULL, + `bookid` int(11) DEFAULT NULL, + `backTime` date DEFAULT NULL, + `operator` varchar(30) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_giveback` +-- + +/*!40000 ALTER TABLE `tb_giveback` DISABLE KEYS */; +INSERT INTO `tb_giveback` (`id`,`readerid`,`bookid`,`backTime`,`operator`) VALUES + (3,4,7,'2011-02-24','mr'); +/*!40000 ALTER TABLE `tb_giveback` ENABLE KEYS */; + + +-- +-- Definition of table `tb_library` +-- + +DROP TABLE IF EXISTS `tb_library`; +CREATE TABLE `tb_library` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `libraryname` varchar(50) DEFAULT NULL, + `curator` varchar(10) DEFAULT NULL, + `tel` varchar(20) DEFAULT NULL, + `address` varchar(100) DEFAULT NULL, + `email` varchar(100) DEFAULT NULL, + `url` varchar(100) DEFAULT NULL, + `createDate` date DEFAULT NULL, + `introduce` text, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_library` +-- + +/*!40000 ALTER TABLE `tb_library` DISABLE KEYS */; +INSERT INTO `tb_library` (`id`,`libraryname`,`curator`,`tel`,`address`,`email`,`url`,`createDate`,`introduce`) VALUES + (1,'博研图书馆','mr','0431-84978981','长春市东盛大街89','mingrisoft@mingsoft.com','http://www','1999-12-12','本市拥有计算机类图书最多的图书馆。'); +/*!40000 ALTER TABLE `tb_library` ENABLE KEYS */; + + +-- +-- Definition of table `tb_manager` +-- + +DROP TABLE IF EXISTS `tb_manager`; +CREATE TABLE `tb_manager` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(30) DEFAULT NULL, + `PWD` varchar(30) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_manager` +-- + +/*!40000 ALTER TABLE `tb_manager` DISABLE KEYS */; +INSERT INTO `tb_manager` (`id`,`name`,`PWD`) VALUES + (1,'mr','mrsoft'), + (7,'wgh','111'), + (9,'admin','111'); +/*!40000 ALTER TABLE `tb_manager` ENABLE KEYS */; + + +-- +-- Definition of table `tb_parameter` +-- + +DROP TABLE IF EXISTS `tb_parameter`; +CREATE TABLE `tb_parameter` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `cost` int(10) unsigned DEFAULT NULL, + `validity` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_parameter` +-- + +/*!40000 ALTER TABLE `tb_parameter` DISABLE KEYS */; +INSERT INTO `tb_parameter` (`id`,`cost`,`validity`) VALUES + (1,30,6); +/*!40000 ALTER TABLE `tb_parameter` ENABLE KEYS */; + + +-- +-- Definition of table `tb_publishing` +-- + +DROP TABLE IF EXISTS `tb_publishing`; +CREATE TABLE `tb_publishing` ( + `ISBN` varchar(20) NOT NULL COMMENT 'ISBN号', + `pubname` varchar(30) DEFAULT NULL COMMENT '出版社名称', + PRIMARY KEY (`ISBN`) +) ENGINE=MyISAM DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_publishing` +-- + +/*!40000 ALTER TABLE `tb_publishing` DISABLE KEYS */; +INSERT INTO `tb_publishing` (`ISBN`,`pubname`) VALUES + ('111','机械工业出版社'), + ('115','人民邮电出版社'), + ('302','清华大学出版社'); +/*!40000 ALTER TABLE `tb_publishing` ENABLE KEYS */; + + +-- +-- Definition of table `tb_purview` +-- + +DROP TABLE IF EXISTS `tb_purview`; +CREATE TABLE `tb_purview` ( + `id` int(11) NOT NULL, + `sysset` tinyint(1) DEFAULT '0', + `readerset` tinyint(1) DEFAULT '0', + `bookset` tinyint(1) DEFAULT '0', + `borrowback` tinyint(1) DEFAULT '0', + `sysquery` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_purview` +-- + +/*!40000 ALTER TABLE `tb_purview` DISABLE KEYS */; +INSERT INTO `tb_purview` (`id`,`sysset`,`readerset`,`bookset`,`borrowback`,`sysquery`) VALUES + (1,1,1,1,1,1), + (7,0,1,1,1,1), + (9,1,1,1,0,0); +/*!40000 ALTER TABLE `tb_purview` ENABLE KEYS */; + + +-- +-- Definition of table `tb_reader` +-- + +DROP TABLE IF EXISTS `tb_reader`; +CREATE TABLE `tb_reader` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(20) DEFAULT NULL, + `sex` varchar(4) DEFAULT NULL, + `barcode` varchar(30) DEFAULT NULL, + `vocation` varchar(50) DEFAULT NULL, + `birthday` date DEFAULT NULL, + `paperType` varchar(10) DEFAULT NULL, + `paperNO` varchar(20) DEFAULT NULL, + `tel` varchar(20) DEFAULT NULL, + `email` varchar(100) DEFAULT NULL, + `createDate` date DEFAULT NULL, + `operator` varchar(30) DEFAULT NULL, + `remark` text, + `typeid` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_reader` +-- + +/*!40000 ALTER TABLE `tb_reader` DISABLE KEYS */; +INSERT INTO `tb_reader` (`id`,`name`,`sex`,`barcode`,`vocation`,`birthday`,`paperType`,`paperNO`,`tel`,`email`,`createDate`,`operator`,`remark`,`typeid`) VALUES + (4,'琦琦','女','20110224000001','学生','2010-07-10','身份证','220104201007100001','84978981','wgh717@sohu.com','2011-02-24','mr','无',4), + (5,'wgh','女','20110224000002','程序员','1980-07-10','工作证','20010228','84978981','wgh717@sohu.com','2011-02-24','mr','无',4), + (6,'uui','男','iuoui','',NULL,'身份证','iuoi','','nmb','2011-02-24','mr','',4); +/*!40000 ALTER TABLE `tb_reader` ENABLE KEYS */; + + +-- +-- Definition of table `tb_readertype` +-- + +DROP TABLE IF EXISTS `tb_readertype`; +CREATE TABLE `tb_readertype` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + `number` int(4) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=gbk; + +-- +-- Dumping data for table `tb_readertype` +-- + +/*!40000 ALTER TABLE `tb_readertype` DISABLE KEYS */; +INSERT INTO `tb_readertype` (`id`,`name`,`number`) VALUES + (4,'学生',1); +/*!40000 ALTER TABLE `tb_readertype` ENABLE KEYS */; + + + + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/12/WebRoot/Images/Thumbs.db b/12/WebRoot/Images/Thumbs.db new file mode 100644 index 0000000..069992c Binary files /dev/null and b/12/WebRoot/Images/Thumbs.db differ diff --git a/12/WebRoot/Images/borrowBackRenew.gif b/12/WebRoot/Images/borrowBackRenew.gif new file mode 100644 index 0000000..232e222 Binary files /dev/null and b/12/WebRoot/Images/borrowBackRenew.gif differ diff --git a/12/WebRoot/Images/borrowBackRenew_back.gif b/12/WebRoot/Images/borrowBackRenew_back.gif new file mode 100644 index 0000000..bd7321e Binary files /dev/null and b/12/WebRoot/Images/borrowBackRenew_back.gif differ diff --git a/12/WebRoot/Images/borrowBackRenew_r.gif b/12/WebRoot/Images/borrowBackRenew_r.gif new file mode 100644 index 0000000..a0997e5 Binary files /dev/null and b/12/WebRoot/Images/borrowBackRenew_r.gif differ diff --git a/12/WebRoot/Images/borrow_if.gif b/12/WebRoot/Images/borrow_if.gif new file mode 100644 index 0000000..813bb4b Binary files /dev/null and b/12/WebRoot/Images/borrow_if.gif differ diff --git a/12/WebRoot/Images/copyright_t.gif b/12/WebRoot/Images/copyright_t.gif new file mode 100644 index 0000000..810c5c3 Binary files /dev/null and b/12/WebRoot/Images/copyright_t.gif differ diff --git a/12/WebRoot/Images/error.jpg b/12/WebRoot/Images/error.jpg new file mode 100644 index 0000000..5eb55f0 Binary files /dev/null and b/12/WebRoot/Images/error.jpg differ diff --git a/12/WebRoot/Images/error_b.gif b/12/WebRoot/Images/error_b.gif new file mode 100644 index 0000000..fc1ab62 Binary files /dev/null and b/12/WebRoot/Images/error_b.gif differ diff --git a/12/WebRoot/Images/item_out.gif b/12/WebRoot/Images/item_out.gif new file mode 100644 index 0000000..4b6eb17 Binary files /dev/null and b/12/WebRoot/Images/item_out.gif differ diff --git a/12/WebRoot/Images/item_over.gif b/12/WebRoot/Images/item_over.gif new file mode 100644 index 0000000..5ee0246 Binary files /dev/null and b/12/WebRoot/Images/item_over.gif differ diff --git a/12/WebRoot/Images/login.jpg b/12/WebRoot/Images/login.jpg new file mode 100644 index 0000000..c965ae2 Binary files /dev/null and b/12/WebRoot/Images/login.jpg differ diff --git a/12/WebRoot/Images/main_booksort.gif b/12/WebRoot/Images/main_booksort.gif new file mode 100644 index 0000000..ec439fe Binary files /dev/null and b/12/WebRoot/Images/main_booksort.gif differ diff --git a/12/WebRoot/Images/main_booksort_1.gif b/12/WebRoot/Images/main_booksort_1.gif new file mode 100644 index 0000000..b5889d1 Binary files /dev/null and b/12/WebRoot/Images/main_booksort_1.gif differ diff --git a/12/WebRoot/Images/main_booksort_2.gif b/12/WebRoot/Images/main_booksort_2.gif new file mode 100644 index 0000000..6584cea Binary files /dev/null and b/12/WebRoot/Images/main_booksort_2.gif differ diff --git a/12/WebRoot/Images/main_readersort_1.gif b/12/WebRoot/Images/main_readersort_1.gif new file mode 100644 index 0000000..5a054bf Binary files /dev/null and b/12/WebRoot/Images/main_readersort_1.gif differ diff --git a/12/WebRoot/Images/more.GIF b/12/WebRoot/Images/more.GIF new file mode 100644 index 0000000..9889447 Binary files /dev/null and b/12/WebRoot/Images/more.GIF differ diff --git a/12/WebRoot/Images/navigation_bg.gif b/12/WebRoot/Images/navigation_bg.gif new file mode 100644 index 0000000..8902573 Binary files /dev/null and b/12/WebRoot/Images/navigation_bg.gif differ diff --git a/12/WebRoot/Images/navigation_bg_bottom.gif b/12/WebRoot/Images/navigation_bg_bottom.gif new file mode 100644 index 0000000..250a8e3 Binary files /dev/null and b/12/WebRoot/Images/navigation_bg_bottom.gif differ diff --git a/12/WebRoot/Images/reader_checkbg.jpg b/12/WebRoot/Images/reader_checkbg.jpg new file mode 100644 index 0000000..7672606 Binary files /dev/null and b/12/WebRoot/Images/reader_checkbg.jpg differ diff --git a/12/WebRoot/Images/search.gif b/12/WebRoot/Images/search.gif new file mode 100644 index 0000000..525bd49 Binary files /dev/null and b/12/WebRoot/Images/search.gif differ diff --git a/12/WebRoot/Images/subBG.jpg b/12/WebRoot/Images/subBG.jpg new file mode 100644 index 0000000..2bd7b3a Binary files /dev/null and b/12/WebRoot/Images/subBG.jpg differ diff --git a/12/WebRoot/Images/top_bg.gif b/12/WebRoot/Images/top_bg.gif new file mode 100644 index 0000000..1b5bf15 Binary files /dev/null and b/12/WebRoot/Images/top_bg.gif differ diff --git a/12/WebRoot/JS/function.js b/12/WebRoot/JS/function.js new file mode 100644 index 0000000..461bec5 --- /dev/null +++ b/12/WebRoot/JS/function.js @@ -0,0 +1,62 @@ +//жǷȷ +function CheckDate(INDate){ + if (INDate==""){ + return true; + } + subYY=INDate.substr(0,4) + if(isNaN(subYY) || subYY<=0){ + return true; + } + //ת· + if(INDate.indexOf('-',0)!=-1){ + separate="-"; + }else{ + if(INDate.indexOf('/',0)!=-1){ + separate="/"; + }else { + return true; + } + } + area=INDate.indexOf(separate,0) + subMM=INDate.substr(area+1,INDate.indexOf(separate,area+1)-(area+1)) + if(isNaN(subMM) || subMM<=0){ + return true; + } + if(subMM.length<2){subMM="0"+subMM} + //ת + area=INDate.lastIndexOf(separate) + subDD=INDate.substr(area+1,INDate.length-area-1) + if(isNaN(subDD) || subDD<=0){ + return true; + } + if(eval(subDD)<10){subDD="0"+eval(subDD)} + NewDate=subYY+"-"+subMM+"-"+subDD + if(NewDate.length!=10){return true;} + if(NewDate.substr(4,1)!="-"){return true;} + if(NewDate.substr(7,1)!="-"){return true;} + var MM=NewDate.substr(5,2); + var DD=NewDate.substr(8,2); + if((subYY%4==0 && subYY%100!=0)||subYY%400==0){ //жǷΪ + if(parseInt(MM)==2){ + if(DD>29){return true;} + } + }else{ + if(parseInt(MM)==2){ + if(DD>28){return true;} + } + } + var mm=new Array(1,3,5,7,8,10,12); //жÿе + for(i=0;i< mm.length;i++){ + if (parseInt(MM) == mm[i]){ + if(parseInt(DD)>31){ + return true; + }else{ + return false; + } + } + } + if(parseInt(DD)>30){return true;} + if(parseInt(MM)>12){return true;} + return false; +} + diff --git a/12/WebRoot/JS/menu.JS b/12/WebRoot/JS/menu.JS new file mode 100644 index 0000000..8107ded --- /dev/null +++ b/12/WebRoot/JS/menu.JS @@ -0,0 +1,194 @@ +var menuOffX=0 //˵˾ +var menuOffY=18 //˵ֶ˾ +var fo_shadows=new Array() +var linkset=new Array() +var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1 +var ns6=document.getElementById&&!document.all +var ns4=document.layers +function openScript(url, width, height){ + var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=no' ); +} +function showmenu(e,vmenu,mod){ + if (!document.all&&!document.getElementById&&!document.layers) + return + which=vmenu + clearhidemenu() + ie_clearshadow() + menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : "" + menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj + + if (ie4||ns6) + menuobj.innerHTML=which + else{ + menuobj.document.write(''+which+'') + menuobj.document.close() + } + menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width + menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height + + eventX=ie4? event.clientX : ns6? e.clientX : e.x + eventY=ie4? event.clientY : ns6? e.clientY : e.y + + var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX + var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY + if (rightedge0; i--) + { + var rect = document.createElement('div'); + var rs = rect.style + rs.position = 'absolute'; + rs.left = (el.style.posLeft + i) + 'px'; + rs.top = (el.style.posTop + i) + 'px'; + rs.width = el.offsetWidth + 'px'; + rs.height = el.offsetHeight + 'px'; + rs.zIndex = el.style.zIndex - i; + rs.backgroundColor = color; + var opacity = 1 - i / (i + 1); + rs.filter = 'alpha(opacity=' + (100 * opacity) + ')'; + fo_shadows[fo_shadows.length] = rect; + } +} +function ie_clearshadow() +{ + for(var i=0;i" + } + var timer=setTimeout("clockon(bgclock)",200); +} diff --git a/12/WebRoot/META-INF/MANIFEST.MF b/12/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/12/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/12/WebRoot/WEB-INF/classes/com/CharacterEncodingFilter.class b/12/WebRoot/WEB-INF/classes/com/CharacterEncodingFilter.class new file mode 100644 index 0000000..7098f1e Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/CharacterEncodingFilter.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/action/Book.class b/12/WebRoot/WEB-INF/classes/com/action/Book.class new file mode 100644 index 0000000..ffa1c77 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/action/Book.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/action/BookCase.class b/12/WebRoot/WEB-INF/classes/com/action/BookCase.class new file mode 100644 index 0000000..3270801 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/action/BookCase.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/action/BookType.class b/12/WebRoot/WEB-INF/classes/com/action/BookType.class new file mode 100644 index 0000000..d762fc2 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/action/BookType.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/action/Borrow.class b/12/WebRoot/WEB-INF/classes/com/action/Borrow.class new file mode 100644 index 0000000..3064c4c Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/action/Borrow.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/action/Library.class b/12/WebRoot/WEB-INF/classes/com/action/Library.class new file mode 100644 index 0000000..0c10f94 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/action/Library.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/action/Manager.class b/12/WebRoot/WEB-INF/classes/com/action/Manager.class new file mode 100644 index 0000000..9e3e5eb Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/action/Manager.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/action/Parameter.class b/12/WebRoot/WEB-INF/classes/com/action/Parameter.class new file mode 100644 index 0000000..19686c8 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/action/Parameter.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/action/Reader.class b/12/WebRoot/WEB-INF/classes/com/action/Reader.class new file mode 100644 index 0000000..7ee0a82 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/action/Reader.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/action/ReaderType.class b/12/WebRoot/WEB-INF/classes/com/action/ReaderType.class new file mode 100644 index 0000000..bf70c97 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/action/ReaderType.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/actionForm/BookCaseForm.class b/12/WebRoot/WEB-INF/classes/com/actionForm/BookCaseForm.class new file mode 100644 index 0000000..5b21621 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/actionForm/BookCaseForm.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/actionForm/BookForm.class b/12/WebRoot/WEB-INF/classes/com/actionForm/BookForm.class new file mode 100644 index 0000000..a1cf16d Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/actionForm/BookForm.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/actionForm/BookTypeForm.class b/12/WebRoot/WEB-INF/classes/com/actionForm/BookTypeForm.class new file mode 100644 index 0000000..bfc6b91 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/actionForm/BookTypeForm.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/actionForm/BorrowForm.class b/12/WebRoot/WEB-INF/classes/com/actionForm/BorrowForm.class new file mode 100644 index 0000000..17f206a Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/actionForm/BorrowForm.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/actionForm/LibraryForm.class b/12/WebRoot/WEB-INF/classes/com/actionForm/LibraryForm.class new file mode 100644 index 0000000..d644275 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/actionForm/LibraryForm.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/actionForm/ManagerForm.class b/12/WebRoot/WEB-INF/classes/com/actionForm/ManagerForm.class new file mode 100644 index 0000000..7c012bd Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/actionForm/ManagerForm.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/actionForm/ParameterForm.class b/12/WebRoot/WEB-INF/classes/com/actionForm/ParameterForm.class new file mode 100644 index 0000000..0a5a7a0 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/actionForm/ParameterForm.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/actionForm/PublishingForm.class b/12/WebRoot/WEB-INF/classes/com/actionForm/PublishingForm.class new file mode 100644 index 0000000..73e48f2 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/actionForm/PublishingForm.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/actionForm/ReaderForm.class b/12/WebRoot/WEB-INF/classes/com/actionForm/ReaderForm.class new file mode 100644 index 0000000..e4c6bd0 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/actionForm/ReaderForm.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/actionForm/ReaderTypeForm.class b/12/WebRoot/WEB-INF/classes/com/actionForm/ReaderTypeForm.class new file mode 100644 index 0000000..d0b09b0 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/actionForm/ReaderTypeForm.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/connDB.properties b/12/WebRoot/WEB-INF/classes/com/connDB.properties new file mode 100644 index 0000000..e7d7297 --- /dev/null +++ b/12/WebRoot/WEB-INF/classes/com/connDB.properties @@ -0,0 +1,4 @@ +#DB_CLASS_NAME(???????? +DB_CLASS_NAME=com.mysql.jdbc.Driver +#DB_URL??????????? +DB_URL=jdbc:mysql://127.0.0.1:3306/db_librarySys?user=root&password=111&useUnicode=true diff --git a/12/WebRoot/WEB-INF/classes/com/core/ChStr.class b/12/WebRoot/WEB-INF/classes/com/core/ChStr.class new file mode 100644 index 0000000..d43d545 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/core/ChStr.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/core/ConnDB.class b/12/WebRoot/WEB-INF/classes/com/core/ConnDB.class new file mode 100644 index 0000000..0be9dfa Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/core/ConnDB.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/dao/BookCaseDAO.class b/12/WebRoot/WEB-INF/classes/com/dao/BookCaseDAO.class new file mode 100644 index 0000000..bae9d57 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/dao/BookCaseDAO.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/dao/BookDAO.class b/12/WebRoot/WEB-INF/classes/com/dao/BookDAO.class new file mode 100644 index 0000000..d7cf646 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/dao/BookDAO.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/dao/BookTypeDAO.class b/12/WebRoot/WEB-INF/classes/com/dao/BookTypeDAO.class new file mode 100644 index 0000000..2bba57d Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/dao/BookTypeDAO.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/dao/BorrowDAO.class b/12/WebRoot/WEB-INF/classes/com/dao/BorrowDAO.class new file mode 100644 index 0000000..f3d5d76 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/dao/BorrowDAO.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/dao/LibraryDAO.class b/12/WebRoot/WEB-INF/classes/com/dao/LibraryDAO.class new file mode 100644 index 0000000..6cc630b Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/dao/LibraryDAO.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/dao/ManagerDAO.class b/12/WebRoot/WEB-INF/classes/com/dao/ManagerDAO.class new file mode 100644 index 0000000..f0b5b99 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/dao/ManagerDAO.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/dao/ParameterDAO.class b/12/WebRoot/WEB-INF/classes/com/dao/ParameterDAO.class new file mode 100644 index 0000000..f937dee Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/dao/ParameterDAO.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/dao/PublishingDAO.class b/12/WebRoot/WEB-INF/classes/com/dao/PublishingDAO.class new file mode 100644 index 0000000..598c749 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/dao/PublishingDAO.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/dao/ReaderDAO.class b/12/WebRoot/WEB-INF/classes/com/dao/ReaderDAO.class new file mode 100644 index 0000000..43ac42c Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/dao/ReaderDAO.class differ diff --git a/12/WebRoot/WEB-INF/classes/com/dao/ReaderTypeDAO.class b/12/WebRoot/WEB-INF/classes/com/dao/ReaderTypeDAO.class new file mode 100644 index 0000000..0b42e11 Binary files /dev/null and b/12/WebRoot/WEB-INF/classes/com/dao/ReaderTypeDAO.class differ diff --git a/12/WebRoot/WEB-INF/lib/mysql-connector-java-3.0.16-ga-bin.jar b/12/WebRoot/WEB-INF/lib/mysql-connector-java-3.0.16-ga-bin.jar new file mode 100644 index 0000000..8deaaf4 Binary files /dev/null and b/12/WebRoot/WEB-INF/lib/mysql-connector-java-3.0.16-ga-bin.jar differ diff --git a/12/WebRoot/WEB-INF/web.xml b/12/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..b8d89fa --- /dev/null +++ b/12/WebRoot/WEB-INF/web.xml @@ -0,0 +1,113 @@ + + + LibraryManage + + + Library + com.action.Library + + + Library + /library + + + + Manager + com.action.Manager + + + Manager + /manager + + + + Parameter + com.action.Parameter + + + Parameter + /parameter + + + + Reader + com.action.Reader + + + Reader + /reader + + + + ReaderType + com.action.ReaderType + + + ReaderType + /readerType + + + + Book + com.action.Book + + + Book + /book + + + + BookCase + com.action.BookCase + + + BookCase + /bookCase + + + + BookType + com.action.BookType + + + BookType + /bookType + + + + Borrow + com.action.Borrow + + + Borrow + /borrow + + + + CharacterEncodingFilter + com.CharacterEncodingFilter + + encoding + GBK + + + + CharacterEncodingFilter + /* + REQUEST + FORWARD + + + + + + + login.jsp + index.jsp + + + BASIC + + diff --git a/12/WebRoot/banner.jsp b/12/WebRoot/banner.jsp new file mode 100644 index 0000000..8b4d8dd --- /dev/null +++ b/12/WebRoot/banner.jsp @@ -0,0 +1,18 @@ +<%@ page contentType="text/html; charset=gb2312"%> +<% +String manager=(String)session.getAttribute("manager"); +//֤ûǷ¼ +if (manager==null || "".equals(manager)){ + response.sendRedirect("login.jsp"); +} +%> + + + + + +
    + + + +
    ǰ¼û<%=manager%>
    diff --git a/12/WebRoot/book.jsp b/12/WebRoot/book.jsp new file mode 100644 index 0000000..2501baf --- /dev/null +++ b/12/WebRoot/book.jsp @@ -0,0 +1,103 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BookDAO" %> +<%@ page import="com.actionForm.BookForm" %> +<%@ page import="java.util.*"%> +<%@ page import="com.core.ChStr"%> + +<% +Collection coll=(Collection)request.getAttribute("book"); +ChStr chStr=new ChStr(); +%> + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãͼ > ͼ鵵 >>>
    <% +if(coll==null || coll.isEmpty()){ +%> + + + + +
    ͼϢ
    + + + + +
    + ͼϢ
    + <% +}else{ + //ͨʽʾ + Iterator it=coll.iterator(); + int ID=0; + String bookname=""; + String barcode=""; + String typename=""; + String publishing=""; + String bookcase=""; + int storage=0; + %> + + + + + +
      + ͼϢ
    + + + + + + + + + + +<% + while(it.hasNext()){ + BookForm bookForm=(BookForm)it.next(); + ID=bookForm.getId().intValue(); + bookname=bookForm.getBookName(); + barcode=chStr.nullToString(bookForm.getBarcode()," "); + typename=bookForm.getTypeName(); + publishing=bookForm.getPublishing(); + bookcase=chStr.nullToString(bookForm.getBookcaseName()," "); + %> + + + + + + + + + + +<% + } +} +%> +
    ͼͼ޸ɾ
     <%=barcode%><%=bookname%> <%=typename%> <%=publishing%> <%=bookcase%>޸ɾ
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/bookBack.jsp b/12/WebRoot/bookBack.jsp new file mode 100644 index 0000000..ae862ea --- /dev/null +++ b/12/WebRoot/bookBack.jsp @@ -0,0 +1,162 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BorrowDAO" %> +<%@ page import="com.actionForm.BorrowForm" %> +<%@ page import="com.actionForm.ReaderForm" %> +<%@ page import="java.util.*"%> + +<% +ReaderForm readerForm=(ReaderForm)request.getAttribute("readerinfo"); +Collection coll=(Collection)request.getAttribute("borrowinfo"); +%> + +ͼݹϵͳ + + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + + + + +
     ǰλãͼ軹 > ͼ黹 >>>
    + + + + + + + + + +
     
    + + + + + + + +
    <% +int ID=0; +String name=""; +String sex=""; +String barcode=""; +String birthday=""; +String paperType=""; +String paperNO=""; +int number=0; +String typename=""; +if(readerForm!=null){ + ID=readerForm.getId().intValue(); + name=readerForm.getName(); + sex=readerForm.getSex(); + barcode=readerForm.getBarcode(); + birthday=readerForm.getBirthday(); + paperType=readerForm.getPaperType(); + paperNO=readerForm.getPaperNO(); + number=readerForm.getNumber(); + typename=readerForm.getTypename(); +} +%> + + + + + + + + + + + + + +
    + + + + +
    룺 + +   +

    + + + + + + + + + + +
         +      + ͣ +
    ֤ͣ + ֤룺 + ɽ + + +  
    + + + + + + + + + + <% +int id=0; +String bookname=""; +String borrowTime=""; +String backTime=""; +Float price=new Float(0); +String pubname=""; +String bookcase=""; +if(coll!=null && !coll.isEmpty()){ + Iterator it=coll.iterator(); + while(it.hasNext()){ + BorrowForm borrowForm=(BorrowForm)it.next(); + id=borrowForm.getId().intValue(); + bookname=borrowForm.getBookName(); + borrowTime=borrowForm.getBorrowTime(); + backTime=borrowForm.getBackTime(); + price=borrowForm.getPrice(); + pubname=borrowForm.getPubName(); + bookcase=borrowForm.getBookcaseName(); +%> + + + + + + + + + + <% } +}%> +
    ͼʱӦʱ(Ԫ)
     <%=bookname%> <%=borrowTime%> <%=backTime%> <%=pubname%> <%=bookcase%> <%=price%> 
    +
     
    + <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/bookBack_ok.jsp b/12/WebRoot/bookBack_ok.jsp new file mode 100644 index 0000000..24e8ae4 --- /dev/null +++ b/12/WebRoot/bookBack_ok.jsp @@ -0,0 +1,3 @@ + diff --git a/12/WebRoot/bookBorrow.jsp b/12/WebRoot/bookBorrow.jsp new file mode 100644 index 0000000..c222c8a --- /dev/null +++ b/12/WebRoot/bookBorrow.jsp @@ -0,0 +1,189 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BorrowDAO" %> +<%@ page import="com.actionForm.BorrowForm" %> +<%@ page import="com.actionForm.ReaderForm" %> +<%@ page import="java.util.*"%> + +<% +ReaderForm readerForm=(ReaderForm)request.getAttribute("readerinfo"); +Collection coll=(Collection)request.getAttribute("borrowinfo"); +int borrowNumber=0; +%> + +ͼݹϵͳ + + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + + + + +
    ǰλãͼ軹 > ͼ >>>
    + + + + + + + + + + + + +
     
    + + + + + + + + + + +
    <% +int ID=0; +String name=""; +String sex=""; +String barcode=""; +String birthday=""; +String paperType=""; +String paperNO=""; +int number=0; +String typename=""; +if(readerForm!=null){ + ID=readerForm.getId().intValue(); + name=readerForm.getName(); + sex=readerForm.getSex(); + barcode=readerForm.getBarcode(); + birthday=readerForm.getBirthday(); + paperType=readerForm.getPaperType(); + paperNO=readerForm.getPaperNO(); + number=readerForm.getNumber(); + typename=readerForm.getTypename(); +} +%> + + + + + + + + + + + + + +
    + + + + +
    룺 + +   +

    + + + + + + + + + + +
         +      + ͣ +
    ֤ͣ + ֤룺 + ɽ + + +  
     ӵݣ + + ͼ    + +ͼ   + + + + +
    + + + + + + + + +<% +String bookname=""; +String borrowTime=""; +String backTime=""; +Float price=new Float(0); +String pubname=""; +String bookcase=""; +if(coll!=null && !coll.isEmpty()){ + borrowNumber=coll.size(); + Iterator it=coll.iterator(); + while(it.hasNext()){ + BorrowForm borrowForm=(BorrowForm)it.next(); + bookname=borrowForm.getBookName(); + borrowTime=borrowForm.getBorrowTime(); + backTime=borrowForm.getBackTime(); + price=borrowForm.getPrice(); + pubname=borrowForm.getPubName(); + bookcase=borrowForm.getBookcaseName(); +%> + + + + + + + + +<% } +}%> + +
    ͼʱӦʱ(Ԫ)
     <%=bookname%> <%=borrowTime%> <%=backTime%> <%=pubname%> <%=bookcase%> <%=price%>
    +
     
    + <%@ include file="copyright.jsp"%>
    + + \ No newline at end of file diff --git a/12/WebRoot/bookBorrowSort.jsp b/12/WebRoot/bookBorrowSort.jsp new file mode 100644 index 0000000..fc69d9e --- /dev/null +++ b/12/WebRoot/bookBorrowSort.jsp @@ -0,0 +1,93 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BorrowDAO" %> +<%@ page import="com.actionForm.BorrowForm" %> +<%@ page import="java.util.*"%> + +<% +Collection coll=(Collection)request.getAttribute("bookBorrowSort"); +%> + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãͼа >>>
    <% +if(coll==null || coll.isEmpty()){ +%> + + + + +
    ͼϢ
    + <% +}else{ + //ͨʽʾ + Iterator it=coll.iterator(); + int degree=0; + String bookname=""; + String typename=""; + String barcode_book=""; + String bookcase=""; + String pub=""; + String author=""; + String translator=""; + Float price=new Float(0); + %> + + + + + + + + + + + +<% + while(it.hasNext()){ + BorrowForm borrowForm=(BorrowForm)it.next(); + bookname=borrowForm.getBookName(); + barcode_book=borrowForm.getBookBarcode(); + typename=borrowForm.getBookType(); + degree=borrowForm.getDegree(); +bookcase=borrowForm.getBookcaseName(); + pub=borrowForm.getPubName(); + author=borrowForm.getAuthor(); + price=borrowForm.getPrice(); + %> + + + + + + + + + + +<% + } +} +%> +
    Ĵͼͼͼ(Ԫ)
     <%=degree%> <%=barcode_book%><%=bookname%><%=typename%> <%=bookcase%> <%=pub%><%=author%><%=price%>
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/bookBorrow_ok.jsp b/12/WebRoot/bookBorrow_ok.jsp new file mode 100644 index 0000000..b59c69f --- /dev/null +++ b/12/WebRoot/bookBorrow_ok.jsp @@ -0,0 +1,3 @@ + diff --git a/12/WebRoot/bookCase_Modify.jsp b/12/WebRoot/bookCase_Modify.jsp new file mode 100644 index 0000000..1eae294 --- /dev/null +++ b/12/WebRoot/bookCase_Modify.jsp @@ -0,0 +1,54 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.actionForm.BookCaseForm" %> +<%@ page import="com.core.ChStr" %> + + +޸Ϣ + + + + + + + + + +
    + + + + + + + + + + + + + + + +
       
     <% +BookCaseForm bookCaseForm=(BookCaseForm)request.getAttribute("bookCaseQueryif"); +%> +
    + + + + + + + + +
    ƣ + +
    +  + +  +
    +
     
       
    + + + diff --git a/12/WebRoot/bookQuery.jsp b/12/WebRoot/bookQuery.jsp new file mode 100644 index 0000000..6c00f6b --- /dev/null +++ b/12/WebRoot/bookQuery.jsp @@ -0,0 +1,106 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BookDAO" %> +<%@ page import="com.actionForm.BookForm" %> +<%@ page import="java.util.*"%> + +<% +Collection coll=(Collection)request.getAttribute("ifbook"); +%> + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãϵͳѯ > ͼ鵵ѯ >>>
    +
    + + + + + +
    + + ѡѯݣ + + +
    +<% +if(coll==null || coll.isEmpty()){ +%> + + + + +
    ͼϢ
    + <% +}else{ + //ͨʽʾ + Iterator it=coll.iterator(); + int ID=0; + String bookname=""; + String barcode=""; + String typename=""; + String publishing=""; + String bookcase=""; + int storage=0; + %> + + + + + + + + +<% + while(it.hasNext()){ + BookForm bookForm=(BookForm)it.next(); + ID=bookForm.getId().intValue(); + bookname=bookForm.getBookName(); + barcode=bookForm.getBarcode(); + if(barcode==null) barcode=""; + typename=bookForm.getTypeName(); + publishing=bookForm.getPublishing(); + bookcase=bookForm.getBookcaseName(); + %> + + + + + + + +<% + } +} +%> +
    ͼͼ
     <%=barcode%><%=bookname%> <%=typename%> <%=publishing%> <%=bookcase%>
    +
    +
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/bookRenew.jsp b/12/WebRoot/bookRenew.jsp new file mode 100644 index 0000000..7f7550e --- /dev/null +++ b/12/WebRoot/bookRenew.jsp @@ -0,0 +1,162 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BorrowDAO" %> +<%@ page import="com.actionForm.BorrowForm" %> +<%@ page import="com.actionForm.ReaderForm" %> +<%@ page import="java.util.*"%> + +<% +ReaderForm readerForm=(ReaderForm)request.getAttribute("readerinfo"); +Collection coll=(Collection)request.getAttribute("borrowinfo"); +%> + +ͼݹϵͳ + + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + + + + +
     ǰλãͼ軹 > ͼ >>>
    + + + + + + + + + +
     
    + + + + + + + +
    <% +int ID=0; +String name=""; +String sex=""; +String barcode=""; +String birthday=""; +String paperType=""; +String paperNO=""; +int number=0; +String typename=""; +if(readerForm!=null){ + ID=readerForm.getId().intValue(); + name=readerForm.getName(); + sex=readerForm.getSex(); + barcode=readerForm.getBarcode(); + birthday=readerForm.getBirthday(); + paperType=readerForm.getPaperType(); + paperNO=readerForm.getPaperNO(); + number=readerForm.getNumber(); + typename=readerForm.getTypename(); +} +%> + + + + + + + + + + + + + +
    + + + + +
    룺 + +   +

    + + + + + + + + + + +
         +      + ͣ +
    ֤ͣ + ֤룺 + ɽ + + +  
    + + + + + + + + + +<% +int id=0; +String bookname=""; +String borrowTime=""; +String backTime=""; +Float price=new Float(0); +String pubname=""; +String bookcase=""; +if(coll!=null && !coll.isEmpty()){ + Iterator it=coll.iterator(); + while(it.hasNext()){ + BorrowForm borrowForm=(BorrowForm)it.next(); + id=borrowForm.getId().intValue(); + bookname=borrowForm.getBookName(); + borrowTime=borrowForm.getBorrowTime(); + backTime=borrowForm.getBackTime(); + price=borrowForm.getPrice(); + pubname=borrowForm.getPubName(); + bookcase=borrowForm.getBookcaseName(); +%> + + + + + + + + + + <% } +}%> +
    ͼʱӦʱ(Ԫ)
     <%=bookname%> <%=borrowTime%> <%=backTime%> <%=pubname%> <%=bookcase%> <%=price%> 
    +
     
    + <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/bookRenew_ok.jsp b/12/WebRoot/bookRenew_ok.jsp new file mode 100644 index 0000000..73aabc8 --- /dev/null +++ b/12/WebRoot/bookRenew_ok.jsp @@ -0,0 +1,3 @@ + diff --git a/12/WebRoot/bookType.jsp b/12/WebRoot/bookType.jsp new file mode 100644 index 0000000..83ad58b --- /dev/null +++ b/12/WebRoot/bookType.jsp @@ -0,0 +1,87 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BookTypeDAO" %> +<%@ page import="com.actionForm.BookTypeForm" %> +<%@ page import="java.util.*"%> + +<% +Collection coll=(Collection)request.getAttribute("bookType"); +%> + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãͼ > ͼ >>>
    <% +if(coll==null || coll.isEmpty()){ +%> + + + + +
    ͼϢ
    + + + + +
    + ͼϢ
    + <% +}else{ + //ͨʽʾ + Iterator it=coll.iterator(); + int ID=0; + String typename=""; + int days=0; + %> + + + + + +
      + ͼϢ
    + + + + + + + +<% + while(it.hasNext()){ + BookTypeForm bookTypeForm=(BookTypeForm)it.next(); + ID=bookTypeForm.getId().intValue(); + typename=bookTypeForm.getTypeName(); + days=bookTypeForm.getDays(); + %> + + + + + + +<% + } +} +%> +
    ͼɽ޸ɾ
    <%=typename%><%=days%>޸ɾ
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/bookType_Modify.jsp b/12/WebRoot/bookType_Modify.jsp new file mode 100644 index 0000000..527e184 --- /dev/null +++ b/12/WebRoot/bookType_Modify.jsp @@ -0,0 +1,64 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.actionForm.BookTypeForm" %> +<%@ page import="com.core.ChStr"%> + + +޸ͼϢ + + + + + +<% +BookTypeForm bookTypeForm=(BookTypeForm)request.getAttribute("bookTypeQueryif"); +ChStr chStr=new ChStr(); +%> + + + + +
    + + + + + + + + + + + + + + + +
       
      + + + +
    + + + + + + + + + + + + + + +
    ƣ +
    ɽ + ()
      +  + +  +
    +
     
       
    + + diff --git a/12/WebRoot/bookType_add.jsp b/12/WebRoot/bookType_add.jsp new file mode 100644 index 0000000..5cde172 --- /dev/null +++ b/12/WebRoot/bookType_add.jsp @@ -0,0 +1,64 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ͼϢ + + + + + + + + + +
    + + + + + + + + + + + + + + + +
       
      + + + +
    + + + + + + + + + + + + + +
    ƣ +
    ɽ + ()
      +   +
    +
     
       
    + + diff --git a/12/WebRoot/bookType_ok.jsp b/12/WebRoot/bookType_ok.jsp new file mode 100644 index 0000000..756ef1a --- /dev/null +++ b/12/WebRoot/bookType_ok.jsp @@ -0,0 +1,37 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/12/WebRoot/book_Modify.jsp b/12/WebRoot/book_Modify.jsp new file mode 100644 index 0000000..f54323e --- /dev/null +++ b/12/WebRoot/book_Modify.jsp @@ -0,0 +1,188 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BookDAO" %> +<%@ page import="com.dao.BookTypeDAO" %> +<%@ page import="com.actionForm.BookForm" %> +<%@ page import="com.actionForm.BookTypeForm"%> +<%@ page import="com.dao.BookCaseDAO" %> +<%@ page import="com.actionForm.BookCaseForm" %> +<%@ page import="com.dao.PublishingDAO" %> +<%@ page import="com.actionForm.PublishingForm" %> +<%@ page import="java.util.*"%> + +<% +String str=null; +BookTypeDAO bookTypeDAO=new BookTypeDAO(); +Collection coll_type=(Collection)bookTypeDAO.query(str); +if(coll_type==null || coll_type.isEmpty()){ + out.println(""); +}else{ + Iterator it_type=coll_type.iterator(); + int typeID=0; + String typename1=""; + BookCaseDAO bookcaseDAO=new BookCaseDAO(); + String str1=null; + Collection coll_bookcase=(Collection)bookcaseDAO.query(str1); + if(coll_bookcase==null || coll_bookcase.isEmpty()){ + out.println(""); + }else{ + Iterator it_bookcase=coll_bookcase.iterator(); + int bookcaseID=0; + String bookcasename=""; + PublishingDAO pubDAO=new PublishingDAO(); + String str2=null; + Collection coll_pub=(Collection)pubDAO.query(str2); + if(coll_pub==null || coll_pub.isEmpty()){ + out.println(""); + }else{ + Iterator it_pub=coll_pub.iterator(); + String isbn=""; + String pubname=""; + BookForm bookForm=(BookForm)request.getAttribute("bookQueryif"); +%> + + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãͼ > ͼ鵵 > ޸ͼϢ >>>
    + + + +
    +
    +<% int ID=bookForm.getId().intValue(); + String bookname=bookForm.getBookName(); + String barcode=bookForm.getBarcode(); + if(barcode==null) barcode=""; + int TypeId=bookForm.getTypeId(); + String typename=bookForm.getTypeName(); + String author=bookForm.getAuthor(); + String translator=bookForm.getTranslator(); + String ISBN=bookForm.getIsbn(); + String publishing=bookForm.getPublishing(); + Float price=bookForm.getPrice(); + int pages=bookForm.getPage(); + int bookcaseid=bookForm.getBookcaseid(); + String bookcase=bookForm.getBookcaseName(); + String inTime=bookForm.getInTime(); + String operator=bookForm.getOperator(); + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +   룺 +
    ͼƣ + *
    ͼͣ +
    ߣ
    ߣ
    ۸ + (Ԫ) *
    ҳ룺
    ܣ +
      +  +
    +
    +
    +
    <%@ include file="copyright.jsp"%>
    +<%} +} +}%> + + diff --git a/12/WebRoot/book_add.jsp b/12/WebRoot/book_add.jsp new file mode 100644 index 0000000..fb23df4 --- /dev/null +++ b/12/WebRoot/book_add.jsp @@ -0,0 +1,169 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BookDAO" %> +<%@ page import="com.dao.BookTypeDAO" %> +<%@ page import="com.actionForm.BookForm" %> +<%@ page import="com.actionForm.BookTypeForm"%> +<%@ page import="com.dao.BookCaseDAO" %> +<%@ page import="com.actionForm.BookCaseForm" %> +<%@ page import="com.dao.PublishingDAO" %> +<%@ page import="com.actionForm.PublishingForm" %> +<%@ page import="java.util.*"%> + +<% +String str=null; +BookTypeDAO bookTypeDAO=new BookTypeDAO(); +Collection coll_type=(Collection)bookTypeDAO.query(str); +if(coll_type==null || coll_type.isEmpty()){ + out.println(""); +}else{ + Iterator it_type=coll_type.iterator(); + int typeID=0; + String typename=""; + BookCaseDAO bookcaseDAO=new BookCaseDAO(); + String str1=null; + Collection coll_bookcase=(Collection)bookcaseDAO.query(str1); + if(coll_bookcase==null || coll_bookcase.isEmpty()){ + out.println(""); + }else{ + Iterator it_bookcase=coll_bookcase.iterator(); + int bookcaseID=0; + String bookcasename=""; + PublishingDAO pubDAO=new PublishingDAO(); + String str2=null; + Collection coll_pub=(Collection)pubDAO.query(str2); + if(coll_pub==null || coll_pub.isEmpty()){ + out.println(""); + }else{ + Iterator it_pub=coll_pub.iterator(); + String isbn=""; + String pubname=""; +%> + + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãͼ > ͼ鵵 > ͼϢ >>>
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      룺 + + *
    ͼƣ + *
    ͼͣ +
    ߣ
    ߣ
    ۸ + (Ԫ) *
    ҳ룺
    ܣ +
      +  +
    +
    +
    +
    <%@ include file="copyright.jsp"%>
    +<%} +} +}%> + + diff --git a/12/WebRoot/book_detail.jsp b/12/WebRoot/book_detail.jsp new file mode 100644 index 0000000..e570005 --- /dev/null +++ b/12/WebRoot/book_detail.jsp @@ -0,0 +1,111 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BookDAO" %> +<%@ page import="com.dao.BookTypeDAO" %> +<%@ page import="com.actionForm.BookForm" %> +<%@ page import="java.util.*"%> + +<% +BookForm bookForm=(BookForm)request.getAttribute("bookDetail"); +%> + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãͼ > ͼ鵵 > ͼϸϢ >>>
    + + + +
    +<% + int ID=bookForm.getId().intValue(); + String bookname=bookForm.getBookName(); + String barcode=bookForm.getBarcode(); + if(barcode==null) barcode=""; + String typename=bookForm.getTypeName(); + String author=bookForm.getAuthor(); + String translator=bookForm.getTranslator(); + String publishing=bookForm.getPublishing(); + Float price=bookForm.getPrice(); + int pages=bookForm.getPage(); + String bookcase=bookForm.getBookcaseName(); + + String inTime=bookForm.getInTime(); + String operator=bookForm.getOperator(); + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      룺
    ͼƣ +
    ͼͣ
        ߣ
        ߣ
      磺
         + (Ԫ)
    ҳ    룺
        ܣ
    ʱ䣺
      Ա
      +  +
    +
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/book_ok.jsp b/12/WebRoot/book_ok.jsp new file mode 100644 index 0000000..7bb1181 --- /dev/null +++ b/12/WebRoot/book_ok.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/12/WebRoot/bookcase.jsp b/12/WebRoot/bookcase.jsp new file mode 100644 index 0000000..c04179f --- /dev/null +++ b/12/WebRoot/bookcase.jsp @@ -0,0 +1,83 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BookCaseDAO" %> +<%@ page import="com.actionForm.BookCaseForm" %> +<%@ page import="java.util.*"%> + +<% +Collection coll=(Collection)request.getAttribute("bookcase"); +%> + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãϵͳ > >>>
    <% +if(coll==null || coll.isEmpty()){ +%> + + + + +
    Ϣ
    + + + + +
    + Ϣ
    + <% +}else{ + //ͨʽʾ + Iterator it=coll.iterator(); + int ID=0; + String name=""; + %> + + + + + +
      + Ϣ
    + + + + + + +<% + while(it.hasNext()){ + BookCaseForm bookCaseForm=(BookCaseForm)it.next(); + ID=bookCaseForm.getId().intValue(); + name=bookCaseForm.getName(); + %> + + + + + +<% + } +} +%> +
    ޸ɾ
    <%=name%>޸ɾ
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/bookcase_add.jsp b/12/WebRoot/bookcase_add.jsp new file mode 100644 index 0000000..542892d --- /dev/null +++ b/12/WebRoot/bookcase_add.jsp @@ -0,0 +1,48 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +Ϣ + + + + + + + + + +
    + + + + + + + + + + + + + + + +
       
      + + + +
    + + + + + + + +
    ƣ +
    +   +
    +
     
       
    + + diff --git a/12/WebRoot/bookcase_ok.jsp b/12/WebRoot/bookcase_ok.jsp new file mode 100644 index 0000000..497686f --- /dev/null +++ b/12/WebRoot/bookcase_ok.jsp @@ -0,0 +1,38 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/12/WebRoot/borrowQuery.jsp b/12/WebRoot/borrowQuery.jsp new file mode 100644 index 0000000..23eb633 --- /dev/null +++ b/12/WebRoot/borrowQuery.jsp @@ -0,0 +1,144 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BorrowDAO" %> +<%@ page import="com.actionForm.BorrowForm" %> +<%@ page import="java.util.*"%> + +<% +Collection coll=(Collection)request.getAttribute("borrowQuery"); +%> + +ͼݹϵͳ + + + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãϵͳѯ > ͼIJѯ >>>
    +
    + + + + + + + + +
      + ѡѯݣ + + +
    + + ʱ䣺 + + + + (ڸʽΪ2011-02-14)
    +
    + <% +if(coll==null || coll.isEmpty()){ +%> + + + + +
    ͼϢ
    + <% +}else{ + //ͨʽʾ + Iterator it=coll.iterator(); + String bookname=""; + String bookbarcode=""; + String readerbar=""; + String readername=""; + String borrowTime=""; + String backTime=""; + int ifback=0; + String ifbackstr=""; + %> + + + + + + + + + + +<% + while(it.hasNext()){ + BorrowForm borrowForm=(BorrowForm)it.next(); + bookname=borrowForm.getBookName(); + bookbarcode=borrowForm.getBookBarcode(); + readerbar=borrowForm.getReaderBarcode(); + readername=borrowForm.getReaderName(); + borrowTime=borrowForm.getBorrowTime(); + backTime=borrowForm.getBackTime(); + ifback=borrowForm.getIfBack(); + if(ifback==0){ + ifbackstr="δ黹"; + }else{ + ifbackstr="ѹ黹"; + } + %> + + + + + + + + + +<% + } +} +%> +
    ͼͼʱӦʱǷ黹
     <%=bookbarcode%><%=bookname%> <%=readerbar%> <%=readername%> <%=borrowTime%> <%=backTime%> <%=ifbackstr%>
    +
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/bremind.jsp b/12/WebRoot/bremind.jsp new file mode 100644 index 0000000..5291318 --- /dev/null +++ b/12/WebRoot/bremind.jsp @@ -0,0 +1,84 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.BorrowDAO" %> +<%@ page import="com.actionForm.BorrowForm" %> +<%@ page import="java.util.*"%> + +<% +Collection coll=(Collection)request.getAttribute("Bremind"); +%> + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãϵͳѯ > ĵ >>>
    <% +if(coll==null || coll.isEmpty()){ +%> + + + + +
    ޵Ϣ
    + <% +}else{ + //ͨʽʾ + Iterator it=coll.iterator(); + String bookname=""; + String bookbarcode=""; + String readerbar=""; + String readername=""; + String borrowTime=""; + String backTime=""; + %> + + + + + + + + + +<% + while(it.hasNext()){ + BorrowForm borrowForm=(BorrowForm)it.next(); + bookname=borrowForm.getBookName(); + bookbarcode=borrowForm.getBookBarcode(); + readerbar=borrowForm.getReaderBarcode(); + readername=borrowForm.getReaderName(); + borrowTime=borrowForm.getBorrowTime(); + backTime=borrowForm.getBackTime(); + %> + + + + + + + + +<% + } +} +%> +
    ͼͼʱӦʱ
     <%=bookbarcode%><%=bookname%> <%=readerbar%> <%=readername%> <%=borrowTime%> <%=backTime%>
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/copyright.jsp b/12/WebRoot/copyright.jsp new file mode 100644 index 0000000..ad282bd --- /dev/null +++ b/12/WebRoot/copyright.jsp @@ -0,0 +1,21 @@ +<%@ page contentType="text/html; charset=gb2312"%> + + + + + + + + + + + + + + + + + + + +
      CopyRight © 2011 www.**********.com *****޹˾ 
     վʹIE6.0ϰ汾 1024*768ΪʾЧ 
    diff --git a/12/WebRoot/error.jsp b/12/WebRoot/error.jsp new file mode 100644 index 0000000..2501b54 --- /dev/null +++ b/12/WebRoot/error.jsp @@ -0,0 +1,31 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% +String error=(String)request.getAttribute("error"); +%> + + + +ʾ + + + + + + + + +
    + + + +
    + + + +
      ʾϢ <%=error%>
    +
    +
    +
    +
    + + diff --git a/12/WebRoot/index.jsp b/12/WebRoot/index.jsp new file mode 100644 index 0000000..d652393 --- /dev/null +++ b/12/WebRoot/index.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + My JSP 'index.jsp' starting page + + + + + + + + + + This is my JSP page.
    + + diff --git a/12/WebRoot/library_modify.jsp b/12/WebRoot/library_modify.jsp new file mode 100644 index 0000000..baef871 --- /dev/null +++ b/12/WebRoot/library_modify.jsp @@ -0,0 +1,112 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.actionForm.LibraryForm" %> + +<% +LibraryForm libraryForm=(LibraryForm)request.getAttribute("libraryModifyif"); +String libraryname=""; +String curator=""; +String tel=""; +String address=""; +String email=""; +String url=""; +String createTime=""; +String introduce=""; +%> + +ͼݹϵͳ + + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãϵͳ > ͼϢ >>>
    + + + + +
     
    +<% +if(libraryForm!=null){ + libraryname=libraryForm.getLibraryname(); + curator=libraryForm.getCurator(); + tel=libraryForm.getTel(); + address=libraryForm.getAddress(); + email=libraryForm.getEmail(); + url=libraryForm.getUrl(); + createTime=libraryForm.getCreateDate(); + introduce=libraryForm.getIntroduce(); +} +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ͼƣ + + +
    ݳ
    ϵ绰
    ϵַ
    ϵ䣺
    ͼַ
    ʱ䣺 + (ڸʽ2011-02-22)
    ͼݼ飺
      +   +
    +
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/library_ok.jsp b/12/WebRoot/library_ok.jsp new file mode 100644 index 0000000..7754e40 --- /dev/null +++ b/12/WebRoot/library_ok.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + + + + \ No newline at end of file diff --git a/12/WebRoot/login.jsp b/12/WebRoot/login.jsp new file mode 100644 index 0000000..087ead6 --- /dev/null +++ b/12/WebRoot/login.jsp @@ -0,0 +1,100 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + + + +ͼݹϵͳ + + + + + + + + + + +
    + + + + +
     
    +
    + + + + +
    + + + +
    + + + + +
    + + + + + + + + + +
     
    + + + + + +
      +
    + + + + + + + + + + + + + + + + + + + + + + + +
       
     Աƣ +  
     Ա룺 
      +   +   +  
    +
     
     
    + + + + +
    +
    + + diff --git a/12/WebRoot/login_false.jsp b/12/WebRoot/login_false.jsp new file mode 100644 index 0000000..c589b0f --- /dev/null +++ b/12/WebRoot/login_false.jsp @@ -0,0 +1,12 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +Untitled Document + + + + +¼ʧ + + + diff --git a/12/WebRoot/logout.jsp b/12/WebRoot/logout.jsp new file mode 100644 index 0000000..7723269 --- /dev/null +++ b/12/WebRoot/logout.jsp @@ -0,0 +1,18 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + + +Untitled Document + + + + +<% +session.invalidate(); +out.println(""); +%> + + + + diff --git a/12/WebRoot/main.jsp b/12/WebRoot/main.jsp new file mode 100644 index 0000000..6f4d38f --- /dev/null +++ b/12/WebRoot/main.jsp @@ -0,0 +1,106 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> +<%@ page import="com.dao.BorrowDAO"%> + +<%@ page import="com.actionForm.BorrowForm"%> +<%@ page import="java.util.*"%> +<% + +%> + + + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> +<% +BorrowDAO borrowDAO=new BorrowDAO(); +Collection coll_book=(Collection)borrowDAO.bookBorrowSort(); +%> + + + + +
    + + + + + + +
    ǰλãҳ >>> 
    + + + + + + +
     
    + + + + + + + + +
      + + + + + + + + + + + + <%if(coll_book!=null && !coll_book.isEmpty()){ + Iterator it_book=coll_book.iterator(); + int i=1; + int degree=0; + String bookname=""; + String typename=""; + String barcode_book=""; + String bookcase=""; + String pub=""; + String author=""; + String translator=""; + Float price=new Float(0); + while(it_book.hasNext() && i<6){ + BorrowForm borrowForm=(BorrowForm)it_book.next(); + bookname=borrowForm.getBookName(); + barcode_book=borrowForm.getBookBarcode(); + typename=borrowForm.getBookType(); + degree=borrowForm.getDegree(); + bookcase=borrowForm.getBookcaseName(); + pub=borrowForm.getPubName(); + author=borrowForm.getAuthor(); + price=borrowForm.getPrice(); + + %> + + + + + + + + + + + + <% + i++; + } + }%> +
    ͼͼͼ(Ԫ)Ĵ
    <%=i%> <%=barcode_book%><%=bookname%><%=typename%> <%=bookcase%> <%=pub%><%=author%><%=price%><%=degree%>
    +
     
     
    +
    +
    +<%@ include file="copyright.jsp"%> + + diff --git a/12/WebRoot/manager.jsp b/12/WebRoot/manager.jsp new file mode 100644 index 0000000..a946168 --- /dev/null +++ b/12/WebRoot/manager.jsp @@ -0,0 +1,106 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<%@ page import="java.util.*"%> + + +<% +String flag="mr"; +Collection coll=(Collection)request.getAttribute("managerQuery"); +%> + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> + <%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãϵͳ > Ա >>>
    <% +if(coll==null || coll.isEmpty()){ +%> + + + + +
    ޹ԱϢ
    + + + + +
    + ӹԱϢ
    + <% +}else{ + //ͨʽʾ + Iterator it=coll.iterator(); + int ID=0; + String name=""; + int sysset=0; + int readerset=0; + int bookset=0; + int borrowback=0; + int sysquery=0; + %> + + + + + +
      + ӹԱϢ
    + + + + + + + + + + + +<% + while(it.hasNext()){ + + ManagerForm managerForm=(ManagerForm)it.next(); + ID=managerForm.getId().intValue(); + name=managerForm.getName(); + sysset=managerForm.getSysset(); + readerset=managerForm.getReaderset(); + bookset=managerForm.getBookset(); + borrowback=managerForm.getBorrowback(); + sysquery=managerForm.getSysquery(); + %> + + + + + + + + + + +<% + } +} +%> +
    Աϵͳ߹ͼͼ軹ϵͳѯȨɾ
    <%=name%>>>>>><%if(!name.equals(flag)){ %>Ȩ<%}else{%> <%}%> + <%if(!name.equals(flag)){ %>ɾ<%}else{%> <%}%>
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/manager_Modify.jsp b/12/WebRoot/manager_Modify.jsp new file mode 100644 index 0000000..a256db4 --- /dev/null +++ b/12/WebRoot/manager_Modify.jsp @@ -0,0 +1,83 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.actionForm.ManagerForm"%> +<% +ManagerForm managerForm=(ManagerForm)request.getAttribute("managerQueryif"); +int ID=managerForm.getId().intValue(); +String name=managerForm.getName(); +int sysset=managerForm.getSysset(); +int readerset=managerForm.getReaderset(); +int bookset=managerForm.getBookset(); +int borrowback=managerForm.getBorrowback(); +int sysquery=managerForm.getSysquery(); +%> + + +Ȩ + + + + + + + + +
    + + + + + + + + + + + + + + + +
       
      + + + +
    + + + + + + + + + + + + + +
    Աƣ +
    ӵеȨޣ + + + + + + + + + + + + +
    > +ϵͳ> + ߹
    > + ͼ> + ͼ軹
    > + ϵͳѯ 
      +  +
    +
     
       
    + + + diff --git a/12/WebRoot/manager_add.jsp b/12/WebRoot/manager_add.jsp new file mode 100644 index 0000000..5cd3ca7 --- /dev/null +++ b/12/WebRoot/manager_add.jsp @@ -0,0 +1,74 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ӹԱ + + + + + + + + + +
    + + + + + + + + + + + + + + + +
       
      + + + +
    + + + + + + + + + + + + + + + + + +
    Աƣ +
    Ա룺
    ȷ  룺
      +  +
    +
     
       
    + + diff --git a/12/WebRoot/manager_ok.jsp b/12/WebRoot/manager_ok.jsp new file mode 100644 index 0000000..87b2f5b --- /dev/null +++ b/12/WebRoot/manager_ok.jsp @@ -0,0 +1,37 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/12/WebRoot/navigation.jsp b/12/WebRoot/navigation.jsp new file mode 100644 index 0000000..6472243 --- /dev/null +++ b/12/WebRoot/navigation.jsp @@ -0,0 +1,46 @@ +<%@ page contentType="text/html; charset=gb2312"%> +<%@ page import="com.dao.ManagerDAO"%> +<%@ page import="com.actionForm.ManagerForm"%> +<% +ManagerDAO managerDAO=new ManagerDAO(); +ManagerForm form1=(ManagerForm)managerDAO.query_p(manager); +int sysset1=0; +int readerset1=0; +int bookset1=0; +int borrowback1=0; +int sysquery1=0; +if(form1!=null){ + sysset1=form1.getSysset(); + readerset1=form1.getReaderset(); + bookset1=form1.getBookset(); + borrowback1=form1.getBorrowback(); + sysquery1=form1.getSysquery(); +} + +%> + + + + + + + + + + + + + + + +
     
    ҳ | + <%if(sysset1==1){%>ϵͳ | <%}%><%if(readerset1==1){%>߹ | <%}%><%if(bookset1==1){%>ͼ | <%}%><%if(borrowback1==1){%>ͼ軹 | <%}%><%if(sysquery1==1){%>ϵͳѯ | + <%}%>Ŀ | ˳ϵͳ 
    diff --git a/12/WebRoot/parameter_modify.jsp b/12/WebRoot/parameter_modify.jsp new file mode 100644 index 0000000..fc22508 --- /dev/null +++ b/12/WebRoot/parameter_modify.jsp @@ -0,0 +1,65 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.actionForm.ParameterForm" %> + +<% +ParameterForm form=(ParameterForm)request.getAttribute("parameterModifyif"); +int cost=0; +int validity=0; +%> + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãϵͳ > >>>
    + + + + +
     
    +<%if(form!=null){ + cost=form.getCost(); + validity=form.getValidity(); +} +%> + + + + + + + + + + + + +
    ֤ѣ + + (Ԫ)
    Чޣ + ()
      +   +
    +
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/parameter_ok.jsp b/12/WebRoot/parameter_ok.jsp new file mode 100644 index 0000000..38d02c4 --- /dev/null +++ b/12/WebRoot/parameter_ok.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + + + + \ No newline at end of file diff --git a/12/WebRoot/pwd_Modify.jsp b/12/WebRoot/pwd_Modify.jsp new file mode 100644 index 0000000..7af0a17 --- /dev/null +++ b/12/WebRoot/pwd_Modify.jsp @@ -0,0 +1,85 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.actionForm.ManagerForm" %> + +<% +ManagerForm managerForm=(ManagerForm)request.getAttribute("pwdQueryif"); +%> + +ͼݹϵͳ + + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλãĿ >>>
    + + + + +
     
    + + + + + + + + + + + + + + + + + + + + +
    Աƣ +
    ԭ룺 +
    ȷ룺
      +   +
    +
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/pwd_ok.jsp b/12/WebRoot/pwd_ok.jsp new file mode 100644 index 0000000..9134edd --- /dev/null +++ b/12/WebRoot/pwd_ok.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + + + + \ No newline at end of file diff --git a/12/WebRoot/reader.jsp b/12/WebRoot/reader.jsp new file mode 100644 index 0000000..6981fcc --- /dev/null +++ b/12/WebRoot/reader.jsp @@ -0,0 +1,109 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.ReaderDAO" %> +<%@ page import="com.actionForm.ReaderForm" %> +<%@ page import="java.util.*"%> +<%@ page import="com.core.ChStr"%> + +<% +Collection coll=(Collection)request.getAttribute("reader"); +ChStr chStr=new ChStr(); +%> + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλã߹ > ߵ >>>
    <% +if(coll==null || coll.isEmpty()){ +%> + + + + +
    ޶Ϣ
    + + + + +
    + ӶϢ
    + <% +}else{ + //ͨʽʾ + Iterator it=coll.iterator(); + int ID=0; + String name=""; + String typename=""; + String barcode=""; + String paperType=""; + String paperNO=""; + String tel=""; + String email=""; + %> + + + + + +
      + ӶϢ
    + + + + + + + + + + + + +<% + while(it.hasNext()){ + ReaderForm readerForm=(ReaderForm)it.next(); + ID=readerForm.getId().intValue(); + name=readerForm.getName(); + barcode=readerForm.getBarcode(); + typename=chStr.nullToString(readerForm.getTypename()," "); + paperType=readerForm.getPaperType(); + paperNO=chStr.nullToString(readerForm.getPaperNO()," "); + tel=chStr.nullToString(readerForm.getTel()," "); + email=chStr.nullToString(readerForm.getEmail()," "); + %> + + + + + + + + + + + +<% + } +} +%> +
    ֤֤Email޸ɾ
    <%=barcode%><%=name%><%=typename%><%=paperType%><%=paperNO%><%=tel%><%=email%>޸ɾ
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/readerType.jsp b/12/WebRoot/readerType.jsp new file mode 100644 index 0000000..43a08e7 --- /dev/null +++ b/12/WebRoot/readerType.jsp @@ -0,0 +1,86 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.ReaderTypeDAO" %> +<%@ page import="com.actionForm.ReaderTypeForm" %> +<%@ page import="java.util.*"%> + +<% +Collection coll=(Collection)request.getAttribute("readerType"); +%> + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλã߹ > ͹ >>>
    <% +if(coll==null || coll.isEmpty()){ +%> + + + + +
    ޶Ϣ
    + + + + +
    + ӶϢ
    + <% +}else{ + //ͨʽʾ + Iterator it=coll.iterator(); + int ID=0; + String name=""; + int number=0; + %> + + + + +
    + ӶϢ
    + + + + + + + +<% + while(it.hasNext()){ + ReaderTypeForm readerTypeForm=(ReaderTypeForm)it.next(); + ID=readerTypeForm.getId().intValue(); + name=readerTypeForm.getName(); + number=readerTypeForm.getNumber(); + %> + + + + + + +<% + } +} +%> +
    ɽ޸ɾ
     <%=name%> <%=number%>޸ɾ
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/readerType_Modify.jsp b/12/WebRoot/readerType_Modify.jsp new file mode 100644 index 0000000..2d34591 --- /dev/null +++ b/12/WebRoot/readerType_Modify.jsp @@ -0,0 +1,64 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.actionForm.ReaderTypeForm" %> +<%@ page import="com.core.ChStr"%> + + +޸ĶϢ + + + + + +<% +ReaderTypeForm readerTypeForm=(ReaderTypeForm)request.getAttribute("readerTypeQueryif"); +ChStr chStr=new ChStr(); +%> + + + + +
    + + + + + + + + + + + + + + + +
       
      + + + +
    + + + + + + + + + + + + + + +
    ƣ +
    ɽ + ()
      +  + +  +
    +
     
       
    + + diff --git a/12/WebRoot/readerType_add.jsp b/12/WebRoot/readerType_add.jsp new file mode 100644 index 0000000..9def644 --- /dev/null +++ b/12/WebRoot/readerType_add.jsp @@ -0,0 +1,65 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ӶϢ + + + + + + + + + +
    + + + + + + + + + + + + + + + +
       
      + + + +
    + + + + + + + + + + + + + +
    ƣ +
    ɽ + ()
      +   +
    +
     
       
    + + + diff --git a/12/WebRoot/readerType_ok.jsp b/12/WebRoot/readerType_ok.jsp new file mode 100644 index 0000000..8be500d --- /dev/null +++ b/12/WebRoot/readerType_ok.jsp @@ -0,0 +1,37 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/12/WebRoot/reader_Modify.jsp b/12/WebRoot/reader_Modify.jsp new file mode 100644 index 0000000..8d138a3 --- /dev/null +++ b/12/WebRoot/reader_Modify.jsp @@ -0,0 +1,157 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.ReaderDAO" %> +<%@ page import="com.dao.ReaderTypeDAO" %> +<%@ page import="com.actionForm.ReaderForm" %> +<%@ page import="com.actionForm.ReaderTypeForm"%> +<%@ page import="java.util.*"%> + +<% +String str=null; +ReaderTypeDAO readerTypeDAO=new ReaderTypeDAO(); +Collection coll=(Collection)readerTypeDAO.query(str); +Iterator it=coll.iterator(); +ReaderForm readerForm=(ReaderForm)request.getAttribute("readerQueryif"); +%> + + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλã߹ > ߵ > ޸ĶϢ >>>
    + +<% int ID=readerForm.getId().intValue(); + String name=readerForm.getName(); + String sex=readerForm.getSex(); + String barcode=readerForm.getBarcode(); + String vocation=readerForm.getVocation(); + String birthday=readerForm.getBirthday(); + String paperType=readerForm.getPaperType(); + String paperNO=readerForm.getPaperNO(); + String tel=readerForm.getTel(); + String email=readerForm.getEmail(); + String createDate=readerForm.getCreateDate(); + String remark=readerForm.getRemark(); + String operator=readerForm.getOperator(); + int typeid=readerForm.getTypeid(); + String typename=readerForm.getTypename(); + String typeName=""; + int typeID=0; + %> + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
         + + * +
        > + +
      룺
    ͣ +
    ְ    ҵ
    ڣ
    Ч֤
    ֤룺 + *
        
    Email +
      Ա +
        ע
      +  +
    +
    +
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/reader_add.jsp b/12/WebRoot/reader_add.jsp new file mode 100644 index 0000000..73f1750 --- /dev/null +++ b/12/WebRoot/reader_add.jsp @@ -0,0 +1,142 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.ReaderDAO" %> +<%@ page import="com.dao.ReaderTypeDAO" %> +<%@ page import="com.actionForm.ReaderForm" %> +<%@ page import="com.actionForm.ReaderTypeForm"%> +<%@ page import="java.util.*"%> + +<% +String str=null; +ReaderTypeDAO readerTypeDAO=new ReaderTypeDAO(); +Collection coll=(Collection)readerTypeDAO.query(str); +if(coll==null || coll.isEmpty()){ + out.println(""); +}else{ + Iterator it=coll.iterator(); + int ID=0; + String name=""; +%> + + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλã߹ > ߵ > ӶϢ >>>
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + *
    Ա + +
    +*
    ͣ +
    ְҵ
    ڣ
    Ч֤
    ֤룺 + *
    Email +
    ע
      +  +
    +
    +
    +
    <%@ include file="copyright.jsp"%>
    +<%}%> + + diff --git a/12/WebRoot/reader_detail.jsp b/12/WebRoot/reader_detail.jsp new file mode 100644 index 0000000..50d87bb --- /dev/null +++ b/12/WebRoot/reader_detail.jsp @@ -0,0 +1,129 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.dao.ReaderDAO" %> +<%@ page import="com.dao.ReaderTypeDAO" %> +<%@ page import="com.actionForm.ReaderForm" %> +<%@ page import="java.util.*"%> + +<% +ReaderForm readerForm=(ReaderForm)request.getAttribute("readerDetail"); +%> + + +ͼݹϵͳ + + + +<%@include file="banner.jsp"%> +<%@include file="navigation.jsp"%> + + + + +
    + + + +
    + + + + + + +
    ǰλã߹ > ߵ > ϸϢ >>>
    + + + +
    +<% int ID=0; + String name=readerForm.getName(); + String sex=readerForm.getSex(); + String barcode=readerForm.getBarcode(); + String vocation=readerForm.getVocation(); + String birthday=readerForm.getBirthday(); + String paperType=readerForm.getPaperType(); + String paperNO=readerForm.getPaperNO(); + String tel=readerForm.getTel(); + String email=readerForm.getEmail(); + String createDate=readerForm.getCreateDate(); + String remark=readerForm.getRemark(); + String operator=readerForm.getOperator(); + int typeid=readerForm.getTypeid(); + String typename=readerForm.getTypename(); + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
         +
        
      룺
    ͣ
    ְ    ҵ
    ڣ
    Ч֤
    ֤룺
    Ǽڣ
        
    Email +
      Ա +
        ע
      +  +
    +
    +
    <%@ include file="copyright.jsp"%>
    + + diff --git a/12/WebRoot/reader_ok.jsp b/12/WebRoot/reader_ok.jsp new file mode 100644 index 0000000..5b85177 --- /dev/null +++ b/12/WebRoot/reader_ok.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +ɹ! + + + + +<%int para=Integer.parseInt(request.getParameter("para")); +switch(para){ + case 1: + %> + + <% break; + case 2: + %> + + <% break; + case 3: + %> + + <% break; +} +%> + + \ No newline at end of file diff --git a/12/WebRoot/src/com/action/Book.java b/12/WebRoot/src/com/action/Book.java new file mode 100644 index 0000000..5709911 --- /dev/null +++ b/12/WebRoot/src/com/action/Book.java @@ -0,0 +1,153 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.void; +import com.actionForm.BookForm; +import org.apache.struts.action.Action; +import com.dao.BookDAO; +import java.util.Date; + +public class Book extends Action { + private BookDAO bookDAO = null; + public Book() { + this.bookDAO = new BookDAO(); + } + + public void execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String action =request.getParameter("action"); + System.out.println("\nbook*********************action="+action); + if(action==null||"".equals(action)){ + request.setAttribute("error","IJ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if("bookAdd".equals(action)){ + return bookAdd(request,response); + }else if("bookQuery".equals(action)){ + return bookQuery(request,response); + }else if("bookModifyQuery".equals(action)){ + return bookModifyQuery(request,response); + }else if("bookModify".equals(action)){ + return bookModify(request,response); + }else if("bookDel".equals(action)){ + return bookDel(request,response); + }else if("bookDetail".equals(action)){ + return bookDetail(request,response); + }else if("bookifQuery".equals(action)){ + return bookifQuery(request,response); + } + request.setAttribute("error","ʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + /***********************ͼϢ**************************/ + private void bookAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookForm bookForm = (BookForm) form; + bookForm.setBarcode(bookForm.getBarcode()); + bookForm.setBookName(bookForm.getBookName()); + bookForm.setTypeId(bookForm.getTypeId()); + bookForm.setAuthor(bookForm.getAuthor()); + bookForm.setTranslator(bookForm.getTranslator()); + bookForm.setIsbn(bookForm.getIsbn()); + bookForm.setPrice(bookForm.getPrice()); + bookForm.setPage(bookForm.getPage()); + bookForm.setBookcaseid(bookForm.getBookcaseid()); + //ȡϵͳ + Date date1=new Date(); + java.sql.Date date=new java.sql.Date(date1.getTime()); + bookForm.setInTime(date.toString()); + bookForm.setOperator(bookForm.getOperator()); + int a=bookDAO.insert(bookForm); + if(a==1){ + return mapping.findForward("bookAdd"); + }else if(a==2){ + request.setAttribute("error","ͼϢѾӣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + request.setAttribute("error","ͼϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + } + /***********************ѯȫͼϢ**************************/ + private void bookQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + String str=null; + request.setAttribute("book",bookDAO.query(str)); //ѯ浽book + return mapping.findForward("bookQuery"); //תʾͼϢбҳ + } + /***********************ѯͼϢ**************************/ + private void bookifQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + String str=null; + if(request.getParameter("f")!=null){ + str = request.getParameter("f") + " like '%" + + request.getParameter("key") + "%"; + } + request.setAttribute("ifbook",bookDAO.query(str)); + System.out.print("ѯͼϢʱstr:"+str); + return mapping.findForward("bookifQuery"); + } + /***********************ѯ޸ͼϢ**************************/ + private void bookModifyQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookForm bookForm=(BookForm)form; + System.out.println("ѯ޸ͼϢ"+request.getParameter("ID")); + bookForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("bookQueryif",bookDAO.queryM(bookForm)); + return mapping.findForward("bookQueryModify"); + } + /***********************ѯͼϸϢ**************************/ + private void bookDetail(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookForm bookForm=(BookForm)form; + bookForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("bookDetail",bookDAO.queryM(bookForm)); + return mapping.findForward("bookDeatil"); + } + /***********************޸ͼϢ**************************/ + private void bookModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookForm bookForm=(BookForm)form; //ʵBookForm + bookForm.setBarcode(bookForm.getBarcode()); //ȡ + bookForm.setBookName(bookForm.getBookName()); + bookForm.setTypeId(bookForm.getTypeId()); + bookForm.setAuthor(bookForm.getAuthor()); + bookForm.setTranslator(bookForm.getTranslator()); + bookForm.setIsbn(bookForm.getIsbn()); + bookForm.setPrice(bookForm.getPrice()); + bookForm.setPage(bookForm.getPage()); + bookForm.setBookcaseid(bookForm.getBookcaseid()); + bookForm.setInTime(bookForm.getInTime()); + bookForm.setOperator(bookForm.getOperator()); + int ret=bookDAO.update(bookForm); //޸ͼϢķupdate() + if(ret==0){ + request.setAttribute("error","޸ͼϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); //תʾҳ + }else{ + return mapping.findForward("bookModify"); //ת޸ijɹҳ + } + } + /***********************ɾͼϢ**************************/ + private void bookDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookForm bookForm=(BookForm)form; + bookForm.setId(Integer.valueOf(request.getParameter("ID"))); + int ret=bookDAO.delete(bookForm); + if(ret==0){ + request.setAttribute("error","ɾͼϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("bookDel"); + } + } +} diff --git a/12/WebRoot/src/com/action/BookCase.java b/12/WebRoot/src/com/action/BookCase.java new file mode 100644 index 0000000..48aff08 --- /dev/null +++ b/12/WebRoot/src/com/action/BookCase.java @@ -0,0 +1,102 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.void; +import com.actionForm.BookCaseForm; +import org.apache.struts.action.Action; +import com.dao.BookCaseDAO; + +public class BookCase extends Action { + private BookCaseDAO bookCaseDAO=null; + public BookCase(){ + this.bookCaseDAO=new BookCaseDAO(); + } + public void execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String action =request.getParameter("action"); + System.out.println("\nbookCase*********************action="+action); + if(action==null||"".equals(action)){ + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if("bookCaseAdd".equals(action)){ + return bookCaseAdd(request,response); + }else if("bookCaseQuery".equals(action)){ + return bookCaseQuery(request,response); + }else if("bookCaseModifyQuery".equals(action)){ + return bookCaseModifyQuery(request,response); + }else if("bookCaseModify".equals(action)){ + return bookCaseModify(request,response); + }else if("bookCaseDel".equals(action)){ + return bookCaseDel(request,response); + } + request.setAttribute("error","ʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + /***********************Ϣ**************************/ + private void bookCaseAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookCaseForm bookCaseForm = (BookCaseForm) form; + System.out.println("servlet:"+request.getParameter("name")); + bookCaseForm.setName(bookCaseForm.getName()); + int a=bookCaseDAO.insert(bookCaseForm); + if(a==0){ + request.setAttribute("error","Ϣʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if(a==2){ + request.setAttribute("error","ϢѾӣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("bookcaseAdd"); + } + } + /***********************ѯȫϢ**************************/ + private void bookCaseQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + String str=null; + request.setAttribute("bookcase",bookCaseDAO.query(str)); + return mapping.findForward("bookcaseQuery"); + } + /***********************ѯ޸Ϣ**************************/ + private void bookCaseModifyQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookCaseForm bookCaseForm=(BookCaseForm)form; + bookCaseForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("bookCaseQueryif",bookCaseDAO.queryM(bookCaseForm)); + return mapping.findForward("bookCaseQueryModify"); + } + /***********************޸Ϣ**************************/ + private void bookCaseModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookCaseForm bookCaseForm=(BookCaseForm)form; + bookCaseForm.setName(request.getParameter("name")); + int ret=bookCaseDAO.update(bookCaseForm); + if(ret==0){ + request.setAttribute("error","޸Ϣʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("bookCaseModify"); + } + } + /***********************ɾϢ**************************/ + private void bookCaseDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response +){ + BookCaseForm bookCaseForm=(BookCaseForm)form; + bookCaseForm.setId(Integer.valueOf(request.getParameter("ID"))); + int ret=bookCaseDAO.delete(bookCaseForm); + if(ret==0){ + request.setAttribute("error","ɾϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("bookCaseDel"); + } + } +} diff --git a/12/WebRoot/src/com/action/BookType.java b/12/WebRoot/src/com/action/BookType.java new file mode 100644 index 0000000..e052338 --- /dev/null +++ b/12/WebRoot/src/com/action/BookType.java @@ -0,0 +1,104 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.void; +import com.actionForm.BookTypeForm; +import org.apache.struts.action.Action; +import com.dao.BookTypeDAO; + +public class BookType extends Action { + private BookTypeDAO bookTypeDAO = null; + public BookType() { + this.bookTypeDAO = new BookTypeDAO(); + } + public void execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + + String action =request.getParameter("action"); + System.out.println("\nbookType*********************action="+action); + if(action==null||"".equals(action)){ + request.setAttribute("error","IJ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if("bookTypeAdd".equals(action)){ + return bookTypeAdd(request,response); + }else if("bookTypeQuery".equals(action)){ + return bookTypeQuery(request,response); + }else if("bookTypeModifyQuery".equals(action)){ + return bookTypeModifyQuery(request,response); + }else if("bookTypeModify".equals(action)){ + return bookTypeModify(request,response); + }else if("bookTypeDel".equals(action)){ + return bookTypeDel(request,response); + } + request.setAttribute("error","ʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + /***********************ͼϢ**************************/ + private void bookTypeAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookTypeForm bookTypeForm = (BookTypeForm) form; + System.out.println("servlet:"+bookTypeForm.getTypeName()); + bookTypeForm.setTypeName(bookTypeForm.getTypeName()); + int a=bookTypeDAO.insert(bookTypeForm); + if(a==0){ + request.setAttribute("error","ͼϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if(a==2){ + request.setAttribute("error","ͼϢѾӣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("bookTypeAdd"); + } + } + /***********************ѯȫͼϢ**************************/ + private void bookTypeQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + String str=null; + request.setAttribute("bookType",bookTypeDAO.query(str)); + return mapping.findForward("bookTypeQuery"); + } + /***********************ѯ޸ͼϢ**************************/ + private void bookTypeModifyQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookTypeForm bookTypeForm=(BookTypeForm)form; + bookTypeForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("bookTypeQueryif",bookTypeDAO.queryM(bookTypeForm)); + return mapping.findForward("bookTypeQueryModify"); + } + /***********************޸ͼϢ**************************/ + private void bookTypeModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookTypeForm bookTypeForm=(BookTypeForm)form; + bookTypeForm.setTypeName(bookTypeForm.getTypeName()); + bookTypeForm.setDays(bookTypeForm.getDays()); + int ret=bookTypeDAO.update(bookTypeForm); + if(ret==0){ + request.setAttribute("error","޸ͼϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("bookTypeModify"); + } + } + /***********************ɾͼϢ**************************/ + private void bookTypeDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + BookTypeForm bookTypeForm=(BookTypeForm)form; + bookTypeForm.setId(Integer.valueOf(request.getParameter("ID"))); + int ret=bookTypeDAO.delete(bookTypeForm); + if(ret==0){ + request.setAttribute("error","ɾͼϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("bookTypeDel"); + } + } +} diff --git a/12/WebRoot/src/com/action/Borrow.java b/12/WebRoot/src/com/action/Borrow.java new file mode 100644 index 0000000..1177a13 --- /dev/null +++ b/12/WebRoot/src/com/action/Borrow.java @@ -0,0 +1,190 @@ +package com.action; + +import org.apache.struts.action.*; +import javax.servlet.http.*; +import com.dao.*; +import com.actionForm.*; + +public class Borrow extends Action { + /******************ڹ췽ʵBorrowӦõij־òĶ**************************/ + private BorrowDAO borrowDAO = null; + private ReaderDAO readerDAO=null; + private BookDAO bookDAO=null; + private ReaderForm readerForm=new ReaderForm(); + public Borrow() { + this.borrowDAO = new BorrowDAO(); + this.readerDAO=new ReaderDAO(); + this.bookDAO=new BookDAO(); + } + /******************************************************************************************/ + public void execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + BorrowForm borrowForm = (BorrowForm) form; + String action =request.getParameter("action"); + if(action==null||"".equals(action)){ + request.setAttribute("error","IJ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if("bookBorrowSort".equals(action)){ + return bookBorrowSort(request,response); + }else if("bookborrow".equals(action)){ + return bookborrow(request,response); //ͼ + }else if("bookrenew".equals(action)){ + return bookrenew(request,response); //ͼ + }else if("bookback".equals(action)){ + return bookback(request,response); //ͼ黹 + }else if("Bremind".equals(action)){ + return bremind(request,response); //ĵ + }else if("borrowQuery".equals(action)){ + return borrowQuery(request,response); //Ϣѯ + } + request.setAttribute("error","ʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + /*********************ͼ***********************/ + private void bookBorrowSort(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + request.setAttribute("bookBorrowSort",borrowDAO.bookBorrowSort()); + return mapping.findForward("bookBorrowSort"); + + } + /*********************ͼIJѯ***********************/ + private void borrowQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + String str=null; + String flag[]=request.getParameterValues("flag"); + if (flag!=null){ + String aa = flag[0]; + if ("a".equals(aa)) { + if (request.getParameter("f") != null) { + str = request.getParameter("f") + " like '%" + + request.getParameter("key") + "%'"; + } + } + if ("b".equals(aa)) { + String sdate = request.getParameter("sdate"); + String edate = request.getParameter("edate"); + if (sdate != null && edate != null) { + str = "borrowTime between '" + sdate + "' and '" + edate + + "'"; + } + System.out.println("" + str); + } + //ͬʱѡںвѯ + if (flag.length == 2) { + if (request.getParameter("f") != null) { + str = request.getParameter("f") + " like '%" + + request.getParameter("key") + "%'"; + } + System.out.println("ں"); + String sdate = request.getParameter("sdate"); + String edate = request.getParameter("edate"); + String str1 = null; + if (sdate != null && edate != null) { + str1 = "borrowTime between '" + sdate + "' and '" + edate + + "'"; + } + str = str + " and borr." + str1; + System.out.println("ڣ" + str); + } + } + request.setAttribute("borrowQuery",borrowDAO.borrowQuery(str)); + System.out.print("ѯͼϢʱstr:"+str); + return mapping.findForward("borrowQuery"); + } + /********************************************/ + private void bremind(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + request.setAttribute("Bremind",borrowDAO.bremind()); + return mapping.findForward("Bremind"); + } + + /*********************ͼ***********************/ + private void bookborrow(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + //ѯϢ + //ReaderForm readerForm=(ReaderForm)form; //˴һʹøת + readerForm.setBarcode(request.getParameter("barcode")); + ReaderForm reader = (ReaderForm) readerDAO.queryM(readerForm); + request.setAttribute("readerinfo", reader); + //ѯߵĽϢ + request.setAttribute("borrowinfo",borrowDAO.borrowinfo(request.getParameter("barcode"))); + //ɽ + String f = request.getParameter("f"); + String key = request.getParameter("inputkey"); + if (key != null && !key.equals("")) { + String operator = request.getParameter("operator"); + BookForm bookForm=bookDAO.queryB(f, key); + if (bookForm!=null){ + int ret = borrowDAO.insertBorrow(reader, bookDAO.queryB(f, key), + operator); + if (ret == 1) { + request.setAttribute("bar", request.getParameter("barcode")); + return mapping.findForward("bookborrowok"); + + } else { + request.setAttribute("error", "ӽϢʧ!"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + }else{ + request.setAttribute("error", "ûиͼ!"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + } + return mapping.findForward("bookborrow"); + } + /*********************ͼ̽***********************/ + private void bookrenew(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + //ѯϢ + readerForm.setBarcode(request.getParameter("barcode")); + ReaderForm reader = (ReaderForm) readerDAO.queryM(readerForm); + request.setAttribute("readerinfo", reader); + //ѯߵĽϢ + request.setAttribute("borrowinfo",borrowDAO.borrowinfo(request.getParameter("barcode"))); + if(request.getParameter("id")!=null){ + int id = Integer.parseInt(request.getParameter("id")); + if (id > 0) { //ִм̽ + int ret = borrowDAO.renew(id); + if (ret == 0) { + request.setAttribute("error", "ͼ̽ʧ!"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } else { + request.setAttribute("bar", request.getParameter("barcode")); + return mapping.findForward("bookrenewok"); + } + } + } + return mapping.findForward("bookrenew"); + } + /*********************ͼ黹***********************/ + private void bookback(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + //ѯϢ + readerForm.setBarcode(request.getParameter("barcode")); + ReaderForm reader = (ReaderForm) readerDAO.queryM(readerForm); + request.setAttribute("readerinfo", reader); + //ѯߵĽϢ + request.setAttribute("borrowinfo",borrowDAO.borrowinfo(request.getParameter("barcode"))); + if(request.getParameter("id")!=null){ + int id = Integer.parseInt(request.getParameter("id")); + String operator=request.getParameter("operator"); + if (id > 0) { //ִй黹 + int ret = borrowDAO.back(id,operator); + if (ret == 0) { + request.setAttribute("error", "ͼ黹ʧ!"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } else { + request.setAttribute("bar", request.getParameter("barcode")); + return mapping.findForward("bookbackok"); + } + } + } + return mapping.findForward("bookback"); + } +} diff --git a/12/WebRoot/src/com/action/Library.java b/12/WebRoot/src/com/action/Library.java new file mode 100644 index 0000000..a0cecb6 --- /dev/null +++ b/12/WebRoot/src/com/action/Library.java @@ -0,0 +1,60 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.void; +import com.dao.LibraryDAO; +import com.actionForm.LibraryForm; +import org.apache.struts.action.Action; + +public class Library extends Action { + LibraryDAO libraryDAO=null; + public Library(){ + libraryDAO=new LibraryDAO(); + } + public void execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + LibraryForm libraryForm=(LibraryForm) form; + String str=request.getParameter("action"); + if("libraryQuery".equals(str)){ + return libraryModifyQuery(request,response); + }else if("libraryModify".equals(str)){ + return libraryModify(request,response); + } + request.setAttribute("error","IJ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + private void libraryModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response +){ + LibraryForm libraryForm = (LibraryForm) form; + libraryForm.setId(libraryForm.getId()); + libraryForm.setLibraryname(libraryForm.getLibraryname()); + libraryForm.setCurator(libraryForm.getCurator()); + libraryForm.setTel(libraryForm.getTel()); + libraryForm.setAddress(libraryForm.getAddress()); + libraryForm.setEmail(libraryForm.getEmail()); + libraryForm.setUrl(libraryForm.getUrl()); + libraryForm.setCreateDate(libraryForm.getCreateDate()); + libraryForm.setIntroduce(libraryForm.getIntroduce()); + int ret = libraryDAO.update(libraryForm); + if (ret ==0) { + request.setAttribute("error", "ͼϢ޸ʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } else { + return mapping.findForward("librarymodify"); + } + + } + private void libraryModifyQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response +){ + request.setAttribute("libraryModifyif",libraryDAO.query()); + return mapping.findForward("librarymodifyQuery"); + } +} diff --git a/12/WebRoot/src/com/action/Manager.java b/12/WebRoot/src/com/action/Manager.java new file mode 100644 index 0000000..09da22b --- /dev/null +++ b/12/WebRoot/src/com/action/Manager.java @@ -0,0 +1,163 @@ +package com.action; + +import org.apache.struts.action.*; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import com.actionForm.ManagerForm; +import com.dao.ManagerDAO; +import javax.servlet.http.HttpSession; + +public class Manager extends Action { + private ManagerDAO managerDAO = null; + + public Manager() { + this.managerDAO = new ManagerDAO(); + } + + public void execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + String action = request.getParameter("action"); + System.out.println("ȡIJѯַ" + action); + if (action == null || "".equals(action)) { + request.getRequestDispatcher("error.jsp").forward(request, response); + } else if ("login".equals(action)) { + return managerLogin(mapping, form, request, response); + } else if ("managerAdd".equals(action)) { + return managerAdd(mapping, form, request, response); + } else if ("managerQuery".equals(action)) { + return managerQuery(mapping, form, request, response); + } else if ("managerModifyQuery".equals(action)) { + return managerModifyQuery(mapping, form, request, response); + } else if ("managerModify".equals(action)) { + return managerModify(mapping, form, request, response); + } else if ("managerDel".equals(action)) { + return managerDel(mapping, form, request, response); + } else if ("querypwd".equals(action)) { + return pwdQuery(mapping, form, request, response); + } else if ("modifypwd".equals(action)) { + return modifypwd(mapping, form, request, response); + } + request.setAttribute("error", "ʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + + // Ա֤ + + public void managerLogin(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + ManagerForm managerForm = (ManagerForm) form; + managerForm.setName(managerForm.getName()); + managerForm.setPwd(managerForm.getPwd()); + int ret = managerDAO.checkManager(managerForm); + System.out.print("֤retֵ:" + ret); + if (ret == 1) { + HttpSession session = request.getSession(); + session.setAttribute("manager", managerForm.getName()); + return mapping.findForward("managerLoginok"); + } else { + request.setAttribute("error", "ĹԱƻ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + } + + // ѯԱϢ + private void managerQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + String str = null; + request.setAttribute("managerQuery", managerDAO.query(str)); + return mapping.findForward("managerQuery"); + } + + // ӹԱϢ + private void managerAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + ManagerForm managerForm = (ManagerForm) form; + managerForm.setName(managerForm.getName()); // ȡùԱ + managerForm.setPwd(managerForm.getPwd()); // ȡ + int ret = managerDAO.insert(managerForm); // ӹԱϢ + if (ret == 1) { + return mapping.findForward("managerAdd"); // תԱϢӳɹҳ + } else if (ret == 2) { + request.setAttribute("error", "ùԱϢѾӣ"); // Ϣ浽error + request.getRequestDispatcher("error.jsp").forward(request, response); // תʾҳ + } else { + request.setAttribute("error", "ӹԱϢʧܣ"); // Ϣ浽error + request.getRequestDispatcher("error.jsp").forward(request, response); // תʾҳ + } + } + + // ѯ޸ĹԱϢ + private void managerModifyQuery(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + ManagerForm managerForm = (ManagerForm) form; + managerForm.setId(Integer.valueOf(request.getParameter("id")));//ȡùID + System.out.print("ѯid:" + request.getParameter("id")); + request.setAttribute("managerQueryif", managerDAO + .query_update(managerForm)); + return mapping.findForward("managerQueryModify"); //תȨóɹҳ + } + + // ޸ʱѯ + private void pwdQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + ManagerForm managerForm = (ManagerForm) form; + HttpSession session = request.getSession(); + String manager = (String) session.getAttribute("manager"); + managerForm.setName(manager); + System.out.print("ѯmanager:" + manager); + request.setAttribute("pwdQueryif", managerDAO.query_pwd(managerForm)); + return mapping.findForward("pwdQueryModify"); + } + + // ޸ĹԱϢ + private void managerModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + ManagerForm managerForm = (ManagerForm) form; + managerForm.setId(managerForm.getId()); //ȡùԱID + managerForm.setName(managerForm.getName()); //ȡùԱ + managerForm.setPwd(managerForm.getPwd()); //ȡùԱ + managerForm.setSysset(managerForm.getSysset()); //ȡϵͳȨ + managerForm.setReaderset(managerForm.getReaderset()); //ȡö߹Ȩ + managerForm.setBookset(managerForm.getBookset()); //ȡͼȨ + managerForm.setBorrowback(managerForm.getBorrowback()); //ȡͼ軹Ȩ + managerForm.setSysquery(managerForm.getSysquery()); //ȡϵͳѯȨ + int ret = managerDAO.update(managerForm); //ùԱȨ޵ķ + if (ret == 0) { + request.setAttribute("error", "ùԱȨʧܣ"); //ʾϢerror + request.getRequestDispatcher("error.jsp").forward(request, response); //תʾҳ + } else { + return mapping.findForward("managerModify"); //תȨóɹҳ + } + } + + + // ɾԱϢ + private void managerDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + ManagerForm managerForm = (ManagerForm) form; + managerForm.setId(Integer.valueOf(request.getParameter("id"))); //ȡùԱID + int ret = managerDAO.delete(managerForm); //ɾϢķdelete() + if (ret == 0) { + request.setAttribute("error", "ɾԱϢʧܣ"); //ʾϢerror + request.getRequestDispatcher("error.jsp").forward(request, response); //תʾҳ + } else { + return mapping.findForward("managerDel"); //תɾԱϢɹҳ + } + } + + // ޸ĹԱ + private void modifypwd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + ManagerForm managerForm = (ManagerForm) form; + managerForm.setName(managerForm.getName()); + managerForm.setPwd(managerForm.getPwd()); + int ret = managerDAO.updatePwd(managerForm); + if (ret == 0) { + request.setAttribute("error", "Ŀʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } else { + return mapping.findForward("pwdModify"); + } + } +} diff --git a/12/WebRoot/src/com/action/Parameter.java b/12/WebRoot/src/com/action/Parameter.java new file mode 100644 index 0000000..2d2b2b2 --- /dev/null +++ b/12/WebRoot/src/com/action/Parameter.java @@ -0,0 +1,54 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.void; +import com.actionForm.ParameterForm; +import com.dao.ParameterDAO; +import org.apache.struts.action.Action; + +public class Parameter extends Action { + ParameterDAO parameterDAO=null; + public Parameter(){ + parameterDAO=new ParameterDAO(); + } + public void execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + ParameterForm parameterForm=(ParameterForm) form; + String str=request.getParameter("action"); + if("parameterQuery".equals(str)){ + return parameterModifyQuery(request,response); + }else if("parameterModify".equals(str)){ + return parameterModify(request,response); + } + request.setAttribute("error","IJ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + private void parameterModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response +){ + ParameterForm parameterForm = (ParameterForm) form; + parameterForm.setId(parameterForm.getId()); + parameterForm.setCost(parameterForm.getCost()); + parameterForm.setValidity(parameterForm.getValidity()); + int ret = parameterDAO.update(parameterForm); + if (ret ==0) { + request.setAttribute("error", "Ϣ޸ʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } else { + return mapping.findForward("parametermodify"); + } + + } + private void parameterModifyQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response +){ + request.setAttribute("parameterModifyif",parameterDAO.query()); + return mapping.findForward("parametermodifyQuery"); + } +} diff --git a/12/WebRoot/src/com/action/Publishing.java b/12/WebRoot/src/com/action/Publishing.java new file mode 100644 index 0000000..8b999b3 --- /dev/null +++ b/12/WebRoot/src/com/action/Publishing.java @@ -0,0 +1,38 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.void; +import com.actionForm.PublishingForm; +import org.apache.struts.action.Action; +import com.dao.PublishingDAO; + +public class Publishing extends Action { + private PublishingDAO pubDAO = null; + public Publishing() { + this.pubDAO = new PublishingDAO(); + } + public void execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + PublishingForm publishingForm = (PublishingForm) form; + String action =request.getParameter("action"); + System.out.println("\npublishing**************action="+action); + if(action==null||"".equals(action)){ + request.setAttribute("error","IJ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if("pubQuery".equals(action)){ + return pubQuery(request,response); + } + request.setAttribute("error","ʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + /***********************ѯȫϢ**************************/ + private void pubQuery(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ + String str=null; + request.setAttribute("book",pubDAO.query(str)); + return mapping.findForward("pubQuery"); + } +} diff --git a/12/WebRoot/src/com/action/Reader.java b/12/WebRoot/src/com/action/Reader.java new file mode 100644 index 0000000..5aa5050 --- /dev/null +++ b/12/WebRoot/src/com/action/Reader.java @@ -0,0 +1,138 @@ +package com.action; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import com.actionForm.ReaderForm; +import org.apache.struts.action.*; +import com.dao.ReaderDAO; +import java.util.Date; + +public class Reader extends Action { + private ReaderDAO readerDAO = null; + public Reader() { + this.readerDAO = new ReaderDAO(); + } + + public void execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String action =request.getParameter("action"); + System.out.println("\nreader*********************action="+action); + if(action==null||"".equals(action)){ + request.setAttribute("error","IJ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if("readerAdd".equals(action)){ + return readerAdd(request,response); + }else if("readerQuery".equals(action)){ + return readerQuery(request,response); + }else if("readerModifyQuery".equals(action)){ + return readerModifyQuery(request,response); + }else if("readerModify".equals(action)){ + return readerModify(request,response); + }else if("readerDel".equals(action)){ + return readerDel(request,response); + }else if("readerDetail".equals(action)){ + return readerDetail(request,response); + } + request.setAttribute("error","ʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + /***********************ӶϢ**************************/ + private void readerAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + ReaderForm readerForm = (ReaderForm) form; + readerForm.setName(readerForm.getName()); + readerForm.setSex(readerForm.getSex()); + readerForm.setBarcode(readerForm.getBarcode()); + readerForm.setVocation(readerForm.getVocation()); + readerForm.setBirthday(readerForm.getBirthday()); + readerForm.setPaperType(readerForm.getPaperType()); + readerForm.setPaperNO(readerForm.getPaperNO()); + readerForm.setTel(readerForm.getTel()); + readerForm.setEmail(readerForm.getEmail()); + //ȡϵͳ + Date date1=new Date(); + java.sql.Date date=new java.sql.Date(date1.getTime()); + readerForm.setCreateDate(date.toString()); + readerForm.setOperator(readerForm.getOperator()); + readerForm.setRemark(readerForm.getRemark()); + readerForm.setTypeid(readerForm.getTypeid()); + int a=readerDAO.insert(readerForm); + if(a==0){ + request.setAttribute("error","Ϣʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if(a==2){ + request.setAttribute("error","öϢѾӣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("readerAdd"); + } + } + /***********************ѯȫϢ**************************/ + private void readerQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + String str=null; + request.setAttribute("reader",readerDAO.query(str)); + return mapping.findForward("readerQuery"); + } + /***********************ѯ޸ĶϢ**************************/ + private void readerModifyQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + ReaderForm readerForm=(ReaderForm)form; + System.out.println("ѯ޸ĶϢ"+request.getParameter("ID")); + readerForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("readerQueryif",readerDAO.queryM(readerForm)); + return mapping.findForward("readerQueryModify"); + } + /***********************ѯϸϢ**************************/ + private void readerDetail(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + ReaderForm readerForm=(ReaderForm)form; + readerForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("readerDetail",readerDAO.queryM(readerForm)); + return mapping.findForward("readerDeatil"); + } + /***********************޸ĶϢ**************************/ + private void readerModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + ReaderForm readerForm=(ReaderForm)form; + readerForm.setName(readerForm.getName()); + readerForm.setSex(readerForm.getSex()); + readerForm.setBarcode(readerForm.getBarcode()); + readerForm.setVocation(readerForm.getVocation()); + readerForm.setBirthday(readerForm.getBirthday()); + readerForm.setPaperType(readerForm.getPaperType()); + readerForm.setPaperNO(readerForm.getPaperNO()); + readerForm.setTel(readerForm.getTel()); + readerForm.setEmail(readerForm.getEmail()); + readerForm.setOperator(readerForm.getOperator()); + readerForm.setRemark(readerForm.getRemark()); + readerForm.setTypeid(readerForm.getTypeid()); + int ret=readerDAO.update(readerForm); + if(ret==0){ + request.setAttribute("error","޸ĶϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("readerModify"); + } + } + /***********************ɾϢ**************************/ + private void readerDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + ReaderForm readerForm=(ReaderForm)form; + readerForm.setId(Integer.valueOf(request.getParameter("ID"))); + int ret=readerDAO.delete(readerForm); + if(ret==0){ + request.setAttribute("error","ɾϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("readerDel"); + } + } +} diff --git a/12/WebRoot/src/com/action/ReaderType.java b/12/WebRoot/src/com/action/ReaderType.java new file mode 100644 index 0000000..df2d8bc --- /dev/null +++ b/12/WebRoot/src/com/action/ReaderType.java @@ -0,0 +1,104 @@ +package com.action; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionForm; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.struts.action.void; +import com.actionForm.ReaderTypeForm; +import org.apache.struts.action.Action; +import com.dao.ReaderTypeDAO; + +public class ReaderType extends Action { + private ReaderTypeDAO readerTypeDAO = null; + public ReaderType() { + this.readerTypeDAO = new ReaderTypeDAO(); + } + + public void execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) { + String action =request.getParameter("action"); + System.out.println("\nreaderType*********************action="+action); + if(action==null||"".equals(action)){ + request.setAttribute("error","IJ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if("readerTypeAdd".equals(action)){ + return readerTypeAdd(request,response); + }else if("readerTypeQuery".equals(action)){ + return readerTypeQuery(request,response); + }else if("readerTypeModifyQuery".equals(action)){ + return readerTypeModifyQuery(request,response); + }else if("readerTypeModify".equals(action)){ + return readerTypeModify(request,response); + }else if("readerTypeDel".equals(action)){ + return readerTypeDel(request,response); + } + request.setAttribute("error","ʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + /***********************ӶϢ**************************/ + private void readerTypeAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + ReaderTypeForm readerTypeForm = (ReaderTypeForm) form; + System.out.println("servlet:"+request.getParameter("name")); + readerTypeForm.setName(readerTypeForm.getName()); + int a=readerTypeDAO.insert(readerTypeForm); + if(a==0){ + request.setAttribute("error","Ϣʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if(a==2){ + request.setAttribute("error","öϢѾӣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("readerTypeAdd"); + } + } + /***********************ѯȫϢ**************************/ + private void readerTypeQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + String str=null; + request.setAttribute("readerType",readerTypeDAO.query(str)); + return mapping.findForward("readerTypeQuery"); + } + /***********************ѯ޸ĶϢ**************************/ + private void readerTypeModifyQuery(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + ReaderTypeForm readerTypeForm=(ReaderTypeForm)form; + readerTypeForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("readerTypeQueryif",readerTypeDAO.queryM(readerTypeForm)); + return mapping.findForward("readerTypeQueryModify"); + } + /***********************޸ĶϢ**************************/ + private void readerTypeModify(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + ReaderTypeForm readerTypeForm=(ReaderTypeForm)form; + readerTypeForm.setName(readerTypeForm.getName()); + readerTypeForm.setNumber(readerTypeForm.getNumber()); + int ret=readerTypeDAO.update(readerTypeForm); + if(ret==0){ + request.setAttribute("error","޸ĶϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("readerTypeModify"); + } + } + /***********************ɾϢ**************************/ + private void readerTypeDel(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response){ + ReaderTypeForm readerTypeForm=(ReaderTypeForm)form; + readerTypeForm.setId(Integer.valueOf(request.getParameter("ID"))); + int ret=readerTypeDAO.delete(readerTypeForm); + if(ret==0){ + request.setAttribute("error","ɾϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + return mapping.findForward("readerTypeDel"); + } + } +} diff --git a/12/WebRoot/src/com/actionForm/BookCaseForm.java b/12/WebRoot/src/com/actionForm/BookCaseForm.java new file mode 100644 index 0000000..94b6993 --- /dev/null +++ b/12/WebRoot/src/com/actionForm/BookCaseForm.java @@ -0,0 +1,27 @@ +package com.actionForm; + +import org.apache.struts.action.ActionForm; + +public class BookCaseForm{ + private Integer id; + private String name; + //췽 + public BookCaseForm(){ + } + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + +} diff --git a/12/WebRoot/src/com/actionForm/BookForm.java b/12/WebRoot/src/com/actionForm/BookForm.java new file mode 100644 index 0000000..857fbaa --- /dev/null +++ b/12/WebRoot/src/com/actionForm/BookForm.java @@ -0,0 +1,164 @@ +package com.actionForm; + +import org.apache.struts.action.ActionForm; + +public class BookForm{ + private String author; + private String barcode; + private String bookName; + private String bookcaseName; + private int bookcaseid; + private int days; + private int del; + private Integer id; + private String inTime; + private String isbn; + private String operator; + private int page; + private Float price; + private String publishing; + + private String translator; + private int typeId; + private String typeName; + public BookForm(){ + } + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public void setTypeName(String typeName) { + this.typeName = typeName; + } + + public void setTypeId(int typeId) { + this.typeId = typeId; + } + + public void setTranslator(String translator) { + this.translator = translator; + } + + + public void setPublishing(String publishing) { + this.publishing = publishing; + } + + public void setPrice(Float price) { + this.price = price; + } + + public void setPage(int page) { + this.page = page; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public void setIsbn(String isbn) { + this.isbn = isbn; + } + + public void setInTime(String inTime) { + this.inTime = inTime; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setDel(int del) { + this.del = del; + } + + public void setDays(int days) { + this.days = days; + } + + public void setBookcaseid(int bookcaseid) { + this.bookcaseid = bookcaseid; + } + + public void setBookcaseName(String bookcaseName) { + this.bookcaseName = bookcaseName; + } + + public void setBookName(String bookName) { + this.bookName = bookName; + } + + public void setBarcode(String barcode) { + this.barcode = barcode; + } + + public String getBarcode() { + return barcode; + } + + public String getBookName() { + return bookName; + } + + public String getBookcaseName() { + return bookcaseName; + } + + public int getBookcaseid() { + return bookcaseid; + } + + public int getDays() { + return days; + } + + public int getDel() { + return del; + } + + public Integer getId() { + return id; + } + + public String getInTime() { + return inTime; + } + + public String getIsbn() { + return isbn; + } + + public String getOperator() { + return operator; + } + + public int getPage() { + return page; + } + + public Float getPrice() { + return price; + } + + public String getPublishing() { + return publishing; + } + + + public String getTranslator() { + return translator; + } + + public int getTypeId() { + return typeId; + } + + public String getTypeName() { + return typeName; + } + +} diff --git a/12/WebRoot/src/com/actionForm/BookTypeForm.java b/12/WebRoot/src/com/actionForm/BookTypeForm.java new file mode 100644 index 0000000..89ab8d4 --- /dev/null +++ b/12/WebRoot/src/com/actionForm/BookTypeForm.java @@ -0,0 +1,34 @@ +package com.actionForm; + +import org.apache.struts.action.ActionForm; + +public class BookTypeForm extends ActionForm { + private int days; + private Integer id; + private String typeName; + + public void setTypeName(String typeName) { + this.typeName = typeName; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setDays(int days) { + this.days = days; + } + + public int getDays() { + return days; + } + + public Integer getId() { + return id; + } + + public String getTypeName() { + return typeName; + } + +} diff --git a/12/WebRoot/src/com/actionForm/BorrowForm.java b/12/WebRoot/src/com/actionForm/BorrowForm.java new file mode 100644 index 0000000..0611fe2 --- /dev/null +++ b/12/WebRoot/src/com/actionForm/BorrowForm.java @@ -0,0 +1,192 @@ +package com.actionForm; + +public class BorrowForm{ + private String backTime; + private String bookBarcode; + private int bookId; + private String bookName; + private String bookcaseName; + private String borrowTime; + private Integer id; + private int ifBack; + private String operator; + private Float price; + private String pubName; + private String readerBarcode; + private int readerId; + private int degree; + private String author; + + private String bookType; + private String readerName; + private String sex; + private String birthday; + private String paperType; + private String paperNo; + private String tel; + private String readerType; + public String getBackTime() { + return backTime; + } + + public void setBackTime(String backTime) { + this.backTime = backTime; + } + + public void setReaderId(int readerId) { + this.readerId = readerId; + } + + public void setReaderBarcode(String readerBarcode) { + this.readerBarcode = readerBarcode; + } + + public void setPubName(String pubName) { + this.pubName = pubName; + } + + public void setPrice(Float price) { + this.price = price; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public void setIfBack(int ifBack) { + this.ifBack = ifBack; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setBorrowTime(String borrowTime) { + this.borrowTime = borrowTime; + } + + public void setBookcaseName(String bookcaseName) { + this.bookcaseName = bookcaseName; + } + + public void setBookName(String bookName) { + this.bookName = bookName; + } + + public void setBookId(int bookId) { + this.bookId = bookId; + } + + public void setBookBarcode(String bookBarcode) { + this.bookBarcode = bookBarcode; + } + public void setDegree(int degree) { + this.degree=degree; + } + + public String getBookBarcode() { + return bookBarcode; + } + + public int getBookId() { + return bookId; + } + + public String getBookName() { + return bookName; + } + + public String getBookcaseName() { + return bookcaseName; + } + + public String getBorrowTime() { + return borrowTime; + } + + public Integer getId() { + return id; + } + + public int getIfBack() { + return ifBack; + } + + public String getOperator() { + return operator; + } + + public Float getPrice() { + return price; + } + + public String getPubName() { + return pubName; + } + + public String getReaderBarcode() { + return readerBarcode; + } + + public int getReaderId() { + return readerId; + } + public int getDegree() { + return degree; + } + public void setAuthor(String author) { + this.author = author; + } + public String getAuthor() { + return author; + } + + public void setBookType(String bookType) { + this.bookType = bookType; + } + public String getBookType() { + return bookType; + } + public void setReaderName(String readerName) { + this.readerName = readerName; + } + public String getReaderName() { + return readerName; + } + public void setSex(String sex) { + this.sex = sex; + } + public String getSex() { + return sex; + } + public void setBirthday(String birthday) { + this.birthday = birthday; + } + public String getBirthday() { + return birthday; + } + public void setPaperType(String paperType) { + this.paperType = paperType; + } + public String getPaperType() { + return paperType; + } + public void setPaperNo(String paperNo) { + this.paperNo = paperNo; + } + public String getPaperNo() { + return paperNo; + } + public void setTel(String tel) { + this.tel = tel; + } + public String getTel() { + return tel; + } + public void setReaderType(String readerType) { + this.readerType =readerType; + } + public String getReaderType() { + return readerType; + } +} diff --git a/12/WebRoot/src/com/actionForm/LibraryForm.java b/12/WebRoot/src/com/actionForm/LibraryForm.java new file mode 100644 index 0000000..ab09165 --- /dev/null +++ b/12/WebRoot/src/com/actionForm/LibraryForm.java @@ -0,0 +1,87 @@ +package com.actionForm; + +public class LibraryForm{ + private String address; + private String curator; + private String email; + private Integer id; + private String introduce; + private String libraryname; + private String tel; + private String createDate; + private String url; + public LibraryForm(){ + } + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public void setUrl(String url) { + this.url = url; + } + + public void setCreateDate(String createDate) { + this.createDate = createDate; + } + + public void setTel(String tel) { + this.tel = tel; + } + + public void setLibraryname(String libraryname) { + this.libraryname = libraryname; + } + + public void setIntroduce(String introduce) { + this.introduce = introduce; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setEmail(String email) { + this.email = email; + } + + public void setCurator(String curator) { + this.curator = curator; + } + + public String getCurator() { + return curator; + } + + public String getEmail() { + return email; + } + + public Integer getId() { + return id; + } + + public String getIntroduce() { + return introduce; + } + + public String getLibraryname() { + return libraryname; + } + + public String getTel() { + return tel; + } + + public String getCreateDate() { + return createDate; + } + + public String getUrl() { + return url; + } + +} diff --git a/12/WebRoot/src/com/actionForm/ManagerForm.java b/12/WebRoot/src/com/actionForm/ManagerForm.java new file mode 100644 index 0000000..ea4f047 --- /dev/null +++ b/12/WebRoot/src/com/actionForm/ManagerForm.java @@ -0,0 +1,67 @@ +package com.actionForm; + + +public class ManagerForm{ + private Integer id=new Integer(-1); //ԱID + private String name=""; //Ա + private String pwd=""; //Ա + private int sysset=0; //ϵͳȨ + private int readerset=0; //߹Ȩ + private int bookset=0; //ͼȨ + private int borrowback=0; //ͼ軹Ȩ + private int sysquery=0; //ϵͳѯȨ + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setPwd(String pwd) { + this.pwd = pwd; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public String getPwd() { + return pwd; + } + + public void setSysset(int sysset){ + this.sysset=sysset; + } + public int getSysset(){ + return sysset; + } + public int getReaderset(){ + return readerset; + } + public void setReaderset(int readerset){ + this.readerset=readerset; + } + public void setBookset(int bookset){ + this.bookset=bookset; + } + public int getBookset(){ + return bookset; + } + public void setBorrowback(int borrowback){ + this.borrowback=borrowback; + } + public int getBorrowback(){ + return borrowback; + } + public void setSysquery(int sysquery){ + this.sysquery=sysquery; + } + public int getSysquery(){ + return sysquery; + } +} diff --git a/12/WebRoot/src/com/actionForm/ParameterForm.java b/12/WebRoot/src/com/actionForm/ParameterForm.java new file mode 100644 index 0000000..0b44b5c --- /dev/null +++ b/12/WebRoot/src/com/actionForm/ParameterForm.java @@ -0,0 +1,32 @@ +package com.actionForm; + +public class ParameterForm{ + private int cost; + private Integer id; + private int validity; + public ParameterForm(){ + } + public int getCost() { + return cost; + } + + public void setCost(int cost) { + this.cost = cost; + } + + public void setValidity(int validity) { + this.validity = validity; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getId() { + return id; + } + + public int getValidity() { + return validity; + } +} diff --git a/12/WebRoot/src/com/actionForm/PublishingForm.java b/12/WebRoot/src/com/actionForm/PublishingForm.java new file mode 100644 index 0000000..03e7728 --- /dev/null +++ b/12/WebRoot/src/com/actionForm/PublishingForm.java @@ -0,0 +1,21 @@ +package com.actionForm; + +public class PublishingForm{ + private String isbn; + private String pubname; + public String getIsbn() { + return isbn; + } + + public void setIsbn(String isbn) { + this.isbn = isbn; + } + + public void setPubname(String pubname) { + this.pubname = pubname; + } + + public String getPubname() { + return pubname; + } +} diff --git a/12/WebRoot/src/com/actionForm/ReaderForm.java b/12/WebRoot/src/com/actionForm/ReaderForm.java new file mode 100644 index 0000000..e09eb2e --- /dev/null +++ b/12/WebRoot/src/com/actionForm/ReaderForm.java @@ -0,0 +1,145 @@ +package com.actionForm; + +public class ReaderForm{ + private String barcode; + private String birthday; + private String createDate; + private String email; + private Integer id; + private String name; + private String operator; + private String paperNO; + private String paperType; + private String remark; + private String sex; + private String tel; + private String vocation; + private int typeid; + private String typename; + private int number; + public ReaderForm(){ + } + public String getBarcode() { + return barcode; + } + + public void setBarcode(String barcode) { + this.barcode = barcode; + } + + public void setVocation(String vocation) { + this.vocation = vocation; + } + + public void setTel(String tel) { + this.tel = tel; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public void setPaperType(String paperType) { + this.paperType = paperType; + } + + public void setPaperNO(String paperNO) { + this.paperNO = paperNO; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public void setName(String name) { + this.name = name; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setEmail(String email) { + this.email = email; + } + + public void setCreateDate(String createDate) { + this.createDate = createDate; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getBirthday() { + return birthday; + } + + public String getCreateDate() { + return createDate; + } + + public String getEmail() { + return email; + } + + public Integer getId() { + return id; + } + + public String getName() { + return name; + } + + public String getOperator() { + return operator; + } + + public String getPaperNO() { + return paperNO; + } + + public String getPaperType() { + return paperType; + } + + public String getRemark() { + return remark; + } + + public String getSex() { + return sex; + } + + public String getTel() { + return tel; + } + + public String getVocation() { + return vocation; + } + public int getTypeid(){ + return typeid; + } + + public void setTypeid(int typeid){ + this.typeid=typeid; + } + public int getNumber(){ + return number; + } + + public void setNumber(int number){ + this.number=number; + } + public String getTypename() { + return typename; + } + public void setTypename(String typename){ + this.typename=typename; + } +} diff --git a/12/WebRoot/src/com/actionForm/ReaderTypeForm.java b/12/WebRoot/src/com/actionForm/ReaderTypeForm.java new file mode 100644 index 0000000..8d221cc --- /dev/null +++ b/12/WebRoot/src/com/actionForm/ReaderTypeForm.java @@ -0,0 +1,33 @@ +package com.actionForm; + +public class ReaderTypeForm{ + private Integer id; + private String name; + private int number; + public ReaderTypeForm(){ + } + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public void setNumber(int number) { + this.number = number; + } + + public int getNumber() { + return number; + } + +} diff --git a/12/WebRoot/src/com/connDB.properties b/12/WebRoot/src/com/connDB.properties new file mode 100644 index 0000000..bcbf3f5 --- /dev/null +++ b/12/WebRoot/src/com/connDB.properties @@ -0,0 +1,5 @@ +#DB_CLASS_NAME( +DB_CLASS_NAME=com.mysql.jdbc.Driver + +#DB_URLҪݿĵַ +DB_URL=jdbc:mysql://127.0.0.1:3306/db_librarySys?user=root&password=111&useUnicode=true diff --git a/12/WebRoot/src/com/core/ChStr.java b/12/WebRoot/src/com/core/ChStr.java new file mode 100644 index 0000000..4dda4bb --- /dev/null +++ b/12/WebRoot/src/com/core/ChStr.java @@ -0,0 +1,37 @@ +package com.core; + +public class ChStr { + public static String toChinese(String strvalue) { + try { + if (strvalue == null) { //strvalueΪnullʱ + strvalue=""; //strvalueֵΪ + } else { + strvalue = new String(strvalue.getBytes("ISO8859_1"), "GBK"); //ַתΪGBK + strvalue = strvalue.trim(); //ȥַβո + } + } catch (Exception e) { + strvalue=""; //strvalueֵΪ + } + return strvalue; //תstrvalue + } + + // ַеĿֵ + public static final String nullToString(String v, String toV) { + if (v == null || "".equals(v)) { //vΪʱ + v = toV; //vֵΪtoV + } + return v; //תv + } + //Σַ + public static final String filterStr(String str){ + str=str.replaceAll(";",""); + str=str.replaceAll("&","&"); + str=str.replaceAll("<","<"); + str=str.replaceAll(">",">"); + str=str.replaceAll("'",""); + str=str.replaceAll("--"," "); + str=str.replaceAll("/",""); + str=str.replaceAll("%",""); + return str; + } +} diff --git a/12/WebRoot/src/com/core/ConnDB.java b/12/WebRoot/src/com/core/ConnDB.java new file mode 100644 index 0000000..e4d4f8d --- /dev/null +++ b/12/WebRoot/src/com/core/ConnDB.java @@ -0,0 +1,95 @@ +package com.core; + +import java.io.InputStream; +import java.sql.*; +import java.util.Properties; + +public class ConnDB { + public Connection conn = null; + public Statement stmt = null; + public ResultSet rs = null; + private static String propFileName = "/com/connDB.properties"; //ָԴļλ + private static Properties prop = new Properties(); + private static String dbClassName ="com.mysql.jdbc.Driver"; + private static String dbUrl = + "jdbc:mysql://127.0.0.1:3306/db_librarySys?user=root&password=111&useUnicode=true"; + public ConnDB(){ + try { + InputStream in=getClass().getResourceAsStream(propFileName); + prop.load(in); //ͨPropertiesļ + dbClassName = prop.getProperty("DB_CLASS_NAME"); //ȡݿ + dbUrl = prop.getProperty("DB_URL", + "jdbc:mysql://127.0.0.1:3306/db_librarySys?user=root&password=111&useUnicode=true"); + } + catch (Exception e) { + e.printStackTrace(); //쳣Ϣ + } + } + + public static Connection getConnection() { + Connection conn = null; + try { + Class.forName(dbClassName).newInstance(); + conn = DriverManager.getConnection(dbUrl); + } + catch (Exception ee) { + ee.printStackTrace(); + } + if (conn == null) { + System.err.println( + ": DbConnectionManager.getConnection() ݿʧ.\r\n\r\n:" + + dbClassName + "\r\nλ:" + dbUrl); + } + return conn; + } + + /* + * ܣִвѯ + */ + public ResultSet executeQuery(String sql) { + try { + conn = getConnection(); + stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = stmt.executeQuery(sql); + } catch (SQLException ex) { + System.err.println(ex.getMessage()); + } + return rs; + } + + /* + * :ִи² + */ + public int executeUpdate(String sql) { + int result = 0; + try { + conn = getConnection(); //getConnection()Connectionһʵconn + stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + result = stmt.executeUpdate(sql); //ִи² + } catch (SQLException ex) { + result = 0; + } + return result; + } + + /* + * :رݿ + */ + public void close() { + try { + if (rs != null) { + rs.close(); + } + if (stmt != null) { + stmt.close(); + } + if (conn != null) { + conn.close(); + } + } catch (Exception e) { + e.printStackTrace(System.err); + } + } +} diff --git a/12/WebRoot/src/com/dao/BookCaseDAO.java b/12/WebRoot/src/com/dao/BookCaseDAO.java new file mode 100644 index 0000000..591f701 --- /dev/null +++ b/12/WebRoot/src/com/dao/BookCaseDAO.java @@ -0,0 +1,97 @@ +package com.dao; + +import com.core.ConnDB; +import com.actionForm.BookCaseForm; +import java.util.*; +import java.sql.*; + +public class BookCaseDAO { + private ConnDB conn=new ConnDB(); + //ѯ + public Collection query(String strif){ + BookCaseForm bookCaseForm1=null; + Collection bookcaseColl=new ArrayList(); + String sql=""; + if(strif!="all" && strif!=null && strif!=""){ + sql="select * from tb_bookcase where "+strif+""; + }else{ + sql="select * from tb_bookcase"; + } + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + bookCaseForm1=new BookCaseForm(); + bookCaseForm1.setId(Integer.valueOf(rs.getString(1))); + bookCaseForm1.setName(rs.getString(2)); + bookcaseColl.add(bookCaseForm1); + } + } catch (SQLException ex) { + } + conn.close(); + return bookcaseColl; + } + //޸ĵIJѯ + public BookCaseForm queryM(BookCaseForm bookCaseForm){ + BookCaseForm bookCaseForm1=null; + String sql="select * from tb_bookcase where id="+bookCaseForm.getId()+""; + System.out.println("޸ʱSQL"+sql); + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + bookCaseForm1=new BookCaseForm(); + bookCaseForm1.setId(Integer.valueOf(rs.getString(1))); + bookCaseForm1.setName(rs.getString(2)); + } + } catch (SQLException ex) { + } + conn.close(); + return bookCaseForm1; + } + // + public int insert(BookCaseForm bookCaseForm){ + String sql1="SELECT * FROM tb_bookcase WHERE name='"+bookCaseForm.getName()+"'"; + ResultSet rs = conn.executeQuery(sql1); + String sql = ""; + int falg = 0; + try { + if (rs.next()) { + falg = 2; + } else { + sql ="Insert into tb_bookcase (name) values('"+bookCaseForm.getName()+"')"; + falg = conn.executeUpdate(sql); + System.out.println("ϢSQL" + sql); + conn.close(); + } + } catch (SQLException ex) { + falg = 0; + } + System.out.println("falg:"+falg); + return falg; +} + + //޸ + public int update(BookCaseForm bookCaseForm){ + String sql="Update tb_bookcase set name='"+bookCaseForm.getName()+"' where id="+bookCaseForm.getId()+""; + int falg=conn.executeUpdate(sql); + System.out.println("޸ʱSQL"+sql); + conn.close(); + return falg; +} + //ɾ + public int delete(BookCaseForm bookCaseForm){ + String sql_1="SELECT * FROM tb_bookcase WHERE bookcase="+bookCaseForm.getId()+""; + ResultSet rs=conn.executeQuery(sql_1); + int falg=0; + try { + if(!rs.next()){ + String sql="Delete from tb_bookcase where id="+bookCaseForm.getId()+""; + falg=conn.executeUpdate(sql); + System.out.println("ɾʱSQL"+sql); + } + } catch (Exception e) { + e.printStackTrace(); + } + return falg; + } + +} diff --git a/12/WebRoot/src/com/dao/BookDAO.java b/12/WebRoot/src/com/dao/BookDAO.java new file mode 100644 index 0000000..af767d6 --- /dev/null +++ b/12/WebRoot/src/com/dao/BookDAO.java @@ -0,0 +1,155 @@ +package com.dao; +import com.core.ConnDB; +import java.sql.*; +import java.util.*; +import com.actionForm.BookForm; + +public class BookDAO { + private ConnDB conn=new ConnDB(); +//ѯ +public Collection query(String strif){ +BookForm bookForm=null; +Collection bookColl=new ArrayList(); +String sql=""; +if(strif!="all" && strif!=null && strif!=""){ + sql="select * from (select b.*,c.name as bookcaseName,p.pubname as publishing,t.typename from tb_bookinfo b left join tb_bookcase c on b.bookcase=c.id join tb_publishing p on b.ISBN=p.ISBN join tb_booktype t on b.typeid=t.id where b.del=0) as book where book."+strif+"'"; +}else{ + sql="select b.*,c.name as bookcaseName,p.pubname as publishing,t.typename from tb_bookinfo b left join tb_bookcase c on b.bookcase=c.id join tb_publishing p on b.ISBN=p.ISBN join tb_booktype t on b.typeid=t.id where b.del=0"; +} +System.out.println("ͼѯʱSQL"+sql); +ResultSet rs=conn.executeQuery(sql); +try { + while (rs.next()) { + bookForm=new BookForm(); + bookForm.setBarcode(rs.getString(1)); + bookForm.setBookName(rs.getString(2)); + bookForm.setTypeId(rs.getInt(3)); + bookForm.setAuthor(rs.getString(4)); + bookForm.setTranslator(rs.getString(5)); + bookForm.setIsbn(rs.getString(6)); + bookForm.setPrice(Float.valueOf(rs.getString(7))); //˴ת + bookForm.setPage(rs.getInt(8)); + bookForm.setBookcaseid(rs.getInt(9)); + bookForm.setInTime(rs.getString(10)); + bookForm.setOperator(rs.getString(11)); + bookForm.setDel(rs.getInt(12)); + bookForm.setId(Integer.valueOf(rs.getString(13))); + bookForm.setBookcaseName(rs.getString(14)); + bookForm.setPublishing(rs.getString(15)); + bookForm.setTypeName(rs.getString(16)); + bookColl.add(bookForm); + } +} catch (SQLException ex) { + ex.printStackTrace(); +} +conn.close(); +return bookColl; +} +//޸ĵIJѯ +public BookForm queryM(BookForm bookForm1){ +BookForm bookForm=null; +String sql="select b.*,c.name as bookcaseName,p.pubname as publishing,t.typename from tb_bookinfo b left join tb_bookcase c on b.bookcase=c.id join tb_publishing p on b.ISBN=p.ISBN join tb_booktype t on b.typeid=t.id where b.id="+bookForm1.getId()+""; +System.out.println("޸ʱSQL"+sql); +ResultSet rs=conn.executeQuery(sql); +try { + while (rs.next()) { + bookForm=new BookForm(); + bookForm.setBarcode(rs.getString(1)); + bookForm.setBookName(rs.getString(2)); + bookForm.setTypeId(rs.getInt(3)); + bookForm.setAuthor(rs.getString(4)); + bookForm.setTranslator(rs.getString(5)); + bookForm.setIsbn(rs.getString(6)); + bookForm.setPrice(Float.valueOf(rs.getString(7))); //˴ת + bookForm.setPage(rs.getInt(8)); + bookForm.setBookcaseid(rs.getInt(9)); + bookForm.setInTime(rs.getString(10)); + bookForm.setOperator(rs.getString(11)); + bookForm.setDel(rs.getInt(12)); + bookForm.setId(Integer.valueOf(rs.getString(13))); + bookForm.setBookcaseName(rs.getString(14)); + bookForm.setPublishing(rs.getString(15)); + bookForm.setTypeName(rs.getString(16)); + } +} catch (SQLException ex) { +} +conn.close(); +return bookForm; +} + //ڽĵIJѯ + public BookForm queryB(String f,String key){ + BookForm bookForm=null; + String sql="select b.*,c.name as bookcaseName,p.pubname as publishing,t.typename from tb_bookinfo b left join tb_bookcase c on b.bookcase=c.id join tb_publishing p on b.ISBN=p.ISBN join tb_booktype t on b.typeid=t.id where b."+f+"='"+key+"'"; + System.out.println("ѯϢʱSQL"+sql); + ResultSet rs=conn.executeQuery(sql); + try { + if (rs.next()) { + bookForm=new BookForm(); + bookForm.setBarcode(rs.getString(1)); + bookForm.setBookName(rs.getString(2)); + bookForm.setTypeId(rs.getInt(3)); + bookForm.setAuthor(rs.getString(4)); + bookForm.setTranslator(rs.getString(5)); + bookForm.setIsbn(rs.getString(6)); + bookForm.setPrice(Float.valueOf(rs.getString(7))); //˴ת + bookForm.setPage(rs.getInt(8)); + bookForm.setBookcaseid(rs.getInt(9)); + bookForm.setInTime(rs.getString(10)); + bookForm.setOperator(rs.getString(11)); + bookForm.setDel(rs.getInt(12)); + bookForm.setId(Integer.valueOf(rs.getString(13))); + bookForm.setBookcaseName(rs.getString(14)); + bookForm.setPublishing(rs.getString(15)); + bookForm.setTypeName(rs.getString(16)); + } + } catch (SQLException ex) { + } + conn.close(); + return bookForm; + } + +// +public int insert(BookForm bookForm){ +String sql1="SELECT * FROM tb_bookinfo WHERE barcode='"+bookForm.getBarcode()+"' or bookname='"+bookForm.getBookName()+"'"; +ResultSet rs = conn.executeQuery(sql1); +String sql = ""; +int falg = 0; +try { +if (rs.next()) { + falg = 2; +} else { + sql ="Insert into tb_bookinfo (barcode,bookname,typeid,author,translator,isbn,price,page,bookcase,inTime,operator) values('"+bookForm.getBarcode()+"','"+bookForm.getBookName()+"',"+bookForm.getTypeId()+",'"+bookForm.getAuthor()+"','"+bookForm.getTranslator()+"','"+bookForm.getIsbn()+"',"+bookForm.getPrice()+","+bookForm.getPage()+","+bookForm.getBookcaseid()+",'"+bookForm.getInTime()+"','"+bookForm.getOperator()+"')"; + falg = conn.executeUpdate(sql); + System.out.println("ͼSQL" + sql); + conn.close(); +} +} catch (SQLException ex) { +falg = 0; +} +System.out.println("falg:"+falg); +return falg; +} + +//޸ +public int update(BookForm bookForm){ +String sql="Update tb_bookinfo set typeid="+bookForm.getTypeId()+",author='"+bookForm.getAuthor()+"',translator='"+bookForm.getTranslator()+"',isbn='"+bookForm.getIsbn()+"',price="+bookForm.getPrice()+",page="+bookForm.getPage()+",bookcase="+bookForm.getBookcaseid()+" where id="+bookForm.getId()+""; +int falg=conn.executeUpdate(sql); +System.out.println("޸ʱSQL"+sql); +conn.close(); +return falg; +} +//ɾ +public int delete(BookForm bookForm){ +String sql="UPDATE tb_bookinfo SET del=1 where id="+bookForm.getId()+""; +int falg=conn.executeUpdate(sql); +System.out.println("ɾʱSQL"+sql); +return falg; +} + + + + + + + +} diff --git a/12/WebRoot/src/com/dao/BookTypeDAO.java b/12/WebRoot/src/com/dao/BookTypeDAO.java new file mode 100644 index 0000000..21a88d9 --- /dev/null +++ b/12/WebRoot/src/com/dao/BookTypeDAO.java @@ -0,0 +1,99 @@ +package com.dao; + +import com.core.ConnDB; +import java.sql.*; +import java.util.*; +import com.actionForm.BookTypeForm; + +public class BookTypeDAO { + private ConnDB conn=new ConnDB(); +//ѯ +public Collection query(String strif){ + BookTypeForm bookTypeForm=null; + Collection bookTypeColl=new ArrayList(); + String sql=""; + if(strif!="all" && strif!=null && strif!=""){ + sql="select * from tb_bookType where "+strif+""; + }else{ + sql="select * from tb_bookType"; + } + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + bookTypeForm=new BookTypeForm(); + bookTypeForm.setId(Integer.valueOf(rs.getString(1))); + bookTypeForm.setTypeName(rs.getString(2)); + bookTypeForm.setDays(rs.getInt(3)); + bookTypeColl.add(bookTypeForm); + System.out.print(bookTypeForm.getTypeName()); + } + } catch (SQLException ex) { + } + conn.close(); + return bookTypeColl; +} +//޸ĵIJѯ +public BookTypeForm queryM(BookTypeForm bookTypeForm){ + BookTypeForm bookTypeForm1=null; + String sql="select * from tb_bookType where id="+bookTypeForm.getId()+""; + System.out.println("޸ʱSQL"+sql); + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + bookTypeForm1=new BookTypeForm(); + bookTypeForm1.setId(Integer.valueOf(rs.getString(1))); + bookTypeForm1.setTypeName(rs.getString(2)); + bookTypeForm1.setDays(rs.getInt(3)); + } + } catch (SQLException ex) { + } + conn.close(); + return bookTypeForm1; +} +// +public int insert(BookTypeForm bookTypeForm){ +String sql1="SELECT * FROM tb_bookType WHERE typename='"+bookTypeForm.getTypeName()+"'"; +ResultSet rs = conn.executeQuery(sql1); +String sql = ""; +int falg = 0; +try { + if (rs.next()) { + falg = 2; + } else { + sql ="Insert into tb_bookType (typename,days) values('"+bookTypeForm.getTypeName()+"',"+bookTypeForm.getDays()+")"; + falg = conn.executeUpdate(sql); + System.out.println("ͼ͵SQL" + sql); + conn.close(); + } +} catch (SQLException ex) { + falg = 0; +} +System.out.println("falg:"+falg); +return falg; +} + +//޸ +public int update(BookTypeForm bookTypeForm){ +String sql="Update tb_bookType set typename='"+bookTypeForm.getTypeName()+"',days="+bookTypeForm.getDays()+" where id="+bookTypeForm.getId()+""; +int falg=conn.executeUpdate(sql); +System.out.println("޸ʱSQL"+sql); +conn.close(); +return falg; +} +//ɾ +public int delete(BookTypeForm bookTypeForm){ + String sql_1="SELECT * FROM tb_bookinfo WHERE typeid="+bookTypeForm.getId()+""; + ResultSet rs=conn.executeQuery(sql_1); + int falg=0; + try { + if(!rs.next()){ + String sql="Delete from tb_bookType where id="+bookTypeForm.getId()+""; + falg=conn.executeUpdate(sql); + System.out.println("ɾʱSQL"+sql); + } + } catch (Exception e) { + e.printStackTrace(); + } + return falg; +} +} diff --git a/12/WebRoot/src/com/dao/BorrowDAO.java b/12/WebRoot/src/com/dao/BorrowDAO.java new file mode 100644 index 0000000..9e9fa38 --- /dev/null +++ b/12/WebRoot/src/com/dao/BorrowDAO.java @@ -0,0 +1,218 @@ +package com.dao; + +import com.core.ConnDB; +import java.util.*; +import com.actionForm.BorrowForm; +import java.sql.*; +import com.actionForm.ReaderForm; +import com.actionForm.BookForm; +import java.util.Date; + +public class BorrowDAO { + ConnDB conn = new ConnDB(); + public int insert() { + String sql = "INSERT INTO tb_borrow (bookid) vlaues(1) "; + int ret = conn.executeUpdate(sql); + return ret; + } + //*****************************ͼ****************************** + public int insertBorrow(ReaderForm readerForm,BookForm bookForm,String operator){ + //ȡϵͳ + Date dateU=new Date(); + java.sql.Date date=new java.sql.Date(dateU.getTime()); + String sql1="select t.days from tb_bookinfo b left join tb_booktype t on b.typeid=t.id where b.id="+bookForm.getId()+""; + ResultSet rs=conn.executeQuery(sql1); + int days=0; + try { + if (rs.next()) { + days = rs.getInt(1); + } + } catch (SQLException ex) { + } + //黹ʱ + String date_str=String.valueOf(date); + String dd = date_str.substring(8,10); + String DD = date_str.substring(0,8)+String.valueOf(Integer.parseInt(dd) + days); + java.sql.Date backTime= java.sql.Date.valueOf(DD); + + String sql ="Insert into tb_borrow (readerid,bookid,borrowTime,backTime,operator) values("+readerForm.getId()+","+bookForm.getId()+",'"+date+"','"+backTime+"','"+operator+"')"; + int falg = conn.executeUpdate(sql); + System.out.println("ͼϢSQL" + sql); + conn.close(); + return falg; +} + //*************************************ͼ̽********************************* + public int renew(int id){ + String sql0="SELECT bookid FROM tb_borrow WHERE id="+id+""; + ResultSet rs1=conn.executeQuery(sql0); + int flag=0; + try { + if (rs1.next()) { + //ȡϵͳ + Date dateU = new Date(); + java.sql.Date date = new java.sql.Date(dateU.getTime()); + String sql1 = "select t.days from tb_bookinfo b left join tb_booktype t on b.typeid=t.id where b.id=" + + rs1.getInt(1) + ""; + ResultSet rs = conn.executeQuery(sql1); + int days = 0; + try { + if (rs.next()) { + days = rs.getInt(1); + } + } catch (SQLException ex) { + } + //黹ʱ + String date_str = String.valueOf(date); + String dd = date_str.substring(8, 10); + String DD = date_str.substring(0, 8) + + String.valueOf(Integer.parseInt(dd) + days); + java.sql.Date backTime = java.sql.Date.valueOf(DD); + + String sql = "UPDATE tb_borrow SET backtime='" + backTime + + "' where id=" + id + ""; + flag = conn.executeUpdate(sql); + } + } catch (Exception ex1) {} + conn.close(); + return flag; + } + //*************************************ͼ黹********************************* + public int back(int id,String operator){ + String sql0="SELECT readerid,bookid FROM tb_borrow WHERE id="+id+""; + ResultSet rs1=conn.executeQuery(sql0); + int flag=0; + try { + if (rs1.next()) { + //ȡϵͳ + Date dateU = new Date(); + java.sql.Date date = new java.sql.Date(dateU.getTime()); + int readerid=rs1.getInt(1); + int bookid=rs1.getInt(2); + String sql1="INSERT INTO tb_giveback (readerid,bookid,backTime,operator) VALUES("+readerid+","+bookid+",'"+date+"','"+operator+"')"; + int ret=conn.executeUpdate(sql1); + if(ret==1){ + String sql2 = "UPDATE tb_borrow SET ifback=1 where id=" + id + + ""; + flag = conn.executeUpdate(sql2); + }else{ + flag=0; + } + } + } catch (Exception ex1) { + } + conn.close(); + return flag; + } + //*****************************ѯͼϢ************************ + public Collection borrowinfo(String str){ + String sql="select borr.*,book.bookname,book.price,pub.pubname,bs.name bookcasename,r.barcode from (select * from tb_borrow where ifback=0) as borr left join tb_bookinfo book on borr.bookid=book.id join tb_publishing pub on book.isbn=pub.isbn join tb_bookcase bs on book.bookcase=bs.id join tb_reader r on borr.readerid=r.id where r.barcode='"+str+"'"; + ResultSet rs=conn.executeQuery(sql); + Collection coll=new ArrayList(); + BorrowForm form=null; + try { + while (rs.next()) { + form = new BorrowForm(); + form.setId(Integer.valueOf(rs.getInt(1))); + form.setBorrowTime(rs.getString(4)); + form.setBackTime(rs.getString(5)); + form.setBookName(rs.getString(8)); + form.setPrice(Float.valueOf(rs.getFloat(9))); + form.setPubName(rs.getString(10)); + form.setBookcaseName(rs.getString(11)); + coll.add(form); + } + } catch (SQLException ex) { + System.out.println("Ϣ"+ex.getMessage()); + } + conn.close(); + return coll; + } + //******************************************************************* + public Collection bremind(){ + Date dateU = new Date(); + java.sql.Date date = new java.sql.Date(dateU.getTime()); + String sql="select borr.borrowTime,borr.backTime,book.barcode,book.bookname,r.name readername,r.barcode readerbarcode from tb_borrow borr join tb_bookinfo book on book.id=borr.bookid join tb_reader r on r.id=borr.readerid where borr.backTime <='"+date+"'"; + ResultSet rs=conn.executeQuery(sql); + System.out.println("ʱѵSQL"+sql); + Collection coll=new ArrayList(); + BorrowForm form=null; + try { + while (rs.next()) { + form = new BorrowForm(); + form.setBorrowTime(rs.getString(1)); + form.setBackTime(rs.getString(2)); + form.setBookBarcode(rs.getString(3)); + form.setBookName(rs.getString(4)); + form.setReaderName(rs.getString(5)); + form.setReaderBarcode(rs.getString(6)); + coll.add(form); + System.out.println("ͼ룺"+rs.getString(3)); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } + conn.close(); + return coll; +} +//*************************ͼIJѯ****************************************** +public Collection borrowQuery(String strif){ + String sql=""; + if(strif!="all" && strif!=null && strif!=""){ + sql="select * from (select borr.borrowTime,borr.backTime,book.barcode,book.bookname,r.name readername,r.barcode readerbarcode,borr.ifback from tb_borrow borr join tb_bookinfo book on book.id=borr.bookid join tb_reader r on r.id=borr.readerid) as borr where borr."+strif+""; + }else{ + sql="select * from (select borr.borrowTime,borr.backTime,book.barcode,book.bookname,r.name readername,r.barcode readerbarcode,borr.ifback from tb_borrow borr join tb_bookinfo book on book.id=borr.bookid join tb_reader r on r.id=borr.readerid) as borr"; +} +ResultSet rs=conn.executeQuery(sql); +System.out.println("ͼIJѯSQL"+sql); +Collection coll=new ArrayList(); +BorrowForm form=null; +try { + while (rs.next()) { + form = new BorrowForm(); + form.setBorrowTime(rs.getString(1)); + form.setBackTime(rs.getString(2)); + form.setBookBarcode(rs.getString(3)); + form.setBookName(rs.getString(4)); + form.setReaderName(rs.getString(5)); + form.setReaderBarcode(rs.getString(6)); + form.setIfBack(rs.getInt(7)); + coll.add(form); + } +} catch (SQLException ex) { + System.out.println(ex.getMessage()); +} +conn.close(); +return coll; + } + //*************************ͼ****************************************** + public Collection bookBorrowSort() { + String sql = "select * from (SELECT bookid,count(bookid) as degree FROM tb_borrow group by bookid) as borr join (select b.*,c.name as bookcaseName,p.pubname,t.typename from tb_bookinfo b left join tb_bookcase c on b.bookcase=c.id join tb_publishing p on b.ISBN=p.ISBN join tb_booktype t on b.typeid=t.id where b.del=0) as book on borr.bookid=book.id order by borr.degree desc limit 10 "; + System.out.println("ͼУ"+sql); + Collection coll = new ArrayList(); + BorrowForm form = null; + ResultSet rs = conn.executeQuery(sql); + + + try { + while (rs.next()) { + form = new BorrowForm(); + form.setBookId(rs.getInt(1)); + form.setDegree(rs.getInt(2)); + form.setBookBarcode(rs.getString(3)); + form.setBookName(rs.getString(4)); + form.setAuthor(rs.getString(6)); + form.setPrice(Float.valueOf(rs.getString(9))); + + form.setBookcaseName(rs.getString(16)); + form.setPubName(rs.getString(17)); + form.setBookType(rs.getString(18)); + coll.add(form); + System.out.print("RS"+rs.getString(4)); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } + conn.close(); + return coll; + } +} diff --git a/12/WebRoot/src/com/dao/LibraryDAO.java b/12/WebRoot/src/com/dao/LibraryDAO.java new file mode 100644 index 0000000..0c22765 --- /dev/null +++ b/12/WebRoot/src/com/dao/LibraryDAO.java @@ -0,0 +1,58 @@ +package com.dao; + +import com.core.ConnDB; +import java.sql.*; +import com.actionForm.LibraryForm; +/** + *

    Title: LibraryManage

    + * + *

    Description:

    + * + *

    Copyright: Copyright (c) 2011

    + * + *

    Company:mr

    + * + * @author:wgh + */ +public class LibraryDAO { + ConnDB conn=null; + public LibraryDAO() { + conn=new ConnDB(); + } + public LibraryForm query(){ + LibraryForm libraryForm1=null; + String sql = "select * from tb_library where id=1"; + ResultSet rs =conn.executeQuery(sql); + try { + while (rs.next()) { + libraryForm1 = new LibraryForm(); + libraryForm1.setId(Integer.valueOf(rs.getString(1))); + libraryForm1.setLibraryname(rs.getString(2)); + libraryForm1.setCurator(rs.getString(3)); + libraryForm1.setTel(rs.getString(4)); + libraryForm1.setAddress(rs.getString(5)); + libraryForm1.setEmail(rs.getString(6)); + libraryForm1.setUrl(rs.getString(7)); + libraryForm1.setCreateDate(rs.getString(8)); + libraryForm1.setIntroduce(rs.getString(9)); + } + } catch (Exception ex) { + } + conn.close(); + return libraryForm1; + } + public int update(LibraryForm libraryForm){ + String sql="UPDATE tb_library SET libraryname='"+libraryForm.getLibraryname()+"',curator='"+libraryForm.getCurator()+"',tel='"+libraryForm.getTel()+"',address='"+libraryForm.getAddress()+"',email='"+libraryForm.getEmail()+"',url='"+libraryForm.getUrl()+"',createDate='"+libraryForm.getCreateDate()+"',introduce='"+libraryForm.getIntroduce()+"' where id=1"; + int ret=0; + try{ + ret=conn.executeUpdate(sql); + }catch(Exception e){ + System.out.println("޸ͼϢ"+e.getMessage()); + } + System.out.println("޸ͼϢʱSQL"+sql); + conn.close(); + return ret; + } + + +} diff --git a/12/WebRoot/src/com/dao/ManagerDAO.java b/12/WebRoot/src/com/dao/ManagerDAO.java new file mode 100644 index 0000000..4dfaa1e --- /dev/null +++ b/12/WebRoot/src/com/dao/ManagerDAO.java @@ -0,0 +1,211 @@ +package com.dao; + +import com.core.*; +import java.util.*; +import com.actionForm.ManagerForm; +import java.sql.*; +import java.*; + +public class ManagerDAO { + private ConnDB conn = new ConnDB(); + //ѯ + public Collection query(String queryif) { + ManagerForm managerForm = null; + Collection managercoll = new ArrayList(); + String sql = ""; + if (queryif == null || queryif == "" || queryif == "all") { //queryifֵΪnullallʱѯȫ + sql = "select m.*,p.sysset,p.readerset,p.bookset,p.borrowback,p.sysquery from tb_manager m left join tb_purview p on m.id=p.id"; + }else{ + sql="select m.*,p.sysset,p.readerset,p.bookset,p.borrowback,p.sysquery from tb_manager m left join tb_purview p on m.id=p.id where m.name='"+queryif+"'"; //˴ҪӦ + } + ResultSet rs = conn.executeQuery(sql); //ִSQL + try { //׽쳣Ϣ + while (rs.next()) { + managerForm = new ManagerForm(); + managerForm.setId(Integer.valueOf(rs.getString(1))); + managerForm.setName(rs.getString(2)); + managerForm.setPwd(rs.getString(3)); + managerForm.setSysset(rs.getInt(4)); + managerForm.setReaderset(rs.getInt(5)); + managerForm.setBookset(rs.getInt(6)); + managerForm.setBorrowback(rs.getInt(7)); + managerForm.setSysquery(rs.getInt(8)); + managercoll.add(managerForm); //ѯ浽Collection + } + } catch (SQLException e) {} + return managercoll; //زѯ + } + + /*********************************************************/ + //ѯȨϢ + public ManagerForm query_p(String str) { + ManagerForm managerForm1 = null; + String sql = "select m.*,p.sysset,p.readerset,p.bookset,p.borrowback,p.sysquery from tb_manager m left join tb_purview p on m.id=p.id where m.name='"+str+"'"; + + ResultSet rs = conn.executeQuery(sql); + try { + while (rs.next()) { + managerForm1 = new ManagerForm(); + managerForm1.setId(Integer.valueOf(rs.getString(1))); + managerForm1.setName(rs.getString(2)); + managerForm1.setPwd(rs.getString(3)); + managerForm1.setSysset(rs.getInt(4)); + managerForm1.setReaderset(rs.getInt(5)); + managerForm1.setBookset(rs.getInt(6)); + managerForm1.setBorrowback(rs.getInt(7)); + managerForm1.setSysquery(rs.getInt(8)); + } + } catch (SQLException ex) { + ex.printStackTrace(); + }finally{ + conn.close(); + } + return managerForm1; + } + + + //Ա֤ + public int checkManager(ManagerForm managerForm) { + int flag = 0; + ChStr chStr=new ChStr(); + String sql = "SELECT * FROM tb_manager where name='" + + chStr.filterStr(managerForm.getName()) + "'"; + ResultSet rs = conn.executeQuery(sql); + try { + if (rs.next()) { + String pwd = chStr.filterStr(managerForm.getPwd()); //ȡ벢ַеΣַ + if (pwd.equals(rs.getString(3))) { + flag = 1; + } else { + flag = 0; + } + }else{ + flag = 0; + } + } catch (SQLException ex) { + flag = 0; + }finally{ + conn.close(); + } + return flag; + } + + //޸ʱӦõIJѯ + public ManagerForm query_update(ManagerForm managerForm) { + ManagerForm managerForm1 = null; + String sql = "select m.*,p.sysset,p.readerset,p.bookset,p.borrowback,p.sysquery from tb_manager m left join tb_purview p on m.id=p.id where m.id=" + + managerForm.getId() + ""; + + ResultSet rs = conn.executeQuery(sql); //ִвѯ + try { + while (rs.next()) { + managerForm1 = new ManagerForm(); + managerForm1.setId(Integer.valueOf(rs.getString(1))); + managerForm1.setName(rs.getString(2)); + managerForm1.setPwd(rs.getString(3)); + managerForm1.setSysset(rs.getInt(4)); + managerForm1.setReaderset(rs.getInt(5)); + managerForm1.setBookset(rs.getInt(6)); + managerForm1.setBorrowback(rs.getInt(7)); + managerForm1.setSysquery(rs.getInt(8)); + } + } catch (SQLException ex) { + ex.printStackTrace(); //쳣Ϣ + }finally{ + conn.close(); //رݿ + } + return managerForm1; + } + //ĿʱӦõIJѯ + public ManagerForm query_pwd(ManagerForm managerForm) { + ManagerForm managerForm1 = null; + String sql = "SELECT * FROM tb_manager WHERE name='" +managerForm.getName() + "'"; + ResultSet rs = conn.executeQuery(sql); + try { + while (rs.next()) { + managerForm1 = new ManagerForm(); + managerForm1.setId(Integer.valueOf(rs.getString(1))); + managerForm1.setName(rs.getString(2)); + managerForm1.setPwd(rs.getString(3)); + } + } catch (SQLException ex) { + ex.printStackTrace(); + }finally{ + conn.close(); + } + return managerForm1; + } + // + public int insert(ManagerForm managerForm) { + String sql1="SELECT * FROM tb_manager WHERE name='"+managerForm.getName()+"'"; + ResultSet rs = conn.executeQuery(sql1); + String sql = ""; + int falg = 0; + try { + if (rs.next()) { + falg=2; + } else { + sql = "INSERT INTO tb_manager (name,pwd) values('" + + managerForm.getName() + "','" + + managerForm.getPwd() + + "')"; + falg = conn.executeUpdate(sql); + System.out.println("ӹԱϢSQL" + sql); + } + } catch (SQLException ex) { + falg=0; + }finally{ + conn.close(); + } + return falg; + } + + //ùԱȨ + public int update(ManagerForm managerForm) { + String sql1="SELECT * FROM tb_purview WHERE id="+managerForm.getId()+""; + ResultSet rs=conn.executeQuery(sql1); //ѯҪȨ޵ĹԱȨϢ + String sql=""; + int falg=0; + try { //׽쳣Ϣ + if (rs.next()) { //ѾȨʱִи + sql = "Update tb_purview set sysset=" + managerForm.getSysset() + + ",readerset=" + managerForm.getReaderset() + ",bookset="+managerForm.getBookset()+",borrowback="+managerForm.getBorrowback()+",sysquery="+managerForm.getSysquery()+" where id=" + + managerForm.getId() + ""; + }else{ //δȨʱִв + sql="INSERT INTO tb_purview values("+managerForm.getId()+","+managerForm.getSysset()+","+managerForm.getReaderset()+","+managerForm.getBookset()+","+managerForm.getBorrowback()+","+managerForm.getSysquery()+")"; + } + falg = conn.executeUpdate(sql); + System.out.println("޸ʱSQL" + sql); + } catch (SQLException ex) { + falg=0; //ʾùԱȨʧ + }finally{ + conn.close(); //رݿ + } + return falg; + } + //޸ĹԱ +public int updatePwd(ManagerForm managerForm){ + String sql="UPDATE tb_manager SET pwd='"+managerForm.getPwd()+"' where name='"+managerForm.getName()+"'"; + int ret=conn.executeUpdate(sql); + System.out.println("޸ĹԱʱSQL"+sql); + conn.close(); + return ret; +} + +//ɾ + public int delete(ManagerForm managerForm) { + int flag=0; + try{ //׽쳣Ϣ + String sql = "DELETE FROM tb_manager where id=" + managerForm.getId() +""; + flag = conn.executeUpdate(sql); //ִɾԱϢ + if (flag !=0){ + String sql1 = "DELETE FROM tb_purview where id=" + managerForm.getId() +""; + conn.executeUpdate(sql1); //ִɾȨϢ + }}catch(Exception e){ + System.out.println("ɾԱϢʱĴ"+e.getMessage()); //Ϣ + }finally{ + conn.close(); //رݿ + } + return flag; + } +} diff --git a/12/WebRoot/src/com/dao/ParameterDAO.java b/12/WebRoot/src/com/dao/ParameterDAO.java new file mode 100644 index 0000000..367da46 --- /dev/null +++ b/12/WebRoot/src/com/dao/ParameterDAO.java @@ -0,0 +1,37 @@ +package com.dao; + +import com.core.ConnDB; +import com.actionForm.ParameterForm; +import java.sql.ResultSet; + +public class ParameterDAO { + ConnDB conn=null; +public ParameterDAO() { + conn=new ConnDB(); +} +public ParameterForm query(){ + ParameterForm libraryForm1=null; + String sql = "select * from tb_parameter where id=1"; + ResultSet rs =conn.executeQuery(sql); + try { + while (rs.next()) { + libraryForm1 = new ParameterForm(); + libraryForm1.setId(Integer.valueOf(rs.getString(1))); + libraryForm1.setCost(rs.getInt(2)); + libraryForm1.setValidity(rs.getInt(3)); + + } + } catch (Exception ex) { + } + conn.close(); + return libraryForm1; +} +public int update(ParameterForm parameterForm){ + String sql="UPDATE tb_parameter SET cost="+parameterForm.getCost()+",validity="+parameterForm.getValidity()+" where id=1"; + int ret=conn.executeUpdate(sql); + System.out.println("޸IJϢʱSQL"+sql); + conn.close(); + return ret; +} + +} diff --git a/12/WebRoot/src/com/dao/PublishingDAO.java b/12/WebRoot/src/com/dao/PublishingDAO.java new file mode 100644 index 0000000..4289e27 --- /dev/null +++ b/12/WebRoot/src/com/dao/PublishingDAO.java @@ -0,0 +1,34 @@ +package com.dao; + +import com.core.ConnDB; +import java.util.*; +import java.sql.*; +import com.actionForm.PublishingForm; + +public class PublishingDAO { + private ConnDB conn=new ConnDB(); +//ѯ +public Collection query(String strif){ +PublishingForm pubForm=null; +Collection pubColl=new ArrayList(); +String sql=""; +if(strif!="all" && strif!=null && strif!=""){ + sql="select * from tb_publishing where "+strif+""; +}else{ + sql="select * from tb_publishing"; +} +ResultSet rs=conn.executeQuery(sql); +try { + while (rs.next()) { + pubForm=new PublishingForm(); + pubForm.setIsbn(rs.getString(1)); + pubForm.setPubname(rs.getString(2)); + pubColl.add(pubForm); + } +} catch (SQLException ex) { +} +conn.close(); +return pubColl; +} + +} diff --git a/12/WebRoot/src/com/dao/ReaderDAO.java b/12/WebRoot/src/com/dao/ReaderDAO.java new file mode 100644 index 0000000..b1d9a1c --- /dev/null +++ b/12/WebRoot/src/com/dao/ReaderDAO.java @@ -0,0 +1,121 @@ +package com.dao; + +import com.core.ConnDB; +import java.util.*; +import java.sql.*; +import com.actionForm.ReaderForm; + +public class ReaderDAO { + private ConnDB conn=new ConnDB(); +//ѯ +public Collection query(String strif){ + ReaderForm readerForm=null; + Collection readerColl=new ArrayList(); + String sql=""; + if(strif!="all" && strif!=null && strif!=""){ + sql="select r.*,t.name as typename,t.number from tb_reader r left join tb_readerType t on r.typeid=t.id where "+strif+""; + }else{ + sql="select r.*,t.name as typename,t.number from tb_reader r left join tb_readerType t on r.typeid=t.id"; + } + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + readerForm=new ReaderForm(); + readerForm.setId(Integer.valueOf(rs.getString(1))); + readerForm.setName(rs.getString(2)); + readerForm.setSex(rs.getString(3)); + readerForm.setBarcode(rs.getString(4)); + readerForm.setVocation(rs.getString(5)); + readerForm.setBirthday(rs.getString(6)); + readerForm.setPaperType(rs.getString(7)); + readerForm.setPaperNO(rs.getString(8)); + readerForm.setTel(rs.getString(9)); + readerForm.setEmail(rs.getString(10)); + readerForm.setCreateDate(rs.getString(11)); + readerForm.setOperator(rs.getString(12)); + readerForm.setRemark(rs.getString(13)); + readerForm.setTypeid(rs.getInt(14)); + readerForm.setTypename(rs.getString(15)); + readerForm.setNumber(rs.getInt(16)); + readerColl.add(readerForm); + } + } catch (SQLException ex) { + } + conn.close(); + return readerColl; +} +//޸ĵIJѯ +public ReaderForm queryM(ReaderForm readerForm){ + ReaderForm readerForm1=null; + String sql=""; + if(readerForm.getId()!=null){ + sql="select r.*,t.name as typename,t.number from tb_reader r left join tb_readerType t on r.typeid=t.id where r.id="+readerForm.getId()+""; + }else if(readerForm.getBarcode()!=null){ + sql="select r.*,t.name as typename,t.number from tb_reader r left join tb_readerType t on r.typeid=t.id where r.barcode="+readerForm.getBarcode()+""; + } + System.out.println("޸ĶϢʱSQL"+sql); + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + readerForm1=new ReaderForm(); + readerForm1.setId(Integer.valueOf(rs.getString(1))); + readerForm1.setName(rs.getString(2)); + readerForm1.setSex(rs.getString(3)); + readerForm1.setBarcode(rs.getString(4)); + readerForm1.setVocation(rs.getString(5)); + readerForm1.setBirthday(rs.getString(6)); + readerForm1.setPaperType(rs.getString(7)); + readerForm1.setPaperNO(rs.getString(8)); + readerForm1.setTel(rs.getString(9)); + readerForm1.setEmail(rs.getString(10)); + readerForm1.setCreateDate(rs.getString(11)); + readerForm1.setOperator(rs.getString(12)); + readerForm1.setRemark(rs.getString(13)); + readerForm1.setTypeid(rs.getInt(14)); + readerForm1.setTypename(rs.getString(15)); + readerForm1.setNumber(rs.getInt(16)); + System.out.println(rs.getString(2)); + } + } catch (SQLException ex) { + } + conn.close(); + return readerForm1; +} +// +public int insert(ReaderForm readerForm){ +String sql1="SELECT * FROM tb_reader WHERE barcode='"+readerForm.getBarcode()+"'"; +ResultSet rs = conn.executeQuery(sql1); +String sql = ""; +int falg = 0; +try { + if (rs.next()) { + falg = 2; + } else { + sql ="Insert into tb_reader (name,sex,barcode,vocation,birthday,paperType,paperNO,tel,email,createDate,operator,remark,typeid) values('"+readerForm.getName()+"','"+readerForm.getSex()+"','"+readerForm.getBarcode()+"','"+readerForm.getVocation()+"','"+readerForm.getBirthday()+"','"+readerForm.getPaperType()+"','"+readerForm.getPaperNO()+"','"+readerForm.getTel()+"','"+readerForm.getEmail()+"','"+readerForm.getCreateDate()+"','"+readerForm.getOperator()+"','"+readerForm.getRemark()+"',"+readerForm.getTypeid()+")"; + falg = conn.executeUpdate(sql); + System.out.println("ӶϢSQL" + sql); + conn.close(); + } +} catch (SQLException ex) { + falg = 0; +} +System.out.println("falg:"+falg); +return falg; +} + +//޸ +public int update(ReaderForm readerForm){ +String sql="Update tb_reader set sex='"+readerForm.getSex()+"',barcode='"+readerForm.getBarcode()+"',vocation='"+readerForm.getVocation()+"',birthday='"+readerForm.getBirthday()+"',paperType='"+readerForm.getPaperType()+"',paperNO='"+readerForm.getPaperNO()+"',tel='"+readerForm.getTel()+"',email='"+readerForm.getEmail()+"',remark='"+readerForm.getRemark()+"',typeid="+readerForm.getTypeid()+" where id="+readerForm.getId()+""; +int falg=conn.executeUpdate(sql); +System.out.println("޸ʱSQL"+sql); +conn.close(); +return falg; +} +//ɾ +public int delete(ReaderForm readerForm){ +String sql="Delete from tb_reader where id="+readerForm.getId()+""; +int falg=conn.executeUpdate(sql); +System.out.println("ɾʱSQL"+sql); +return falg; +} +} diff --git a/12/WebRoot/src/com/dao/ReaderTypeDAO.java b/12/WebRoot/src/com/dao/ReaderTypeDAO.java new file mode 100644 index 0000000..ab1fe28 --- /dev/null +++ b/12/WebRoot/src/com/dao/ReaderTypeDAO.java @@ -0,0 +1,101 @@ +package com.dao; + +import com.core.ConnDB; +import java.util.*; +import java.sql.*; + +import com.actionForm.ReaderTypeForm; + +public class ReaderTypeDAO { + private ConnDB conn=new ConnDB(); +//ѯ +public Collection query(String strif){ + ReaderTypeForm readerTypeForm=null; + Collection readerTypeColl=new ArrayList(); + String sql=""; + if(strif!="all" && strif!=null && strif!=""){ + sql="select * from tb_readerType where "+strif+""; + }else{ + sql="select * from tb_readerType"; + } + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + readerTypeForm=new ReaderTypeForm(); + readerTypeForm.setId(Integer.valueOf(rs.getString(1))); + readerTypeForm.setName(rs.getString(2)); + readerTypeForm.setNumber(rs.getInt(3)); + readerTypeColl.add(readerTypeForm); + } + } catch (SQLException ex) { + } + conn.close(); + return readerTypeColl; +} +//޸ĵIJѯ +public ReaderTypeForm queryM(ReaderTypeForm readerTypeForm){ + ReaderTypeForm readerTypeForm1=null; + String sql="select * from tb_readerType where id="+readerTypeForm.getId()+""; + System.out.println("޸ʱSQL"+sql); + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + readerTypeForm1=new ReaderTypeForm(); + readerTypeForm1.setId(Integer.valueOf(rs.getString(1))); + readerTypeForm1.setName(rs.getString(2)); + readerTypeForm1.setNumber(rs.getInt(3)); + System.out.println(rs.getInt(3)); + } + } catch (SQLException ex) { + } + conn.close(); + return readerTypeForm1; +} +// +public int insert(ReaderTypeForm readerTypeForm){ +String sql1="SELECT * FROM tb_readerType WHERE name='"+readerTypeForm.getName()+"'"; +ResultSet rs = conn.executeQuery(sql1); +String sql = ""; +int falg = 0; +try { + if (rs.next()) { + falg = 2; + } else { + sql ="Insert into tb_readerType (name,number) values('"+readerTypeForm.getName()+"',"+readerTypeForm.getNumber()+")"; + falg = conn.executeUpdate(sql); + System.out.println("Ӷ͵SQL" + sql); + conn.close(); + } +} catch (SQLException ex) { + falg = 0; +} +System.out.println("falg:"+falg); +return falg; +} + +//޸ +public int update(ReaderTypeForm readerTypeForm){ +String sql="Update tb_readerType set name='"+readerTypeForm.getName()+"',number="+readerTypeForm.getNumber()+" where id="+readerTypeForm.getId()+""; +int falg=conn.executeUpdate(sql); +System.out.println("޸ʱSQL"+sql); +conn.close(); +return falg; +} +//ɾ +public int delete(ReaderTypeForm readerTypeForm){ + String sql_1="SELECT * FROM tb_reader WHERE typeid="+readerTypeForm.getId()+""; + ResultSet rs=conn.executeQuery(sql_1); + int flag=0; + try { + if(!rs.next()){ + String sql="Delete from tb_readerType where id="+readerTypeForm.getId()+""; + flag=conn.executeUpdate(sql); + System.out.println("ɾʱSQL"+sql); + } + } catch (Exception e) { + e.printStackTrace(); + } + return flag; +} + +} diff --git a/12/WebRoot/src/com/wgh/struts/ApplicationResources.properties b/12/WebRoot/src/com/wgh/struts/ApplicationResources.properties new file mode 100644 index 0000000..597231b --- /dev/null +++ b/12/WebRoot/src/com/wgh/struts/ApplicationResources.properties @@ -0,0 +1,2 @@ +# Resources for parameter 'com.wgh.struts.ApplicationResources' +# Project P/library \ No newline at end of file diff --git a/12/src/com/CharacterEncodingFilter.java b/12/src/com/CharacterEncodingFilter.java new file mode 100644 index 0000000..b3ae803 --- /dev/null +++ b/12/src/com/CharacterEncodingFilter.java @@ -0,0 +1,36 @@ +package com; + +import java.io.IOException; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; + +public class CharacterEncodingFilter implements Filter { + + protected String encoding = null;// ʽ + protected FilterConfig filterConfig = null;// ö + + public void init(FilterConfig filterConfig) throws ServletException { + this.filterConfig = filterConfig; // ʼö + this.encoding = filterConfig.getInitParameter("encoding");// ȡļָıʽ + } + + // Ľӿڷִйҵ + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + if (encoding != null) { + request.setCharacterEncoding(encoding); // ı + response.setContentType("text/html; charset=" + encoding);// Ӧͣʽ + } + chain.doFilter(request, response); // ݸһ + } + + public void destroy() { + this.encoding = null; + this.filterConfig = null; + } +} diff --git a/12/src/com/action/Book.java b/12/src/com/action/Book.java new file mode 100644 index 0000000..3292050 --- /dev/null +++ b/12/src/com/action/Book.java @@ -0,0 +1,168 @@ +package com.action; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import com.actionForm.BookForm; +import com.dao.BookDAO; + +import java.io.IOException; +import java.util.Date; + +public class Book extends HttpServlet { + private BookDAO bookDAO = null; + + public Book() { + this.bookDAO = new BookDAO(); + } + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String action = request.getParameter("action"); + System.out.println("\nbook*********************action=" + action); + if (action == null || "".equals(action)) { + request.setAttribute("error", "IJ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else if ("bookAdd".equals(action)) { + bookAdd(request, response); + } else if ("bookQuery".equals(action)) { + bookQuery(request, response); + } else if ("bookModifyQuery".equals(action)) { + bookModifyQuery(request, response); + } else if ("bookModify".equals(action)) { + bookModify(request, response); + } else if ("bookDel".equals(action)) { + bookDel(request, response); + } else if ("bookDetail".equals(action)) { + bookDetail(request, response); + } else if ("bookifQuery".equals(action)) { + bookifQuery(request, response); + } + } + + /*********************** ͼϢ **************************/ + private void bookAdd(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + BookForm bookForm = new BookForm(); + bookForm.setBarcode(request.getParameter("barcode")); + bookForm.setBookName(request.getParameter("bookName")); + bookForm.setTypeId(Integer.parseInt(request.getParameter("typeId"))); + bookForm.setAuthor(request.getParameter("author")); + bookForm.setTranslator(request.getParameter("translator")); + bookForm.setIsbn(request.getParameter("isbn")); + bookForm.setPrice(Float.valueOf(request.getParameter("price"))); + bookForm.setPage(request.getParameter("page")==""?0:Integer.parseInt(request.getParameter("page"))); + bookForm.setBookcaseid(Integer.parseInt(request + .getParameter("bookcaseid"))); + // ȡϵͳ + Date date1 = new Date(); + java.sql.Date date = new java.sql.Date(date1.getTime()); + bookForm.setInTime(date.toString()); + bookForm.setOperator(request.getParameter("operator")); + int a = bookDAO.insert(bookForm); + if (a == 1) { + request.getRequestDispatcher("book_ok.jsp?para=1").forward(request, response); + } else if (a == 2) { + request.setAttribute("error", "ͼϢѾӣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.setAttribute("error", "ͼϢʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } + } + + /*********************** ѯȫͼϢ **************************/ + private void bookQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + String str = null; + request.setAttribute("book", bookDAO.query(str)); // ѯ浽book + request.getRequestDispatcher("book.jsp").forward(request, response); + } + + /*********************** ѯͼϢ **************************/ + private void bookifQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + String str = null; + if (request.getParameter("f") != null) { + str = request.getParameter("f") + " like '%" + + request.getParameter("key") + "%"; + } + request.setAttribute("ifbook", bookDAO.query(str)); + System.out.print("ѯͼϢʱstr:" + str); + request.getRequestDispatcher("bookQuery.jsp").forward(request, response); + } + + /*********************** ѯ޸ͼϢ **************************/ + private void bookModifyQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + BookForm bookForm = new BookForm(); + System.out.println("ѯ޸ͼϢ" + request.getParameter("ID")); + bookForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("bookQueryif", bookDAO.queryM(bookForm)); + request.getRequestDispatcher("book_Modify.jsp").forward(request, + response); + } + + /*********************** ѯͼϸϢ **************************/ + private void bookDetail(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + BookForm bookForm = new BookForm(); + bookForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("bookDetail", bookDAO.queryM(bookForm)); + request.getRequestDispatcher("book_detail.jsp").forward(request, + response); + } + + /*********************** ޸ͼϢ **************************/ + private void bookModify(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + BookForm bookForm = new BookForm(); // ʵBookForm + bookForm.setId(Integer.parseInt(request.getParameter("id"))); + bookForm.setBarcode(request.getParameter("barcode")); // ȡ + bookForm.setBookName(request.getParameter("bookName")); + bookForm.setTypeId(Integer.parseInt(request.getParameter("typeId"))); + bookForm.setAuthor(request.getParameter("author")); + bookForm.setTranslator(request.getParameter("translator")); + bookForm.setIsbn(request.getParameter("isbn")); + bookForm.setPrice(Float.valueOf(request.getParameter("price"))); + bookForm.setPage(request.getParameter("page")==""?0:Integer.parseInt(request.getParameter("page"))); + bookForm.setBookcaseid(Integer.parseInt(request + .getParameter("bookcaseid"))); + bookForm.setOperator(request.getParameter("operator")); + int ret = bookDAO.update(bookForm); // ޸ͼϢķupdate() + if (ret == 0) { + request.setAttribute("error", "޸ͼϢʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); // תʾҳ + } else { + request.getRequestDispatcher("book_ok.jsp?para=2").forward(request, + response); // ת޸ijɹҳ + } + } + + /*********************** ɾͼϢ **************************/ + private void bookDel(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + BookForm bookForm = new BookForm(); + bookForm.setId(Integer.valueOf(request.getParameter("ID"))); + int ret = bookDAO.delete(bookForm); + if (ret == 0) { + request.setAttribute("error", "ɾͼϢʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("book_ok.jsp?para=3").forward(request, + response); + } + } + + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + doGet(request, response); + } +} diff --git a/12/src/com/action/BookCase.java b/12/src/com/action/BookCase.java new file mode 100644 index 0000000..02789da --- /dev/null +++ b/12/src/com/action/BookCase.java @@ -0,0 +1,99 @@ +package com.action; + +import java.io.IOException; + + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import com.actionForm.BookCaseForm; +import com.dao.BookCaseDAO; + +public class BookCase extends HttpServlet { + private BookCaseDAO bookCaseDAO=null; + public BookCase(){ + this.bookCaseDAO=new BookCaseDAO(); + } + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String action =request.getParameter("action"); + System.out.println("\nbookCase*********************action="+action); + if(action==null||"".equals(action)){ + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if("bookCaseAdd".equals(action)){ + bookCaseAdd(request,response); + }else if("bookCaseQuery".equals(action)){ + bookCaseQuery(request,response); + }else if("bookCaseModifyQuery".equals(action)){ + bookCaseModifyQuery(request,response); + }else if("bookCaseModify".equals(action)){ + bookCaseModify(request,response); + }else if("bookCaseDel".equals(action)){ + bookCaseDel(request,response); + } + } + /***********************Ϣ**************************/ + private void bookCaseAdd(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + BookCaseForm bookCaseForm=new BookCaseForm(); + bookCaseForm.setName(request.getParameter("name")); + int a=bookCaseDAO.insert(bookCaseForm); + if(a==0){ + request.setAttribute("error","Ϣʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if(a==2){ + request.setAttribute("error","ϢѾӣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + request.getRequestDispatcher("bookcase_ok.jsp?para=1").forward(request, response); + } + } + /***********************ѯȫϢ**************************/ + private void bookCaseQuery(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String str=null; + request.setAttribute("bookcase",bookCaseDAO.query(str)); + request.getRequestDispatcher("bookcase.jsp").forward(request, response); + } + /***********************ѯ޸Ϣ**************************/ + private void bookCaseModifyQuery(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + BookCaseForm bookCaseForm=new BookCaseForm(); + bookCaseForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("bookCaseQueryif",bookCaseDAO.queryM(bookCaseForm)); + request.getRequestDispatcher("bookCase_Modify.jsp").forward(request, response); + } + /***********************޸Ϣ**************************/ + private void bookCaseModify(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + BookCaseForm bookCaseForm=new BookCaseForm(); + bookCaseForm.setId(Integer.parseInt(request.getParameter("id"))); + bookCaseForm.setName(request.getParameter("name")); + int ret=bookCaseDAO.update(bookCaseForm); + if(ret==0){ + request.setAttribute("error","޸Ϣʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + request.getRequestDispatcher("bookcase_ok.jsp?para=2").forward(request, response); + } + } + /***********************ɾϢ**************************/ + private void bookCaseDel(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + BookCaseForm bookCaseForm=new BookCaseForm(); + bookCaseForm.setId(Integer.valueOf(request.getParameter("ID"))); + int ret=bookCaseDAO.delete(bookCaseForm); + if(ret==0){ + request.setAttribute("error","ɾϢʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else{ + request.getRequestDispatcher("bookcase_ok.jsp?para=3").forward(request, response); + } + } + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + +doGet(request, response); +} +} diff --git a/12/src/com/action/BookType.java b/12/src/com/action/BookType.java new file mode 100644 index 0000000..054523d --- /dev/null +++ b/12/src/com/action/BookType.java @@ -0,0 +1,121 @@ +package com.action; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import com.actionForm.BookTypeForm; +import com.dao.BookTypeDAO; + +public class BookType extends HttpServlet { + private BookTypeDAO bookTypeDAO = null; + + public BookType() { + this.bookTypeDAO = new BookTypeDAO(); + } + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + String action = request.getParameter("action"); + System.out.println("\nbookType*********************action=" + action); + if (action == null || "".equals(action)) { + request.setAttribute("error", "IJ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else if ("bookTypeAdd".equals(action)) { + bookTypeAdd(request, response); + } else if ("bookTypeQuery".equals(action)) { + bookTypeQuery(request, response); + } else if ("bookTypeModifyQuery".equals(action)) { + bookTypeModifyQuery(request, response); + } else if ("bookTypeModify".equals(action)) { + bookTypeModify(request, response); + } else if ("bookTypeDel".equals(action)) { + bookTypeDel(request, response); + } + } + + /*********************** ͼϢ **************************/ + private void bookTypeAdd(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + BookTypeForm bookTypeForm = new BookTypeForm(); + bookTypeForm.setTypeName(request.getParameter("typeName")); + bookTypeForm.setDays(Integer.parseInt(request.getParameter("days"))); + int a = bookTypeDAO.insert(bookTypeForm); + if (a == 0) { + request.setAttribute("error", "ͼϢʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else if (a == 2) { + request.setAttribute("error", "ͼϢѾӣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("bookType_ok.jsp?para=1").forward(request, + response); + } + } + + /*********************** ѯȫͼϢ **************************/ + private void bookTypeQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + String str = null; + request.setAttribute("bookType", bookTypeDAO.query(str)); + request.getRequestDispatcher("bookType.jsp") + .forward(request, response); + } + + /*********************** ѯ޸ͼϢ **************************/ + private void bookTypeModifyQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + BookTypeForm bookTypeForm = new BookTypeForm(); + bookTypeForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("bookTypeQueryif", bookTypeDAO + .queryM(bookTypeForm)); + request.getRequestDispatcher("bookType_Modify.jsp").forward(request, + response); + } + + /*********************** ޸ͼϢ **************************/ + private void bookTypeModify(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + BookTypeForm bookTypeForm = new BookTypeForm(); + bookTypeForm.setId(Integer.parseInt(request.getParameter("id"))); + bookTypeForm.setTypeName(request.getParameter("typeName")); + bookTypeForm.setDays(Integer.parseInt(request.getParameter("days"))); + int ret = bookTypeDAO.update(bookTypeForm); + if (ret == 0) { + request.setAttribute("error", "޸ͼϢʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("bookType_ok.jsp?para=2").forward(request, + response); + } + } + + /*********************** ɾͼϢ **************************/ + private void bookTypeDel(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + BookTypeForm bookTypeForm = new BookTypeForm(); + bookTypeForm.setId(Integer.valueOf(request.getParameter("ID"))); + int ret = bookTypeDAO.delete(bookTypeForm); + if (ret == 0) { + request.setAttribute("error", "ɾͼϢʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("bookType_ok.jsp?para=3").forward(request, + response); + } + } + + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + doGet(request, response); + } +} diff --git a/12/src/com/action/Borrow.java b/12/src/com/action/Borrow.java new file mode 100644 index 0000000..f6e343f --- /dev/null +++ b/12/src/com/action/Borrow.java @@ -0,0 +1,191 @@ +package com.action; + +import java.io.IOException; + + +import javax.servlet.ServletException; +import javax.servlet.http.*; + +import com.dao.*; +import com.actionForm.*; + +public class Borrow extends HttpServlet { + /******************ڹ췽ʵBorrowӦõij־òĶ**************************/ + private BorrowDAO borrowDAO = null; + private ReaderDAO readerDAO=null; + private BookDAO bookDAO=null; + private ReaderForm readerForm=new ReaderForm(); + public Borrow() { + this.borrowDAO = new BorrowDAO(); + this.readerDAO=new ReaderDAO(); + this.bookDAO=new BookDAO(); + } + /******************************************************************************************/ + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String action =request.getParameter("action"); + if(action==null||"".equals(action)){ + request.setAttribute("error","IJ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + }else if("bookBorrowSort".equals(action)){ + bookBorrowSort(request,response); + }else if("bookborrow".equals(action)){ + bookborrow(request,response); //ͼ + }else if("bookrenew".equals(action)){ + bookrenew(request,response); //ͼ + }else if("bookback".equals(action)){ + bookback(request,response); //ͼ黹 + }else if("Bremind".equals(action)){ + bremind(request,response); //ĵ + }else if("borrowQuery".equals(action)){ + borrowQuery(request,response); //Ϣѯ + } + } + /*********************ͼ***********************/ + private void bookBorrowSort(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + request.setAttribute("bookBorrowSort",borrowDAO.bookBorrowSort()); + request.getRequestDispatcher("bookBorrowSort.jsp").forward(request, response); + } + /*********************ͼIJѯ***********************/ + private void borrowQuery(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String str=null; + String flag[]=request.getParameterValues("flag"); + if (flag!=null){ + String aa = flag[0]; + if ("a".equals(aa)) { + if (request.getParameter("f") != null) { + str = request.getParameter("f") + " like '%" + + request.getParameter("key") + "%'"; + } + } + if ("b".equals(aa)) { + String sdate = request.getParameter("sdate"); + String edate = request.getParameter("edate"); + if (sdate != null && edate != null) { + str = "borrowTime between '" + sdate + "' and '" + edate + + "'"; + } + System.out.println("" + str); + } + //ͬʱѡںвѯ + if (flag.length == 2) { + if (request.getParameter("f") != null) { + str = request.getParameter("f") + " like '%" + + request.getParameter("key") + "%'"; + } + System.out.println("ں"); + String sdate = request.getParameter("sdate"); + String edate = request.getParameter("edate"); + String str1 = null; + if (sdate != null && edate != null) { + str1 = "borrowTime between '" + sdate + "' and '" + edate + + "'"; + } + str = str + " and borr." + str1; + System.out.println("ڣ" + str); + } + } + request.setAttribute("borrowQuery",borrowDAO.borrowQuery(str)); + System.out.print("ѯͼϢʱstr:"+str); + request.getRequestDispatcher("borrowQuery.jsp").forward(request, response); + } + /********************************************/ + private void bremind(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + request.setAttribute("Bremind",borrowDAO.bremind()); + request.getRequestDispatcher("bremind.jsp").forward(request, response); + } + + /*********************ͼ***********************/ + private void bookborrow(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //ѯϢ + readerForm.setBarcode(request.getParameter("barcode")); + ReaderForm reader = (ReaderForm) readerDAO.queryM(readerForm); + request.setAttribute("readerinfo", reader); + //ѯߵĽϢ + request.setAttribute("borrowinfo",borrowDAO.borrowinfo(request.getParameter("barcode"))); + //ɽ + String f = request.getParameter("f"); + String key = request.getParameter("inputkey"); + if (key != null && !key.equals("")) { + String operator = request.getParameter("operator"); + BookForm bookForm=bookDAO.queryB(f, key); + if (bookForm!=null){ + int ret = borrowDAO.insertBorrow(reader, bookDAO.queryB(f, key), + operator); + if (ret == 1) { + request.setAttribute("bar", request.getParameter("barcode")); + request.getRequestDispatcher("bookBorrow_ok.jsp").forward(request, response); + + } else { + request.setAttribute("error", "ӽϢʧ!"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + }else{ + request.setAttribute("error", "ûиͼ!"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + }else{ + request.getRequestDispatcher("bookBorrow.jsp").forward(request, response); + } + } + /*********************ͼ̽***********************/ + private void bookrenew(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //ѯϢ + readerForm.setBarcode(request.getParameter("barcode")); + ReaderForm reader = (ReaderForm) readerDAO.queryM(readerForm); + request.setAttribute("readerinfo", reader); + //ѯߵĽϢ + request.setAttribute("borrowinfo",borrowDAO.borrowinfo(request.getParameter("barcode"))); + if(request.getParameter("id")!=null){ + int id = Integer.parseInt(request.getParameter("id")); + if (id > 0) { //ִм̽ + int ret = borrowDAO.renew(id); + if (ret == 0) { + request.setAttribute("error", "ͼ̽ʧ!"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } else { + request.setAttribute("bar", request.getParameter("barcode")); + request.getRequestDispatcher("bookRenew_ok.jsp").forward(request, response); + } + } + }else{ + request.getRequestDispatcher("bookRenew.jsp").forward(request, response); + } + } + /*********************ͼ黹***********************/ + private void bookback(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + //ѯϢ + readerForm.setBarcode(request.getParameter("barcode")); + ReaderForm reader = (ReaderForm) readerDAO.queryM(readerForm); + request.setAttribute("readerinfo", reader); + //ѯߵĽϢ + request.setAttribute("borrowinfo",borrowDAO.borrowinfo(request.getParameter("barcode"))); + if(request.getParameter("id")!=null){ + int id = Integer.parseInt(request.getParameter("id")); + String operator=request.getParameter("operator"); + if (id > 0) { //ִй黹 + int ret = borrowDAO.back(id,operator); + if (ret == 0) { + request.setAttribute("error", "ͼ黹ʧ!"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } else { + request.setAttribute("bar", request.getParameter("barcode")); + request.getRequestDispatcher("bookBack_ok.jsp").forward(request, response); + } + } + }else{ + request.getRequestDispatcher("bookBack.jsp").forward(request, response); + } + } + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + +doGet(request, response); +} +} diff --git a/12/src/com/action/Library.java b/12/src/com/action/Library.java new file mode 100644 index 0000000..46ded7e --- /dev/null +++ b/12/src/com/action/Library.java @@ -0,0 +1,63 @@ +package com.action; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.actionForm.LibraryForm; +import com.dao.LibraryDAO; + +public class Library extends HttpServlet { + LibraryDAO libraryDAO=null; + public Library(){ + libraryDAO=new LibraryDAO(); + } + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String str=request.getParameter("action"); + if("libraryQuery".equals(str)){ + libraryModifyQuery(request,response); + }else if("libraryModify".equals(str)){ + libraryModify(request,response); + } + } + + + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + doGet(request, response); + } + + + private void libraryModify(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + LibraryForm libraryForm = new LibraryForm(); + libraryForm.setId(1); + libraryForm.setLibraryname(request.getParameter("libraryname")); + libraryForm.setCurator(request.getParameter("curator")); + libraryForm.setTel(request.getParameter("tel")); + libraryForm.setAddress(request.getParameter("address")); + libraryForm.setEmail(request.getParameter("email")); + libraryForm.setUrl(request.getParameter("url")); + libraryForm.setCreateDate(request.getParameter("createDate")); + libraryForm.setIntroduce(request.getParameter("introduce")); + int ret = libraryDAO.update(libraryForm); + if (ret ==0) { + request.setAttribute("error", "ͼϢ޸ʧܣ"); + request.getRequestDispatcher("error.jsp").forward(request, response); + } else { + request.getRequestDispatcher("library_ok.jsp?para=2").forward(request, response); + } + + } + private void libraryModifyQuery(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + request.setAttribute("libraryModifyif",libraryDAO.query()); + request.getRequestDispatcher("library_modify.jsp").forward(request, response); + } +} diff --git a/12/src/com/action/Manager.java b/12/src/com/action/Manager.java new file mode 100644 index 0000000..038b4ed --- /dev/null +++ b/12/src/com/action/Manager.java @@ -0,0 +1,190 @@ +package com.action; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import com.actionForm.ManagerForm; +import com.dao.ManagerDAO; +import javax.servlet.http.HttpSession; +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; + +public class Manager extends HttpServlet { + private ManagerDAO managerDAO = null; // ManagerDAOĶ + + public Manager() { + this.managerDAO = new ManagerDAO(); // ʵManagerDAO + } + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String action = request.getParameter("action"); + System.out.println("ȡIJѯַ" + action); + if (action == null || "".equals(action)) { + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else if ("login".equals(action)) {// actionֵΪloginʱmanagerLogin()֤Ա + managerLogin(request, response); + } else if ("managerAdd".equals(action)) { + managerAdd(request, response);// ӹԱϢ + } else if ("managerQuery".equals(action)) { + managerQuery(request, response);// ѯԱȨϢ + } else if ("managerModifyQuery".equals(action)) { + managerModifyQuery(request, response);// ùԱȨʱѯԱϢ + } else if ("managerModify".equals(action)) { + managerModify(request, response);// ùԱȨ + } else if ("managerDel".equals(action)) { + managerDel(request, response);// ɾԱ + } else if ("querypwd".equals(action)) { + pwdQuery(request, response);// ĿʱӦõIJѯ + } else if ("modifypwd".equals(action)) { + modifypwd(request, response); // Ŀ + } + } + + // Ա֤ + + public void managerLogin(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ManagerForm managerForm = new ManagerForm();//ʵmanagerForm + managerForm.setName(request.getParameter("name"));//ȡԱƲname + managerForm.setPwd(request.getParameter("pwd"));//ȡԱ벢pwd + int ret = managerDAO.checkManager(managerForm);//ManagerDAOcheckManager() + if (ret == 1) { + /**********¼ϵͳĹԱƱ浽session***********************************/ + HttpSession session=request.getSession(); + session.setAttribute("manager",managerForm.getName()); + /***********************************************************************************/ + request.getRequestDispatcher("main.jsp").forward(request, response);//תϵͳ + } else { + request.setAttribute("error", "ĹԱƻ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response);//תʾҳ + } + } + + // ѯԱϢ + private void managerQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + String str = null; + request.setAttribute("managerQuery", managerDAO.query(str)); + request.getRequestDispatcher("manager.jsp").forward(request, response); + } + + // ӹԱϢ + private void managerAdd(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ManagerForm managerForm = new ManagerForm(); + managerForm.setName(request.getParameter("name")); // ȡùԱ + managerForm.setPwd(request.getParameter("pwd")); // ȡ + int ret = managerDAO.insert(managerForm); // ӹԱϢ + if (ret == 1) { + request.getRequestDispatcher("manager_ok.jsp?para=1").forward( + request, response); // תԱϢӳɹҳ + + } else if (ret == 2) { + request.setAttribute("error", "ùԱϢѾӣ"); // Ϣ浽error + request.getRequestDispatcher("error.jsp") + .forward(request, response); // תʾҳ + } else { + request.setAttribute("error", "ӹԱϢʧܣ"); // Ϣ浽error + request.getRequestDispatcher("error.jsp") + .forward(request, response); // תʾҳ + } + } + + // ѯ޸ĹԱϢ + private void managerModifyQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ManagerForm managerForm = new ManagerForm(); + managerForm.setId(Integer.valueOf(request.getParameter("id")));// ȡùID + System.out.print("ѯid:" + request.getParameter("id")); + request.setAttribute("managerQueryif", managerDAO + .query_update(managerForm)); + request.getRequestDispatcher("manager_Modify.jsp").forward(request, + response); // תȨóɹҳ + } + + // ޸ʱѯ + private void pwdQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ManagerForm managerForm = new ManagerForm(); + HttpSession session = request.getSession(); + String manager = (String) session.getAttribute("manager"); + managerForm.setName(manager); + System.out.print("ѯmanager:" + manager); + request.setAttribute("pwdQueryif", managerDAO.query_pwd(managerForm)); + request.getRequestDispatcher("pwd_Modify.jsp").forward(request, + response); + } + + // ԱȨ + private void managerModify(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ManagerForm managerForm = new ManagerForm(); + managerForm.setId(Integer.parseInt(request.getParameter("id"))); // ȡùԱID + managerForm.setName(request.getParameter("name")); // ȡùԱ + managerForm.setPwd(request.getParameter("pwd")); // ȡùԱ + managerForm.setSysset(request.getParameter("sysset") == null ? 0 + : Integer.parseInt(request.getParameter("sysset"))); // ȡϵͳȨ + managerForm.setReaderset(request.getParameter("readerset") == null ? 0 + : Integer.parseInt(request.getParameter("readerset"))); // ȡö߹Ȩ + managerForm.setBookset(request.getParameter("bookset") == null ? 0 + : Integer.parseInt(request.getParameter("bookset"))); // ȡͼȨ + managerForm + .setBorrowback(request.getParameter("borrowback") == null ? 0 + : Integer.parseInt(request.getParameter("borrowback"))); // ȡͼ軹Ȩ + managerForm.setSysquery(request.getParameter("sysquery") == null ? 0 + : Integer.parseInt(request.getParameter("sysquery"))); // ȡϵͳѯȨ + int ret = managerDAO.update(managerForm); // ùԱȨ޵ķ + if (ret == 0) { + request.setAttribute("error", "ùԱȨʧܣ"); // ʾϢerror + request.getRequestDispatcher("error.jsp") + .forward(request, response); // תʾҳ + } else { + request.getRequestDispatcher("manager_ok.jsp?para=2").forward( + request, response);// תȨóɹҳ + } + } + + // ɾԱϢ + private void managerDel(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ManagerForm managerForm = new ManagerForm(); + managerForm.setId(Integer.valueOf(request.getParameter("id"))); // ȡùԱID + int ret = managerDAO.delete(managerForm); // ɾϢķdelete() + if (ret == 0) { + request.setAttribute("error", "ɾԱϢʧܣ"); // ʾϢerror + request.getRequestDispatcher("error.jsp") + .forward(request, response); // תʾҳ + } else { + request.getRequestDispatcher("manager_ok.jsp?para=3").forward( + request, response); // תɾԱϢɹҳ + } + } + + // ޸ĹԱ + private void modifypwd(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ManagerForm managerForm = new ManagerForm(); + managerForm.setName(request.getParameter("name")); + managerForm.setPwd(request.getParameter("pwd")); + int ret = managerDAO.updatePwd(managerForm); + if (ret == 0) { + request.setAttribute("error", "Ŀʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("pwd_ok.jsp").forward(request, + response); + } + } + + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + doGet(request, response); + } + +} diff --git a/12/src/com/action/Parameter.java b/12/src/com/action/Parameter.java new file mode 100644 index 0000000..d19b05f --- /dev/null +++ b/12/src/com/action/Parameter.java @@ -0,0 +1,62 @@ +package com.action; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.actionForm.LibraryForm; +import com.actionForm.ParameterForm; +import com.dao.LibraryDAO; +import com.dao.ParameterDAO; + +public class Parameter extends HttpServlet { + ParameterDAO parameterDAO = null; + + public Parameter() { + parameterDAO = new ParameterDAO(); + } + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String str = request.getParameter("action"); + if ("parameterQuery".equals(str)) { + parameterModifyQuery(request, response); + } else if ("parameterModify".equals(str)) { + parameterModify(request, response); + } + } + + private void parameterModify(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ParameterForm parameterForm = new ParameterForm(); + parameterForm.setId(1); + parameterForm.setCost(Integer.parseInt(request.getParameter("cost"))); + parameterForm.setValidity(Integer.parseInt(request.getParameter("validity"))); + int ret = parameterDAO.update(parameterForm); + if (ret == 0) { + request.setAttribute("error", "Ϣ޸ʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("parameter_ok.jsp?para=2").forward(request, + response); + } + + } + + private void parameterModifyQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + request.setAttribute("parameterModifyif", parameterDAO.query()); + request.getRequestDispatcher("parameter_modify.jsp").forward(request, + response); + } + + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + doGet(request, response); + } +} diff --git a/12/src/com/action/Reader.java b/12/src/com/action/Reader.java new file mode 100644 index 0000000..6cb5a34 --- /dev/null +++ b/12/src/com/action/Reader.java @@ -0,0 +1,156 @@ +package com.action; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import com.actionForm.ReaderForm; +import com.dao.ReaderDAO; + +import java.io.IOException; +import java.util.Date; + +public class Reader extends HttpServlet { + private ReaderDAO readerDAO = null; + + public Reader() { + this.readerDAO = new ReaderDAO(); + } + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String action = request.getParameter("action"); + System.out.println("\nreader*********************action=" + action); + if (action == null || "".equals(action)) { + request.setAttribute("error", "IJ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else if ("readerAdd".equals(action)) { + readerAdd(request, response); + } else if ("readerQuery".equals(action)) { + readerQuery(request, response); + } else if ("readerModifyQuery".equals(action)) { + readerModifyQuery(request, response); + } else if ("readerModify".equals(action)) { + readerModify(request, response); + } else if ("readerDel".equals(action)) { + readerDel(request, response); + } else if ("readerDetail".equals(action)) { + readerDetail(request, response); + } + } + + /*********************** ӶϢ **************************/ + private void readerAdd(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ReaderForm readerForm = new ReaderForm(); + readerForm.setName(request.getParameter("name")); + readerForm.setSex(request.getParameter("sex")); + readerForm.setBarcode(request.getParameter("barcode")); + readerForm.setVocation(request.getParameter("vocation")); + readerForm.setBirthday(request.getParameter("birthday")); + readerForm.setPaperType(request.getParameter("paperType")); + readerForm.setPaperNO(request.getParameter("paperNO")); + readerForm.setTel(request.getParameter("tel")); + readerForm.setEmail(request.getParameter("email")); + // ȡϵͳ + Date date1 = new Date(); + java.sql.Date date = new java.sql.Date(date1.getTime()); + readerForm.setCreateDate(date.toString()); + readerForm.setOperator(request.getParameter("operator")); + readerForm.setRemark(request.getParameter("remark")); + readerForm.setTypeid(Integer.parseInt(request.getParameter("typeid"))); + int a = readerDAO.insert(readerForm); + if (a == 0) { + request.setAttribute("error", "Ϣʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else if (a == 2) { + request.setAttribute("error", "öϢѾӣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("reader_ok.jsp?para=1").forward( + request, response); + } + } + + /*********************** ѯȫϢ **************************/ + private void readerQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + String str = null; + request.setAttribute("reader", readerDAO.query(str)); + request.getRequestDispatcher("reader.jsp").forward(request, response); + } + + /*********************** ѯ޸ĶϢ **************************/ + private void readerModifyQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ReaderForm readerForm = new ReaderForm(); + System.out.println("ѯ޸ĶϢ" + request.getParameter("ID")); + readerForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("readerQueryif", readerDAO.queryM(readerForm)); + request.getRequestDispatcher("reader_Modify.jsp").forward(request, + response); + } + + /*********************** ѯϸϢ **************************/ + private void readerDetail(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ReaderForm readerForm = new ReaderForm(); + readerForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("readerDetail", readerDAO.queryM(readerForm)); + request.getRequestDispatcher("reader_detail.jsp").forward(request, + response); + } + + /*********************** ޸ĶϢ **************************/ + private void readerModify(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ReaderForm readerForm = new ReaderForm(); + readerForm.setId(Integer.parseInt(request.getParameter("id"))); + readerForm.setName(request.getParameter("name")); + readerForm.setSex(request.getParameter("sex")); + readerForm.setBarcode(request.getParameter("barcode")); + readerForm.setVocation(request.getParameter("vocation")); + readerForm.setBirthday(request.getParameter("birthday")); + readerForm.setPaperType(request.getParameter("paperType")); + readerForm.setPaperNO(request.getParameter("paperNO")); + readerForm.setTel(request.getParameter("tel")); + readerForm.setEmail(request.getParameter("email")); + readerForm.setOperator(request.getParameter("operator")); + readerForm.setRemark(request.getParameter("remark")); + readerForm.setTypeid(Integer.parseInt(request.getParameter("typeid"))); + int ret = readerDAO.update(readerForm); + if (ret == 0) { + request.setAttribute("error", "޸ĶϢʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("reader_ok.jsp?para=2").forward( + request, response); + } + } + + /*********************** ɾϢ **************************/ + private void readerDel(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ReaderForm readerForm = new ReaderForm(); + readerForm.setId(Integer.valueOf(request.getParameter("ID"))); + int ret = readerDAO.delete(readerForm); + if (ret == 0) { + request.setAttribute("error", "ɾϢʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("reader_ok.jsp?para=3").forward( + request, response); + } + } + + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + doGet(request, response); + } +} diff --git a/12/src/com/action/ReaderType.java b/12/src/com/action/ReaderType.java new file mode 100644 index 0000000..a97e740 --- /dev/null +++ b/12/src/com/action/ReaderType.java @@ -0,0 +1,152 @@ +package com.action; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import com.actionForm.ReaderTypeForm; +import com.dao.ReaderTypeDAO; + +public class ReaderType extends HttpServlet { + private ReaderTypeDAO readerTypeDAO = null; + + public ReaderType() { + this.readerTypeDAO = new ReaderTypeDAO(); + } + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String action = request.getParameter("action"); + System.out.println("\nreaderType*********************action=" + action); + if (action == null || "".equals(action)) { + request.setAttribute("error", "IJ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else if ("readerTypeAdd".equals(action)) { + readerTypeAdd(request, response); + } else if ("readerTypeQuery".equals(action)) { + readerTypeQuery(request, response); + } else if ("readerTypeModifyQuery".equals(action)) { + readerTypeModifyQuery(request, response); + } else if ("readerTypeModify".equals(action)) { + readerTypeModify(request, response); + } else if ("readerTypeDel".equals(action)) { + readerTypeDel(request, response); + } + } + + /*********************** + * ӶϢ + * + * @throws IOException + * @throws ServletException + * * + *************************/ + private void readerTypeAdd(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ReaderTypeForm readerTypeForm = new ReaderTypeForm(); + System.out.println("servlet:" + request.getParameter("name")); + readerTypeForm.setName(request.getParameter("name")); + readerTypeForm.setNumber(Integer.parseInt(request + .getParameter("number"))); + int a = readerTypeDAO.insert(readerTypeForm); + if (a == 0) { + request.setAttribute("error", "Ϣʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else if (a == 2) { + request.setAttribute("error", "öϢѾӣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("readerType_ok.jsp?para=1").forward( + request, response); + } + } + + /*********************** + * ѯȫϢ + * + * @throws IOException + * @throws ServletException + * * + *************************/ + private void readerTypeQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + String str = null; + request.setAttribute("readerType", readerTypeDAO.query(str)); + request.getRequestDispatcher("readerType.jsp").forward(request, + response); + } + + /*********************** + * ѯ޸ĶϢ + * + * @throws IOException + * @throws ServletException + * * + *************************/ + private void readerTypeModifyQuery(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ReaderTypeForm readerTypeForm = new ReaderTypeForm(); + readerTypeForm.setId(Integer.valueOf(request.getParameter("ID"))); + request.setAttribute("readerTypeQueryif", readerTypeDAO + .queryM(readerTypeForm)); + request.getRequestDispatcher("readerType_Modify.jsp").forward(request, + response); + } + + /*********************** + * ޸ĶϢ + * + * @throws IOException + * @throws ServletException + * * + *************************/ + private void readerTypeModify(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ReaderTypeForm readerTypeForm = new ReaderTypeForm(); + readerTypeForm.setId(Integer.parseInt(request.getParameter("id"))); + readerTypeForm.setName(request.getParameter("name")); + readerTypeForm.setNumber(Integer.parseInt(request + .getParameter("number"))); + int ret = readerTypeDAO.update(readerTypeForm); + if (ret == 0) { + request.setAttribute("error", "޸ĶϢʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("readerType_ok.jsp?para=2").forward( + request, response); + } + } + + /*********************** + * ɾϢ + * + * @throws IOException + * @throws ServletException + * * + *************************/ + private void readerTypeDel(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + ReaderTypeForm readerTypeForm = new ReaderTypeForm(); + readerTypeForm.setId(Integer.valueOf(request.getParameter("ID"))); + int ret = readerTypeDAO.delete(readerTypeForm); + if (ret == 0) { + request.setAttribute("error", "ɾϢʧܣ"); + request.getRequestDispatcher("error.jsp") + .forward(request, response); + } else { + request.getRequestDispatcher("readerType_ok.jsp?para=3").forward( + request, response); + } + } + + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + doGet(request, response); + } +} diff --git a/12/src/com/actionForm/BookCaseForm.java b/12/src/com/actionForm/BookCaseForm.java new file mode 100644 index 0000000..77a52eb --- /dev/null +++ b/12/src/com/actionForm/BookCaseForm.java @@ -0,0 +1,25 @@ +package com.actionForm; + +public class BookCaseForm { + private Integer id; + private String name; + //췽 + public BookCaseForm(){ + } + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + +} diff --git a/12/src/com/actionForm/BookForm.java b/12/src/com/actionForm/BookForm.java new file mode 100644 index 0000000..ea15f5d --- /dev/null +++ b/12/src/com/actionForm/BookForm.java @@ -0,0 +1,162 @@ +package com.actionForm; + +public class BookForm { + private String author; + private String barcode; + private String bookName; + private String bookcaseName; + private int bookcaseid; + private int days; + private int del; + private Integer id; + private String inTime; + private String isbn; + private String operator; + private int page; + private Float price; + private String publishing; + + private String translator; + private int typeId; + private String typeName; + public BookForm(){ + } + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public void setTypeName(String typeName) { + this.typeName = typeName; + } + + public void setTypeId(int typeId) { + this.typeId = typeId; + } + + public void setTranslator(String translator) { + this.translator = translator; + } + + + public void setPublishing(String publishing) { + this.publishing = publishing; + } + + public void setPrice(Float price) { + this.price = price; + } + + public void setPage(int page) { + this.page = page; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public void setIsbn(String isbn) { + this.isbn = isbn; + } + + public void setInTime(String inTime) { + this.inTime = inTime; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setDel(int del) { + this.del = del; + } + + public void setDays(int days) { + this.days = days; + } + + public void setBookcaseid(int bookcaseid) { + this.bookcaseid = bookcaseid; + } + + public void setBookcaseName(String bookcaseName) { + this.bookcaseName = bookcaseName; + } + + public void setBookName(String bookName) { + this.bookName = bookName; + } + + public void setBarcode(String barcode) { + this.barcode = barcode; + } + + public String getBarcode() { + return barcode; + } + + public String getBookName() { + return bookName; + } + + public String getBookcaseName() { + return bookcaseName; + } + + public int getBookcaseid() { + return bookcaseid; + } + + public int getDays() { + return days; + } + + public int getDel() { + return del; + } + + public Integer getId() { + return id; + } + + public String getInTime() { + return inTime; + } + + public String getIsbn() { + return isbn; + } + + public String getOperator() { + return operator; + } + + public int getPage() { + return page; + } + + public Float getPrice() { + return price; + } + + public String getPublishing() { + return publishing; + } + + + public String getTranslator() { + return translator; + } + + public int getTypeId() { + return typeId; + } + + public String getTypeName() { + return typeName; + } + +} diff --git a/12/src/com/actionForm/BookTypeForm.java b/12/src/com/actionForm/BookTypeForm.java new file mode 100644 index 0000000..af67957 --- /dev/null +++ b/12/src/com/actionForm/BookTypeForm.java @@ -0,0 +1,32 @@ +package com.actionForm; + +public class BookTypeForm { + private int days; + private Integer id; + private String typeName; + + public void setTypeName(String typeName) { + this.typeName = typeName; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setDays(int days) { + this.days = days; + } + + public int getDays() { + return days; + } + + public Integer getId() { + return id; + } + + public String getTypeName() { + return typeName; + } + +} diff --git a/12/src/com/actionForm/BorrowForm.java b/12/src/com/actionForm/BorrowForm.java new file mode 100644 index 0000000..0611fe2 --- /dev/null +++ b/12/src/com/actionForm/BorrowForm.java @@ -0,0 +1,192 @@ +package com.actionForm; + +public class BorrowForm{ + private String backTime; + private String bookBarcode; + private int bookId; + private String bookName; + private String bookcaseName; + private String borrowTime; + private Integer id; + private int ifBack; + private String operator; + private Float price; + private String pubName; + private String readerBarcode; + private int readerId; + private int degree; + private String author; + + private String bookType; + private String readerName; + private String sex; + private String birthday; + private String paperType; + private String paperNo; + private String tel; + private String readerType; + public String getBackTime() { + return backTime; + } + + public void setBackTime(String backTime) { + this.backTime = backTime; + } + + public void setReaderId(int readerId) { + this.readerId = readerId; + } + + public void setReaderBarcode(String readerBarcode) { + this.readerBarcode = readerBarcode; + } + + public void setPubName(String pubName) { + this.pubName = pubName; + } + + public void setPrice(Float price) { + this.price = price; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public void setIfBack(int ifBack) { + this.ifBack = ifBack; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setBorrowTime(String borrowTime) { + this.borrowTime = borrowTime; + } + + public void setBookcaseName(String bookcaseName) { + this.bookcaseName = bookcaseName; + } + + public void setBookName(String bookName) { + this.bookName = bookName; + } + + public void setBookId(int bookId) { + this.bookId = bookId; + } + + public void setBookBarcode(String bookBarcode) { + this.bookBarcode = bookBarcode; + } + public void setDegree(int degree) { + this.degree=degree; + } + + public String getBookBarcode() { + return bookBarcode; + } + + public int getBookId() { + return bookId; + } + + public String getBookName() { + return bookName; + } + + public String getBookcaseName() { + return bookcaseName; + } + + public String getBorrowTime() { + return borrowTime; + } + + public Integer getId() { + return id; + } + + public int getIfBack() { + return ifBack; + } + + public String getOperator() { + return operator; + } + + public Float getPrice() { + return price; + } + + public String getPubName() { + return pubName; + } + + public String getReaderBarcode() { + return readerBarcode; + } + + public int getReaderId() { + return readerId; + } + public int getDegree() { + return degree; + } + public void setAuthor(String author) { + this.author = author; + } + public String getAuthor() { + return author; + } + + public void setBookType(String bookType) { + this.bookType = bookType; + } + public String getBookType() { + return bookType; + } + public void setReaderName(String readerName) { + this.readerName = readerName; + } + public String getReaderName() { + return readerName; + } + public void setSex(String sex) { + this.sex = sex; + } + public String getSex() { + return sex; + } + public void setBirthday(String birthday) { + this.birthday = birthday; + } + public String getBirthday() { + return birthday; + } + public void setPaperType(String paperType) { + this.paperType = paperType; + } + public String getPaperType() { + return paperType; + } + public void setPaperNo(String paperNo) { + this.paperNo = paperNo; + } + public String getPaperNo() { + return paperNo; + } + public void setTel(String tel) { + this.tel = tel; + } + public String getTel() { + return tel; + } + public void setReaderType(String readerType) { + this.readerType =readerType; + } + public String getReaderType() { + return readerType; + } +} diff --git a/12/src/com/actionForm/LibraryForm.java b/12/src/com/actionForm/LibraryForm.java new file mode 100644 index 0000000..ab09165 --- /dev/null +++ b/12/src/com/actionForm/LibraryForm.java @@ -0,0 +1,87 @@ +package com.actionForm; + +public class LibraryForm{ + private String address; + private String curator; + private String email; + private Integer id; + private String introduce; + private String libraryname; + private String tel; + private String createDate; + private String url; + public LibraryForm(){ + } + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public void setUrl(String url) { + this.url = url; + } + + public void setCreateDate(String createDate) { + this.createDate = createDate; + } + + public void setTel(String tel) { + this.tel = tel; + } + + public void setLibraryname(String libraryname) { + this.libraryname = libraryname; + } + + public void setIntroduce(String introduce) { + this.introduce = introduce; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setEmail(String email) { + this.email = email; + } + + public void setCurator(String curator) { + this.curator = curator; + } + + public String getCurator() { + return curator; + } + + public String getEmail() { + return email; + } + + public Integer getId() { + return id; + } + + public String getIntroduce() { + return introduce; + } + + public String getLibraryname() { + return libraryname; + } + + public String getTel() { + return tel; + } + + public String getCreateDate() { + return createDate; + } + + public String getUrl() { + return url; + } + +} diff --git a/12/src/com/actionForm/ManagerForm.java b/12/src/com/actionForm/ManagerForm.java new file mode 100644 index 0000000..1f146f0 --- /dev/null +++ b/12/src/com/actionForm/ManagerForm.java @@ -0,0 +1,66 @@ +package com.actionForm; + +public class ManagerForm { + private Integer id=new Integer(-1); //ԱID + private String name=""; //Ա + private String pwd=""; //Ա + private int sysset=0; //ϵͳȨ + private int readerset=0; //߹Ȩ + private int bookset=0; //ͼȨ + private int borrowback=0; //ͼ軹Ȩ + private int sysquery=0; //ϵͳѯȨ + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setPwd(String pwd) { + this.pwd = pwd; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public String getPwd() { + return pwd; + } + + public void setSysset(int sysset){ + this.sysset=sysset; + } + public int getSysset(){ + return sysset; + } + public int getReaderset(){ + return readerset; + } + public void setReaderset(int readerset){ + this.readerset=readerset; + } + public void setBookset(int bookset){ + this.bookset=bookset; + } + public int getBookset(){ + return bookset; + } + public void setBorrowback(int borrowback){ + this.borrowback=borrowback; + } + public int getBorrowback(){ + return borrowback; + } + public void setSysquery(int sysquery){ + this.sysquery=sysquery; + } + public int getSysquery(){ + return sysquery; + } +} diff --git a/12/src/com/actionForm/ParameterForm.java b/12/src/com/actionForm/ParameterForm.java new file mode 100644 index 0000000..0b44b5c --- /dev/null +++ b/12/src/com/actionForm/ParameterForm.java @@ -0,0 +1,32 @@ +package com.actionForm; + +public class ParameterForm{ + private int cost; + private Integer id; + private int validity; + public ParameterForm(){ + } + public int getCost() { + return cost; + } + + public void setCost(int cost) { + this.cost = cost; + } + + public void setValidity(int validity) { + this.validity = validity; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getId() { + return id; + } + + public int getValidity() { + return validity; + } +} diff --git a/12/src/com/actionForm/PublishingForm.java b/12/src/com/actionForm/PublishingForm.java new file mode 100644 index 0000000..03e7728 --- /dev/null +++ b/12/src/com/actionForm/PublishingForm.java @@ -0,0 +1,21 @@ +package com.actionForm; + +public class PublishingForm{ + private String isbn; + private String pubname; + public String getIsbn() { + return isbn; + } + + public void setIsbn(String isbn) { + this.isbn = isbn; + } + + public void setPubname(String pubname) { + this.pubname = pubname; + } + + public String getPubname() { + return pubname; + } +} diff --git a/12/src/com/actionForm/ReaderForm.java b/12/src/com/actionForm/ReaderForm.java new file mode 100644 index 0000000..e09eb2e --- /dev/null +++ b/12/src/com/actionForm/ReaderForm.java @@ -0,0 +1,145 @@ +package com.actionForm; + +public class ReaderForm{ + private String barcode; + private String birthday; + private String createDate; + private String email; + private Integer id; + private String name; + private String operator; + private String paperNO; + private String paperType; + private String remark; + private String sex; + private String tel; + private String vocation; + private int typeid; + private String typename; + private int number; + public ReaderForm(){ + } + public String getBarcode() { + return barcode; + } + + public void setBarcode(String barcode) { + this.barcode = barcode; + } + + public void setVocation(String vocation) { + this.vocation = vocation; + } + + public void setTel(String tel) { + this.tel = tel; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public void setPaperType(String paperType) { + this.paperType = paperType; + } + + public void setPaperNO(String paperNO) { + this.paperNO = paperNO; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public void setName(String name) { + this.name = name; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setEmail(String email) { + this.email = email; + } + + public void setCreateDate(String createDate) { + this.createDate = createDate; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getBirthday() { + return birthday; + } + + public String getCreateDate() { + return createDate; + } + + public String getEmail() { + return email; + } + + public Integer getId() { + return id; + } + + public String getName() { + return name; + } + + public String getOperator() { + return operator; + } + + public String getPaperNO() { + return paperNO; + } + + public String getPaperType() { + return paperType; + } + + public String getRemark() { + return remark; + } + + public String getSex() { + return sex; + } + + public String getTel() { + return tel; + } + + public String getVocation() { + return vocation; + } + public int getTypeid(){ + return typeid; + } + + public void setTypeid(int typeid){ + this.typeid=typeid; + } + public int getNumber(){ + return number; + } + + public void setNumber(int number){ + this.number=number; + } + public String getTypename() { + return typename; + } + public void setTypename(String typename){ + this.typename=typename; + } +} diff --git a/12/src/com/actionForm/ReaderTypeForm.java b/12/src/com/actionForm/ReaderTypeForm.java new file mode 100644 index 0000000..8d221cc --- /dev/null +++ b/12/src/com/actionForm/ReaderTypeForm.java @@ -0,0 +1,33 @@ +package com.actionForm; + +public class ReaderTypeForm{ + private Integer id; + private String name; + private int number; + public ReaderTypeForm(){ + } + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public void setNumber(int number) { + this.number = number; + } + + public int getNumber() { + return number; + } + +} diff --git a/12/src/com/connDB.properties b/12/src/com/connDB.properties new file mode 100644 index 0000000..e7d7297 --- /dev/null +++ b/12/src/com/connDB.properties @@ -0,0 +1,4 @@ +#DB_CLASS_NAME(???????? +DB_CLASS_NAME=com.mysql.jdbc.Driver +#DB_URL??????????? +DB_URL=jdbc:mysql://127.0.0.1:3306/db_librarySys?user=root&password=111&useUnicode=true diff --git a/12/src/com/core/ChStr.java b/12/src/com/core/ChStr.java new file mode 100644 index 0000000..9f13a6f --- /dev/null +++ b/12/src/com/core/ChStr.java @@ -0,0 +1,25 @@ +package com.core; + +public class ChStr { + + + // ַеĿֵ + public static final String nullToString(String v, String toV) { + if (v == null || "".equals(v)) { //vΪʱ + v = toV; //vֵΪtoV + } + return v; //תv + } + //Σַ + public static final String filterStr(String str){ + str=str.replaceAll(";",""); + str=str.replaceAll("&","&"); + str=str.replaceAll("<","<"); + str=str.replaceAll(">",">"); + str=str.replaceAll("'",""); + str=str.replaceAll("--"," "); + str=str.replaceAll("/",""); + str=str.replaceAll("%",""); + return str; + } +} diff --git a/12/src/com/core/ConnDB.java b/12/src/com/core/ConnDB.java new file mode 100644 index 0000000..32643e2 --- /dev/null +++ b/12/src/com/core/ConnDB.java @@ -0,0 +1,94 @@ +package com.core; + +import java.io.InputStream; +import java.sql.*; +import java.util.Properties; + +public class ConnDB { + public Connection conn = null; + public Statement stmt = null; + public ResultSet rs = null; + private static String propFileName = "/com/connDB.properties"; //ָԴļλ + private static Properties prop = new Properties(); + private static String dbClassName ="com.mysql.jdbc.Driver"; + private static String dbUrl = + "jdbc:mysql://127.0.0.1:3306/db_librarySys?user=root&password=111&useUnicode=true"; + public ConnDB(){ + try { + InputStream in=getClass().getResourceAsStream(propFileName); + prop.load(in); //ͨPropertiesļ + dbClassName = prop.getProperty("DB_CLASS_NAME"); //ȡݿ + dbUrl = prop.getProperty("DB_URL",dbUrl); + } + catch (Exception e) { + e.printStackTrace(); //쳣Ϣ + } + } + + public static Connection getConnection() { + Connection conn = null; + try { + Class.forName(dbClassName).newInstance(); + conn = DriverManager.getConnection(dbUrl); + } + catch (Exception ee) { + ee.printStackTrace(); + } + if (conn == null) { + System.err.println( + ": DbConnectionManager.getConnection() ݿʧ.\r\n\r\n:" + + dbClassName + "\r\nλ:" + dbUrl); + } + return conn; + } + + /* + * ܣִвѯ + */ + public ResultSet executeQuery(String sql) { + try { + conn = getConnection(); + stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = stmt.executeQuery(sql); + } catch (SQLException ex) { + System.err.println(ex.getMessage()); + } + return rs; + } + + /* + * :ִи² + */ + public int executeUpdate(String sql) { + int result = 0; + try { + conn = getConnection(); //getConnection()Connectionһʵconn + stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + result = stmt.executeUpdate(sql); //ִи² + } catch (SQLException ex) { + result = 0; + } + return result; + } + + /* + * :رݿ + */ + public void close() { + try { + if (rs != null) { + rs.close(); + } + if (stmt != null) { + stmt.close(); + } + if (conn != null) { + conn.close(); + } + } catch (Exception e) { + e.printStackTrace(System.err); + } + } +} diff --git a/12/src/com/dao/BookCaseDAO.java b/12/src/com/dao/BookCaseDAO.java new file mode 100644 index 0000000..ed356f0 --- /dev/null +++ b/12/src/com/dao/BookCaseDAO.java @@ -0,0 +1,97 @@ +package com.dao; + +import com.core.ConnDB; +import com.actionForm.BookCaseForm; +import java.util.*; +import java.sql.*; + +public class BookCaseDAO { + private ConnDB conn=new ConnDB(); + //ѯ + public Collection query(String strif){ + BookCaseForm bookCaseForm1=null; + Collection bookcaseColl=new ArrayList(); + String sql=""; + if(strif!="all" && strif!=null && strif!=""){ + sql="select * from tb_bookcase where "+strif+""; + }else{ + sql="select * from tb_bookcase"; + } + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + bookCaseForm1=new BookCaseForm(); + bookCaseForm1.setId(Integer.valueOf(rs.getString(1))); + bookCaseForm1.setName(rs.getString(2)); + bookcaseColl.add(bookCaseForm1); + } + } catch (SQLException ex) { + } + conn.close(); + return bookcaseColl; + } + //޸ĵIJѯ + public BookCaseForm queryM(BookCaseForm bookCaseForm){ + BookCaseForm bookCaseForm1=null; + String sql="select * from tb_bookcase where id="+bookCaseForm.getId()+""; + System.out.println("޸ʱSQL"+sql); + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + bookCaseForm1=new BookCaseForm(); + bookCaseForm1.setId(Integer.valueOf(rs.getString(1))); + bookCaseForm1.setName(rs.getString(2)); + } + } catch (SQLException ex) { + } + conn.close(); + return bookCaseForm1; + } + // + public int insert(BookCaseForm bookCaseForm){ + String sql1="SELECT * FROM tb_bookcase WHERE name='"+bookCaseForm.getName()+"'"; + ResultSet rs = conn.executeQuery(sql1); + String sql = ""; + int falg = 0; + try { + if (rs.next()) { + falg = 2; + } else { + sql ="Insert into tb_bookcase (name) values('"+bookCaseForm.getName()+"')"; + falg = conn.executeUpdate(sql); + System.out.println("ϢSQL" + sql); + conn.close(); + } + } catch (SQLException ex) { + falg = 0; + } + System.out.println("falg:"+falg); + return falg; +} + + //޸ + public int update(BookCaseForm bookCaseForm){ + String sql="Update tb_bookcase set name='"+bookCaseForm.getName()+"' where id="+bookCaseForm.getId()+""; + int falg=conn.executeUpdate(sql); + System.out.println("޸ʱSQL"+sql); + conn.close(); + return falg; +} + //ɾ + public int delete(BookCaseForm bookCaseForm){ + String sql_1="SELECT * FROM tb_bookinfo WHERE bookcase="+bookCaseForm.getId()+""; + ResultSet rs=conn.executeQuery(sql_1); + int falg=0; + try { + if(!rs.next()){ + String sql="Delete from tb_bookcase where id="+bookCaseForm.getId()+""; + falg=conn.executeUpdate(sql); + System.out.println("ɾʱSQL"+sql); + } + } catch (Exception e) { + e.printStackTrace(); + } + return falg; + } + +} diff --git a/12/src/com/dao/BookDAO.java b/12/src/com/dao/BookDAO.java new file mode 100644 index 0000000..af767d6 --- /dev/null +++ b/12/src/com/dao/BookDAO.java @@ -0,0 +1,155 @@ +package com.dao; +import com.core.ConnDB; +import java.sql.*; +import java.util.*; +import com.actionForm.BookForm; + +public class BookDAO { + private ConnDB conn=new ConnDB(); +//ѯ +public Collection query(String strif){ +BookForm bookForm=null; +Collection bookColl=new ArrayList(); +String sql=""; +if(strif!="all" && strif!=null && strif!=""){ + sql="select * from (select b.*,c.name as bookcaseName,p.pubname as publishing,t.typename from tb_bookinfo b left join tb_bookcase c on b.bookcase=c.id join tb_publishing p on b.ISBN=p.ISBN join tb_booktype t on b.typeid=t.id where b.del=0) as book where book."+strif+"'"; +}else{ + sql="select b.*,c.name as bookcaseName,p.pubname as publishing,t.typename from tb_bookinfo b left join tb_bookcase c on b.bookcase=c.id join tb_publishing p on b.ISBN=p.ISBN join tb_booktype t on b.typeid=t.id where b.del=0"; +} +System.out.println("ͼѯʱSQL"+sql); +ResultSet rs=conn.executeQuery(sql); +try { + while (rs.next()) { + bookForm=new BookForm(); + bookForm.setBarcode(rs.getString(1)); + bookForm.setBookName(rs.getString(2)); + bookForm.setTypeId(rs.getInt(3)); + bookForm.setAuthor(rs.getString(4)); + bookForm.setTranslator(rs.getString(5)); + bookForm.setIsbn(rs.getString(6)); + bookForm.setPrice(Float.valueOf(rs.getString(7))); //˴ת + bookForm.setPage(rs.getInt(8)); + bookForm.setBookcaseid(rs.getInt(9)); + bookForm.setInTime(rs.getString(10)); + bookForm.setOperator(rs.getString(11)); + bookForm.setDel(rs.getInt(12)); + bookForm.setId(Integer.valueOf(rs.getString(13))); + bookForm.setBookcaseName(rs.getString(14)); + bookForm.setPublishing(rs.getString(15)); + bookForm.setTypeName(rs.getString(16)); + bookColl.add(bookForm); + } +} catch (SQLException ex) { + ex.printStackTrace(); +} +conn.close(); +return bookColl; +} +//޸ĵIJѯ +public BookForm queryM(BookForm bookForm1){ +BookForm bookForm=null; +String sql="select b.*,c.name as bookcaseName,p.pubname as publishing,t.typename from tb_bookinfo b left join tb_bookcase c on b.bookcase=c.id join tb_publishing p on b.ISBN=p.ISBN join tb_booktype t on b.typeid=t.id where b.id="+bookForm1.getId()+""; +System.out.println("޸ʱSQL"+sql); +ResultSet rs=conn.executeQuery(sql); +try { + while (rs.next()) { + bookForm=new BookForm(); + bookForm.setBarcode(rs.getString(1)); + bookForm.setBookName(rs.getString(2)); + bookForm.setTypeId(rs.getInt(3)); + bookForm.setAuthor(rs.getString(4)); + bookForm.setTranslator(rs.getString(5)); + bookForm.setIsbn(rs.getString(6)); + bookForm.setPrice(Float.valueOf(rs.getString(7))); //˴ת + bookForm.setPage(rs.getInt(8)); + bookForm.setBookcaseid(rs.getInt(9)); + bookForm.setInTime(rs.getString(10)); + bookForm.setOperator(rs.getString(11)); + bookForm.setDel(rs.getInt(12)); + bookForm.setId(Integer.valueOf(rs.getString(13))); + bookForm.setBookcaseName(rs.getString(14)); + bookForm.setPublishing(rs.getString(15)); + bookForm.setTypeName(rs.getString(16)); + } +} catch (SQLException ex) { +} +conn.close(); +return bookForm; +} + //ڽĵIJѯ + public BookForm queryB(String f,String key){ + BookForm bookForm=null; + String sql="select b.*,c.name as bookcaseName,p.pubname as publishing,t.typename from tb_bookinfo b left join tb_bookcase c on b.bookcase=c.id join tb_publishing p on b.ISBN=p.ISBN join tb_booktype t on b.typeid=t.id where b."+f+"='"+key+"'"; + System.out.println("ѯϢʱSQL"+sql); + ResultSet rs=conn.executeQuery(sql); + try { + if (rs.next()) { + bookForm=new BookForm(); + bookForm.setBarcode(rs.getString(1)); + bookForm.setBookName(rs.getString(2)); + bookForm.setTypeId(rs.getInt(3)); + bookForm.setAuthor(rs.getString(4)); + bookForm.setTranslator(rs.getString(5)); + bookForm.setIsbn(rs.getString(6)); + bookForm.setPrice(Float.valueOf(rs.getString(7))); //˴ת + bookForm.setPage(rs.getInt(8)); + bookForm.setBookcaseid(rs.getInt(9)); + bookForm.setInTime(rs.getString(10)); + bookForm.setOperator(rs.getString(11)); + bookForm.setDel(rs.getInt(12)); + bookForm.setId(Integer.valueOf(rs.getString(13))); + bookForm.setBookcaseName(rs.getString(14)); + bookForm.setPublishing(rs.getString(15)); + bookForm.setTypeName(rs.getString(16)); + } + } catch (SQLException ex) { + } + conn.close(); + return bookForm; + } + +// +public int insert(BookForm bookForm){ +String sql1="SELECT * FROM tb_bookinfo WHERE barcode='"+bookForm.getBarcode()+"' or bookname='"+bookForm.getBookName()+"'"; +ResultSet rs = conn.executeQuery(sql1); +String sql = ""; +int falg = 0; +try { +if (rs.next()) { + falg = 2; +} else { + sql ="Insert into tb_bookinfo (barcode,bookname,typeid,author,translator,isbn,price,page,bookcase,inTime,operator) values('"+bookForm.getBarcode()+"','"+bookForm.getBookName()+"',"+bookForm.getTypeId()+",'"+bookForm.getAuthor()+"','"+bookForm.getTranslator()+"','"+bookForm.getIsbn()+"',"+bookForm.getPrice()+","+bookForm.getPage()+","+bookForm.getBookcaseid()+",'"+bookForm.getInTime()+"','"+bookForm.getOperator()+"')"; + falg = conn.executeUpdate(sql); + System.out.println("ͼSQL" + sql); + conn.close(); +} +} catch (SQLException ex) { +falg = 0; +} +System.out.println("falg:"+falg); +return falg; +} + +//޸ +public int update(BookForm bookForm){ +String sql="Update tb_bookinfo set typeid="+bookForm.getTypeId()+",author='"+bookForm.getAuthor()+"',translator='"+bookForm.getTranslator()+"',isbn='"+bookForm.getIsbn()+"',price="+bookForm.getPrice()+",page="+bookForm.getPage()+",bookcase="+bookForm.getBookcaseid()+" where id="+bookForm.getId()+""; +int falg=conn.executeUpdate(sql); +System.out.println("޸ʱSQL"+sql); +conn.close(); +return falg; +} +//ɾ +public int delete(BookForm bookForm){ +String sql="UPDATE tb_bookinfo SET del=1 where id="+bookForm.getId()+""; +int falg=conn.executeUpdate(sql); +System.out.println("ɾʱSQL"+sql); +return falg; +} + + + + + + + +} diff --git a/12/src/com/dao/BookTypeDAO.java b/12/src/com/dao/BookTypeDAO.java new file mode 100644 index 0000000..21a88d9 --- /dev/null +++ b/12/src/com/dao/BookTypeDAO.java @@ -0,0 +1,99 @@ +package com.dao; + +import com.core.ConnDB; +import java.sql.*; +import java.util.*; +import com.actionForm.BookTypeForm; + +public class BookTypeDAO { + private ConnDB conn=new ConnDB(); +//ѯ +public Collection query(String strif){ + BookTypeForm bookTypeForm=null; + Collection bookTypeColl=new ArrayList(); + String sql=""; + if(strif!="all" && strif!=null && strif!=""){ + sql="select * from tb_bookType where "+strif+""; + }else{ + sql="select * from tb_bookType"; + } + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + bookTypeForm=new BookTypeForm(); + bookTypeForm.setId(Integer.valueOf(rs.getString(1))); + bookTypeForm.setTypeName(rs.getString(2)); + bookTypeForm.setDays(rs.getInt(3)); + bookTypeColl.add(bookTypeForm); + System.out.print(bookTypeForm.getTypeName()); + } + } catch (SQLException ex) { + } + conn.close(); + return bookTypeColl; +} +//޸ĵIJѯ +public BookTypeForm queryM(BookTypeForm bookTypeForm){ + BookTypeForm bookTypeForm1=null; + String sql="select * from tb_bookType where id="+bookTypeForm.getId()+""; + System.out.println("޸ʱSQL"+sql); + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + bookTypeForm1=new BookTypeForm(); + bookTypeForm1.setId(Integer.valueOf(rs.getString(1))); + bookTypeForm1.setTypeName(rs.getString(2)); + bookTypeForm1.setDays(rs.getInt(3)); + } + } catch (SQLException ex) { + } + conn.close(); + return bookTypeForm1; +} +// +public int insert(BookTypeForm bookTypeForm){ +String sql1="SELECT * FROM tb_bookType WHERE typename='"+bookTypeForm.getTypeName()+"'"; +ResultSet rs = conn.executeQuery(sql1); +String sql = ""; +int falg = 0; +try { + if (rs.next()) { + falg = 2; + } else { + sql ="Insert into tb_bookType (typename,days) values('"+bookTypeForm.getTypeName()+"',"+bookTypeForm.getDays()+")"; + falg = conn.executeUpdate(sql); + System.out.println("ͼ͵SQL" + sql); + conn.close(); + } +} catch (SQLException ex) { + falg = 0; +} +System.out.println("falg:"+falg); +return falg; +} + +//޸ +public int update(BookTypeForm bookTypeForm){ +String sql="Update tb_bookType set typename='"+bookTypeForm.getTypeName()+"',days="+bookTypeForm.getDays()+" where id="+bookTypeForm.getId()+""; +int falg=conn.executeUpdate(sql); +System.out.println("޸ʱSQL"+sql); +conn.close(); +return falg; +} +//ɾ +public int delete(BookTypeForm bookTypeForm){ + String sql_1="SELECT * FROM tb_bookinfo WHERE typeid="+bookTypeForm.getId()+""; + ResultSet rs=conn.executeQuery(sql_1); + int falg=0; + try { + if(!rs.next()){ + String sql="Delete from tb_bookType where id="+bookTypeForm.getId()+""; + falg=conn.executeUpdate(sql); + System.out.println("ɾʱSQL"+sql); + } + } catch (Exception e) { + e.printStackTrace(); + } + return falg; +} +} diff --git a/12/src/com/dao/BorrowDAO.java b/12/src/com/dao/BorrowDAO.java new file mode 100644 index 0000000..9e9fa38 --- /dev/null +++ b/12/src/com/dao/BorrowDAO.java @@ -0,0 +1,218 @@ +package com.dao; + +import com.core.ConnDB; +import java.util.*; +import com.actionForm.BorrowForm; +import java.sql.*; +import com.actionForm.ReaderForm; +import com.actionForm.BookForm; +import java.util.Date; + +public class BorrowDAO { + ConnDB conn = new ConnDB(); + public int insert() { + String sql = "INSERT INTO tb_borrow (bookid) vlaues(1) "; + int ret = conn.executeUpdate(sql); + return ret; + } + //*****************************ͼ****************************** + public int insertBorrow(ReaderForm readerForm,BookForm bookForm,String operator){ + //ȡϵͳ + Date dateU=new Date(); + java.sql.Date date=new java.sql.Date(dateU.getTime()); + String sql1="select t.days from tb_bookinfo b left join tb_booktype t on b.typeid=t.id where b.id="+bookForm.getId()+""; + ResultSet rs=conn.executeQuery(sql1); + int days=0; + try { + if (rs.next()) { + days = rs.getInt(1); + } + } catch (SQLException ex) { + } + //黹ʱ + String date_str=String.valueOf(date); + String dd = date_str.substring(8,10); + String DD = date_str.substring(0,8)+String.valueOf(Integer.parseInt(dd) + days); + java.sql.Date backTime= java.sql.Date.valueOf(DD); + + String sql ="Insert into tb_borrow (readerid,bookid,borrowTime,backTime,operator) values("+readerForm.getId()+","+bookForm.getId()+",'"+date+"','"+backTime+"','"+operator+"')"; + int falg = conn.executeUpdate(sql); + System.out.println("ͼϢSQL" + sql); + conn.close(); + return falg; +} + //*************************************ͼ̽********************************* + public int renew(int id){ + String sql0="SELECT bookid FROM tb_borrow WHERE id="+id+""; + ResultSet rs1=conn.executeQuery(sql0); + int flag=0; + try { + if (rs1.next()) { + //ȡϵͳ + Date dateU = new Date(); + java.sql.Date date = new java.sql.Date(dateU.getTime()); + String sql1 = "select t.days from tb_bookinfo b left join tb_booktype t on b.typeid=t.id where b.id=" + + rs1.getInt(1) + ""; + ResultSet rs = conn.executeQuery(sql1); + int days = 0; + try { + if (rs.next()) { + days = rs.getInt(1); + } + } catch (SQLException ex) { + } + //黹ʱ + String date_str = String.valueOf(date); + String dd = date_str.substring(8, 10); + String DD = date_str.substring(0, 8) + + String.valueOf(Integer.parseInt(dd) + days); + java.sql.Date backTime = java.sql.Date.valueOf(DD); + + String sql = "UPDATE tb_borrow SET backtime='" + backTime + + "' where id=" + id + ""; + flag = conn.executeUpdate(sql); + } + } catch (Exception ex1) {} + conn.close(); + return flag; + } + //*************************************ͼ黹********************************* + public int back(int id,String operator){ + String sql0="SELECT readerid,bookid FROM tb_borrow WHERE id="+id+""; + ResultSet rs1=conn.executeQuery(sql0); + int flag=0; + try { + if (rs1.next()) { + //ȡϵͳ + Date dateU = new Date(); + java.sql.Date date = new java.sql.Date(dateU.getTime()); + int readerid=rs1.getInt(1); + int bookid=rs1.getInt(2); + String sql1="INSERT INTO tb_giveback (readerid,bookid,backTime,operator) VALUES("+readerid+","+bookid+",'"+date+"','"+operator+"')"; + int ret=conn.executeUpdate(sql1); + if(ret==1){ + String sql2 = "UPDATE tb_borrow SET ifback=1 where id=" + id + + ""; + flag = conn.executeUpdate(sql2); + }else{ + flag=0; + } + } + } catch (Exception ex1) { + } + conn.close(); + return flag; + } + //*****************************ѯͼϢ************************ + public Collection borrowinfo(String str){ + String sql="select borr.*,book.bookname,book.price,pub.pubname,bs.name bookcasename,r.barcode from (select * from tb_borrow where ifback=0) as borr left join tb_bookinfo book on borr.bookid=book.id join tb_publishing pub on book.isbn=pub.isbn join tb_bookcase bs on book.bookcase=bs.id join tb_reader r on borr.readerid=r.id where r.barcode='"+str+"'"; + ResultSet rs=conn.executeQuery(sql); + Collection coll=new ArrayList(); + BorrowForm form=null; + try { + while (rs.next()) { + form = new BorrowForm(); + form.setId(Integer.valueOf(rs.getInt(1))); + form.setBorrowTime(rs.getString(4)); + form.setBackTime(rs.getString(5)); + form.setBookName(rs.getString(8)); + form.setPrice(Float.valueOf(rs.getFloat(9))); + form.setPubName(rs.getString(10)); + form.setBookcaseName(rs.getString(11)); + coll.add(form); + } + } catch (SQLException ex) { + System.out.println("Ϣ"+ex.getMessage()); + } + conn.close(); + return coll; + } + //******************************************************************* + public Collection bremind(){ + Date dateU = new Date(); + java.sql.Date date = new java.sql.Date(dateU.getTime()); + String sql="select borr.borrowTime,borr.backTime,book.barcode,book.bookname,r.name readername,r.barcode readerbarcode from tb_borrow borr join tb_bookinfo book on book.id=borr.bookid join tb_reader r on r.id=borr.readerid where borr.backTime <='"+date+"'"; + ResultSet rs=conn.executeQuery(sql); + System.out.println("ʱѵSQL"+sql); + Collection coll=new ArrayList(); + BorrowForm form=null; + try { + while (rs.next()) { + form = new BorrowForm(); + form.setBorrowTime(rs.getString(1)); + form.setBackTime(rs.getString(2)); + form.setBookBarcode(rs.getString(3)); + form.setBookName(rs.getString(4)); + form.setReaderName(rs.getString(5)); + form.setReaderBarcode(rs.getString(6)); + coll.add(form); + System.out.println("ͼ룺"+rs.getString(3)); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } + conn.close(); + return coll; +} +//*************************ͼIJѯ****************************************** +public Collection borrowQuery(String strif){ + String sql=""; + if(strif!="all" && strif!=null && strif!=""){ + sql="select * from (select borr.borrowTime,borr.backTime,book.barcode,book.bookname,r.name readername,r.barcode readerbarcode,borr.ifback from tb_borrow borr join tb_bookinfo book on book.id=borr.bookid join tb_reader r on r.id=borr.readerid) as borr where borr."+strif+""; + }else{ + sql="select * from (select borr.borrowTime,borr.backTime,book.barcode,book.bookname,r.name readername,r.barcode readerbarcode,borr.ifback from tb_borrow borr join tb_bookinfo book on book.id=borr.bookid join tb_reader r on r.id=borr.readerid) as borr"; +} +ResultSet rs=conn.executeQuery(sql); +System.out.println("ͼIJѯSQL"+sql); +Collection coll=new ArrayList(); +BorrowForm form=null; +try { + while (rs.next()) { + form = new BorrowForm(); + form.setBorrowTime(rs.getString(1)); + form.setBackTime(rs.getString(2)); + form.setBookBarcode(rs.getString(3)); + form.setBookName(rs.getString(4)); + form.setReaderName(rs.getString(5)); + form.setReaderBarcode(rs.getString(6)); + form.setIfBack(rs.getInt(7)); + coll.add(form); + } +} catch (SQLException ex) { + System.out.println(ex.getMessage()); +} +conn.close(); +return coll; + } + //*************************ͼ****************************************** + public Collection bookBorrowSort() { + String sql = "select * from (SELECT bookid,count(bookid) as degree FROM tb_borrow group by bookid) as borr join (select b.*,c.name as bookcaseName,p.pubname,t.typename from tb_bookinfo b left join tb_bookcase c on b.bookcase=c.id join tb_publishing p on b.ISBN=p.ISBN join tb_booktype t on b.typeid=t.id where b.del=0) as book on borr.bookid=book.id order by borr.degree desc limit 10 "; + System.out.println("ͼУ"+sql); + Collection coll = new ArrayList(); + BorrowForm form = null; + ResultSet rs = conn.executeQuery(sql); + + + try { + while (rs.next()) { + form = new BorrowForm(); + form.setBookId(rs.getInt(1)); + form.setDegree(rs.getInt(2)); + form.setBookBarcode(rs.getString(3)); + form.setBookName(rs.getString(4)); + form.setAuthor(rs.getString(6)); + form.setPrice(Float.valueOf(rs.getString(9))); + + form.setBookcaseName(rs.getString(16)); + form.setPubName(rs.getString(17)); + form.setBookType(rs.getString(18)); + coll.add(form); + System.out.print("RS"+rs.getString(4)); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } + conn.close(); + return coll; + } +} diff --git a/12/src/com/dao/LibraryDAO.java b/12/src/com/dao/LibraryDAO.java new file mode 100644 index 0000000..2bd0674 --- /dev/null +++ b/12/src/com/dao/LibraryDAO.java @@ -0,0 +1,57 @@ +package com.dao; + +import com.core.ConnDB; +import java.sql.*; +import com.actionForm.LibraryForm; +/** + *

    Title: LibraryManage

    + * + *

    Description:

    + * + * + *

    Company:mr

    + * + * @author:wgh + */ +public class LibraryDAO { + ConnDB conn=null; + public LibraryDAO() { + conn=new ConnDB(); + } + public LibraryForm query(){ + LibraryForm libraryForm1=null; + String sql = "select * from tb_library where id=1"; + ResultSet rs =conn.executeQuery(sql); + try { + while (rs.next()) { + libraryForm1 = new LibraryForm(); + libraryForm1.setId(Integer.valueOf(rs.getString(1))); + libraryForm1.setLibraryname(rs.getString(2)); + libraryForm1.setCurator(rs.getString(3)); + libraryForm1.setTel(rs.getString(4)); + libraryForm1.setAddress(rs.getString(5)); + libraryForm1.setEmail(rs.getString(6)); + libraryForm1.setUrl(rs.getString(7)); + libraryForm1.setCreateDate(rs.getString(8)); + libraryForm1.setIntroduce(rs.getString(9)); + } + } catch (Exception ex) { + } + conn.close(); + return libraryForm1; + } + public int update(LibraryForm libraryForm){ + String sql="UPDATE tb_library SET libraryname='"+libraryForm.getLibraryname()+"',curator='"+libraryForm.getCurator()+"',tel='"+libraryForm.getTel()+"',address='"+libraryForm.getAddress()+"',email='"+libraryForm.getEmail()+"',url='"+libraryForm.getUrl()+"',createDate='"+libraryForm.getCreateDate()+"',introduce='"+libraryForm.getIntroduce()+"' where id="+libraryForm.getId()+""; + int ret=0; + try{ + ret=conn.executeUpdate(sql); + }catch(Exception e){ + System.out.println("޸ͼϢ"+e.getMessage()); + } + System.out.println("޸ͼϢʱSQL"+sql); + conn.close(); + return ret; + } + + +} diff --git a/12/src/com/dao/ManagerDAO.java b/12/src/com/dao/ManagerDAO.java new file mode 100644 index 0000000..4dfaa1e --- /dev/null +++ b/12/src/com/dao/ManagerDAO.java @@ -0,0 +1,211 @@ +package com.dao; + +import com.core.*; +import java.util.*; +import com.actionForm.ManagerForm; +import java.sql.*; +import java.*; + +public class ManagerDAO { + private ConnDB conn = new ConnDB(); + //ѯ + public Collection query(String queryif) { + ManagerForm managerForm = null; + Collection managercoll = new ArrayList(); + String sql = ""; + if (queryif == null || queryif == "" || queryif == "all") { //queryifֵΪnullallʱѯȫ + sql = "select m.*,p.sysset,p.readerset,p.bookset,p.borrowback,p.sysquery from tb_manager m left join tb_purview p on m.id=p.id"; + }else{ + sql="select m.*,p.sysset,p.readerset,p.bookset,p.borrowback,p.sysquery from tb_manager m left join tb_purview p on m.id=p.id where m.name='"+queryif+"'"; //˴ҪӦ + } + ResultSet rs = conn.executeQuery(sql); //ִSQL + try { //׽쳣Ϣ + while (rs.next()) { + managerForm = new ManagerForm(); + managerForm.setId(Integer.valueOf(rs.getString(1))); + managerForm.setName(rs.getString(2)); + managerForm.setPwd(rs.getString(3)); + managerForm.setSysset(rs.getInt(4)); + managerForm.setReaderset(rs.getInt(5)); + managerForm.setBookset(rs.getInt(6)); + managerForm.setBorrowback(rs.getInt(7)); + managerForm.setSysquery(rs.getInt(8)); + managercoll.add(managerForm); //ѯ浽Collection + } + } catch (SQLException e) {} + return managercoll; //زѯ + } + + /*********************************************************/ + //ѯȨϢ + public ManagerForm query_p(String str) { + ManagerForm managerForm1 = null; + String sql = "select m.*,p.sysset,p.readerset,p.bookset,p.borrowback,p.sysquery from tb_manager m left join tb_purview p on m.id=p.id where m.name='"+str+"'"; + + ResultSet rs = conn.executeQuery(sql); + try { + while (rs.next()) { + managerForm1 = new ManagerForm(); + managerForm1.setId(Integer.valueOf(rs.getString(1))); + managerForm1.setName(rs.getString(2)); + managerForm1.setPwd(rs.getString(3)); + managerForm1.setSysset(rs.getInt(4)); + managerForm1.setReaderset(rs.getInt(5)); + managerForm1.setBookset(rs.getInt(6)); + managerForm1.setBorrowback(rs.getInt(7)); + managerForm1.setSysquery(rs.getInt(8)); + } + } catch (SQLException ex) { + ex.printStackTrace(); + }finally{ + conn.close(); + } + return managerForm1; + } + + + //Ա֤ + public int checkManager(ManagerForm managerForm) { + int flag = 0; + ChStr chStr=new ChStr(); + String sql = "SELECT * FROM tb_manager where name='" + + chStr.filterStr(managerForm.getName()) + "'"; + ResultSet rs = conn.executeQuery(sql); + try { + if (rs.next()) { + String pwd = chStr.filterStr(managerForm.getPwd()); //ȡ벢ַеΣַ + if (pwd.equals(rs.getString(3))) { + flag = 1; + } else { + flag = 0; + } + }else{ + flag = 0; + } + } catch (SQLException ex) { + flag = 0; + }finally{ + conn.close(); + } + return flag; + } + + //޸ʱӦõIJѯ + public ManagerForm query_update(ManagerForm managerForm) { + ManagerForm managerForm1 = null; + String sql = "select m.*,p.sysset,p.readerset,p.bookset,p.borrowback,p.sysquery from tb_manager m left join tb_purview p on m.id=p.id where m.id=" + + managerForm.getId() + ""; + + ResultSet rs = conn.executeQuery(sql); //ִвѯ + try { + while (rs.next()) { + managerForm1 = new ManagerForm(); + managerForm1.setId(Integer.valueOf(rs.getString(1))); + managerForm1.setName(rs.getString(2)); + managerForm1.setPwd(rs.getString(3)); + managerForm1.setSysset(rs.getInt(4)); + managerForm1.setReaderset(rs.getInt(5)); + managerForm1.setBookset(rs.getInt(6)); + managerForm1.setBorrowback(rs.getInt(7)); + managerForm1.setSysquery(rs.getInt(8)); + } + } catch (SQLException ex) { + ex.printStackTrace(); //쳣Ϣ + }finally{ + conn.close(); //رݿ + } + return managerForm1; + } + //ĿʱӦõIJѯ + public ManagerForm query_pwd(ManagerForm managerForm) { + ManagerForm managerForm1 = null; + String sql = "SELECT * FROM tb_manager WHERE name='" +managerForm.getName() + "'"; + ResultSet rs = conn.executeQuery(sql); + try { + while (rs.next()) { + managerForm1 = new ManagerForm(); + managerForm1.setId(Integer.valueOf(rs.getString(1))); + managerForm1.setName(rs.getString(2)); + managerForm1.setPwd(rs.getString(3)); + } + } catch (SQLException ex) { + ex.printStackTrace(); + }finally{ + conn.close(); + } + return managerForm1; + } + // + public int insert(ManagerForm managerForm) { + String sql1="SELECT * FROM tb_manager WHERE name='"+managerForm.getName()+"'"; + ResultSet rs = conn.executeQuery(sql1); + String sql = ""; + int falg = 0; + try { + if (rs.next()) { + falg=2; + } else { + sql = "INSERT INTO tb_manager (name,pwd) values('" + + managerForm.getName() + "','" + + managerForm.getPwd() + + "')"; + falg = conn.executeUpdate(sql); + System.out.println("ӹԱϢSQL" + sql); + } + } catch (SQLException ex) { + falg=0; + }finally{ + conn.close(); + } + return falg; + } + + //ùԱȨ + public int update(ManagerForm managerForm) { + String sql1="SELECT * FROM tb_purview WHERE id="+managerForm.getId()+""; + ResultSet rs=conn.executeQuery(sql1); //ѯҪȨ޵ĹԱȨϢ + String sql=""; + int falg=0; + try { //׽쳣Ϣ + if (rs.next()) { //ѾȨʱִи + sql = "Update tb_purview set sysset=" + managerForm.getSysset() + + ",readerset=" + managerForm.getReaderset() + ",bookset="+managerForm.getBookset()+",borrowback="+managerForm.getBorrowback()+",sysquery="+managerForm.getSysquery()+" where id=" + + managerForm.getId() + ""; + }else{ //δȨʱִв + sql="INSERT INTO tb_purview values("+managerForm.getId()+","+managerForm.getSysset()+","+managerForm.getReaderset()+","+managerForm.getBookset()+","+managerForm.getBorrowback()+","+managerForm.getSysquery()+")"; + } + falg = conn.executeUpdate(sql); + System.out.println("޸ʱSQL" + sql); + } catch (SQLException ex) { + falg=0; //ʾùԱȨʧ + }finally{ + conn.close(); //رݿ + } + return falg; + } + //޸ĹԱ +public int updatePwd(ManagerForm managerForm){ + String sql="UPDATE tb_manager SET pwd='"+managerForm.getPwd()+"' where name='"+managerForm.getName()+"'"; + int ret=conn.executeUpdate(sql); + System.out.println("޸ĹԱʱSQL"+sql); + conn.close(); + return ret; +} + +//ɾ + public int delete(ManagerForm managerForm) { + int flag=0; + try{ //׽쳣Ϣ + String sql = "DELETE FROM tb_manager where id=" + managerForm.getId() +""; + flag = conn.executeUpdate(sql); //ִɾԱϢ + if (flag !=0){ + String sql1 = "DELETE FROM tb_purview where id=" + managerForm.getId() +""; + conn.executeUpdate(sql1); //ִɾȨϢ + }}catch(Exception e){ + System.out.println("ɾԱϢʱĴ"+e.getMessage()); //Ϣ + }finally{ + conn.close(); //رݿ + } + return flag; + } +} diff --git a/12/src/com/dao/ParameterDAO.java b/12/src/com/dao/ParameterDAO.java new file mode 100644 index 0000000..367da46 --- /dev/null +++ b/12/src/com/dao/ParameterDAO.java @@ -0,0 +1,37 @@ +package com.dao; + +import com.core.ConnDB; +import com.actionForm.ParameterForm; +import java.sql.ResultSet; + +public class ParameterDAO { + ConnDB conn=null; +public ParameterDAO() { + conn=new ConnDB(); +} +public ParameterForm query(){ + ParameterForm libraryForm1=null; + String sql = "select * from tb_parameter where id=1"; + ResultSet rs =conn.executeQuery(sql); + try { + while (rs.next()) { + libraryForm1 = new ParameterForm(); + libraryForm1.setId(Integer.valueOf(rs.getString(1))); + libraryForm1.setCost(rs.getInt(2)); + libraryForm1.setValidity(rs.getInt(3)); + + } + } catch (Exception ex) { + } + conn.close(); + return libraryForm1; +} +public int update(ParameterForm parameterForm){ + String sql="UPDATE tb_parameter SET cost="+parameterForm.getCost()+",validity="+parameterForm.getValidity()+" where id=1"; + int ret=conn.executeUpdate(sql); + System.out.println("޸IJϢʱSQL"+sql); + conn.close(); + return ret; +} + +} diff --git a/12/src/com/dao/PublishingDAO.java b/12/src/com/dao/PublishingDAO.java new file mode 100644 index 0000000..4289e27 --- /dev/null +++ b/12/src/com/dao/PublishingDAO.java @@ -0,0 +1,34 @@ +package com.dao; + +import com.core.ConnDB; +import java.util.*; +import java.sql.*; +import com.actionForm.PublishingForm; + +public class PublishingDAO { + private ConnDB conn=new ConnDB(); +//ѯ +public Collection query(String strif){ +PublishingForm pubForm=null; +Collection pubColl=new ArrayList(); +String sql=""; +if(strif!="all" && strif!=null && strif!=""){ + sql="select * from tb_publishing where "+strif+""; +}else{ + sql="select * from tb_publishing"; +} +ResultSet rs=conn.executeQuery(sql); +try { + while (rs.next()) { + pubForm=new PublishingForm(); + pubForm.setIsbn(rs.getString(1)); + pubForm.setPubname(rs.getString(2)); + pubColl.add(pubForm); + } +} catch (SQLException ex) { +} +conn.close(); +return pubColl; +} + +} diff --git a/12/src/com/dao/ReaderDAO.java b/12/src/com/dao/ReaderDAO.java new file mode 100644 index 0000000..0d129ee --- /dev/null +++ b/12/src/com/dao/ReaderDAO.java @@ -0,0 +1,208 @@ +package com.dao; + +import com.core.ConnDB; +import java.util.*; +import java.sql.*; +import com.actionForm.ReaderForm; + +public class ReaderDAO { + private ConnDB conn = new ConnDB(); + + // ѯ + public Collection query(String strif) { + ReaderForm readerForm = null; + Collection readerColl = new ArrayList(); + String sql = ""; + if (strif != "all" && strif != null && strif != "") { + sql = "select r.*,t.name as typename,t.number from tb_reader r left join tb_readerType t on r.typeid=t.id where " + + strif + ""; + } else { + sql = "select r.*,t.name as typename,t.number from tb_reader r left join tb_readerType t on r.typeid=t.id"; + } + ResultSet rs = conn.executeQuery(sql); + String birthday=""; + try { + while (rs.next()) { + readerForm = new ReaderForm(); + readerForm.setId(Integer.valueOf(rs.getString(1))); + readerForm.setName(rs.getString(2)); + readerForm.setSex(rs.getString(3)); + readerForm.setBarcode(rs.getString(4)); + readerForm.setVocation(rs.getString(5)); + birthday=rs.getString(6); + readerForm.setBirthday(birthday==null?"":birthday); + readerForm.setPaperType(rs.getString(7)); + readerForm.setPaperNO(rs.getString(8)); + readerForm.setTel(rs.getString(9)); + readerForm.setEmail(rs.getString(10)); + readerForm.setCreateDate(rs.getString(11)); + readerForm.setOperator(rs.getString(12)); + readerForm.setRemark(rs.getString(13)); + readerForm.setTypeid(rs.getInt(14)); + readerForm.setTypename(rs.getString(15)); + readerForm.setNumber(rs.getInt(16)); + readerColl.add(readerForm); + } + } catch (SQLException ex) { + } + conn.close(); + return readerColl; + } + + // ޸ĵIJѯ + public ReaderForm queryM(ReaderForm readerForm) { + ReaderForm readerForm1 = null; + String sql = ""; + if (readerForm.getId() != null) { + sql = "select r.*,t.name as typename,t.number from tb_reader r left join tb_readerType t on r.typeid=t.id where r.id=" + + readerForm.getId() + ""; + } else if (readerForm.getBarcode() != null) { + sql = "select r.*,t.name as typename,t.number from tb_reader r left join tb_readerType t on r.typeid=t.id where r.barcode=" + + readerForm.getBarcode() + ""; + } + System.out.println("޸ĶϢʱSQL" + sql); + ResultSet rs = conn.executeQuery(sql); + String birthday=""; + try { + while (rs.next()) { + readerForm1 = new ReaderForm(); + readerForm1.setId(Integer.valueOf(rs.getString(1))); + readerForm1.setName(rs.getString(2)); + readerForm1.setSex(rs.getString(3)); + readerForm1.setBarcode(rs.getString(4)); + readerForm1.setVocation(rs.getString(5)); + birthday=rs.getString(6); + readerForm1.setBirthday(birthday==null?"":birthday); + readerForm1.setPaperType(rs.getString(7)); + readerForm1.setPaperNO(rs.getString(8)); + readerForm1.setTel(rs.getString(9)); + readerForm1.setEmail(rs.getString(10)); + readerForm1.setCreateDate(rs.getString(11)); + readerForm1.setOperator(rs.getString(12)); + readerForm1.setRemark(rs.getString(13)); + readerForm1.setTypeid(rs.getInt(14)); + readerForm1.setTypename(rs.getString(15)); + readerForm1.setNumber(rs.getInt(16)); + System.out.println(rs.getString(2)); + } + } catch (SQLException ex) { + } + conn.close(); + return readerForm1; + } + + // + public int insert(ReaderForm readerForm) { + String sql1 = "SELECT * FROM tb_reader WHERE barcode='" + + readerForm.getBarcode() + "'"; + ResultSet rs = conn.executeQuery(sql1); + String sql = ""; + int falg = 0; + try { + if (rs.next()) { + falg = 2; + } else { + if (readerForm.getBirthday() == "") { + sql = "Insert into tb_reader (name,sex,barcode,vocation,paperType,paperNO,tel,email,createDate,operator,remark,typeid) values('" + + readerForm.getName() + + "','" + + readerForm.getSex() + + "','" + + readerForm.getBarcode() + + "','" + + readerForm.getVocation() + + "','" + + readerForm.getPaperType() + + "','" + + readerForm.getPaperNO() + + "','" + + readerForm.getTel() + + "','" + + readerForm.getEmail() + + "','" + + readerForm.getCreateDate() + + "','" + + readerForm.getOperator() + + "','" + + readerForm.getRemark() + + "'," + + readerForm.getTypeid() + ")"; + } else { + sql = "Insert into tb_reader (name,sex,barcode,vocation,birthday,paperType,paperNO,tel,email,createDate,operator,remark,typeid) values('" + + readerForm.getName() + + "','" + + readerForm.getSex() + + "','" + + readerForm.getBarcode() + + "','" + + readerForm.getVocation() + + "','" + + readerForm.getBirthday() + + "','" + + readerForm.getPaperType() + + "','" + + readerForm.getPaperNO() + + "','" + + readerForm.getTel() + + "','" + + readerForm.getEmail() + + "','" + + readerForm.getCreateDate() + + "','" + + readerForm.getOperator() + + "','" + + readerForm.getRemark() + + "'," + + readerForm.getTypeid() + ")"; + } + falg = conn.executeUpdate(sql); + System.out.println("ӶϢSQL" + sql); + conn.close(); + } + } catch (SQLException ex) { + falg = 0; + } + System.out.println("falg:" + falg); + return falg; + } + + // ޸ + public int update(ReaderForm readerForm) { + String sql = ""; + if (readerForm.getBirthday() == "") { + sql = "Update tb_reader set sex='" + readerForm.getSex() + + "',barcode='" + readerForm.getBarcode() + "',vocation='" + + readerForm.getVocation() + "',birthday=null,paperType='" + + readerForm.getPaperType() + "',paperNO='" + + readerForm.getPaperNO() + "',tel='" + readerForm.getTel() + + "',email='" + readerForm.getEmail() + "',remark='" + + readerForm.getRemark() + "',typeid=" + + readerForm.getTypeid() + " where id=" + + readerForm.getId() + ""; + } else { + sql = "Update tb_reader set sex='" + readerForm.getSex() + + "',barcode='" + readerForm.getBarcode() + "',vocation='" + + readerForm.getVocation() + "',birthday='" + + readerForm.getBirthday() + "',paperType='" + + readerForm.getPaperType() + "',paperNO='" + + readerForm.getPaperNO() + "',tel='" + readerForm.getTel() + + "',email='" + readerForm.getEmail() + "',remark='" + + readerForm.getRemark() + "',typeid=" + + readerForm.getTypeid() + " where id=" + + readerForm.getId() + ""; + } + int falg = conn.executeUpdate(sql); + System.out.println("޸ʱSQL" + sql); + conn.close(); + return falg; + } + + // ɾ + public int delete(ReaderForm readerForm) { + String sql = "Delete from tb_reader where id=" + readerForm.getId() + + ""; + int falg = conn.executeUpdate(sql); + System.out.println("ɾʱSQL" + sql); + return falg; + } +} diff --git a/12/src/com/dao/ReaderTypeDAO.java b/12/src/com/dao/ReaderTypeDAO.java new file mode 100644 index 0000000..ab1fe28 --- /dev/null +++ b/12/src/com/dao/ReaderTypeDAO.java @@ -0,0 +1,101 @@ +package com.dao; + +import com.core.ConnDB; +import java.util.*; +import java.sql.*; + +import com.actionForm.ReaderTypeForm; + +public class ReaderTypeDAO { + private ConnDB conn=new ConnDB(); +//ѯ +public Collection query(String strif){ + ReaderTypeForm readerTypeForm=null; + Collection readerTypeColl=new ArrayList(); + String sql=""; + if(strif!="all" && strif!=null && strif!=""){ + sql="select * from tb_readerType where "+strif+""; + }else{ + sql="select * from tb_readerType"; + } + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + readerTypeForm=new ReaderTypeForm(); + readerTypeForm.setId(Integer.valueOf(rs.getString(1))); + readerTypeForm.setName(rs.getString(2)); + readerTypeForm.setNumber(rs.getInt(3)); + readerTypeColl.add(readerTypeForm); + } + } catch (SQLException ex) { + } + conn.close(); + return readerTypeColl; +} +//޸ĵIJѯ +public ReaderTypeForm queryM(ReaderTypeForm readerTypeForm){ + ReaderTypeForm readerTypeForm1=null; + String sql="select * from tb_readerType where id="+readerTypeForm.getId()+""; + System.out.println("޸ʱSQL"+sql); + ResultSet rs=conn.executeQuery(sql); + try { + while (rs.next()) { + readerTypeForm1=new ReaderTypeForm(); + readerTypeForm1.setId(Integer.valueOf(rs.getString(1))); + readerTypeForm1.setName(rs.getString(2)); + readerTypeForm1.setNumber(rs.getInt(3)); + System.out.println(rs.getInt(3)); + } + } catch (SQLException ex) { + } + conn.close(); + return readerTypeForm1; +} +// +public int insert(ReaderTypeForm readerTypeForm){ +String sql1="SELECT * FROM tb_readerType WHERE name='"+readerTypeForm.getName()+"'"; +ResultSet rs = conn.executeQuery(sql1); +String sql = ""; +int falg = 0; +try { + if (rs.next()) { + falg = 2; + } else { + sql ="Insert into tb_readerType (name,number) values('"+readerTypeForm.getName()+"',"+readerTypeForm.getNumber()+")"; + falg = conn.executeUpdate(sql); + System.out.println("Ӷ͵SQL" + sql); + conn.close(); + } +} catch (SQLException ex) { + falg = 0; +} +System.out.println("falg:"+falg); +return falg; +} + +//޸ +public int update(ReaderTypeForm readerTypeForm){ +String sql="Update tb_readerType set name='"+readerTypeForm.getName()+"',number="+readerTypeForm.getNumber()+" where id="+readerTypeForm.getId()+""; +int falg=conn.executeUpdate(sql); +System.out.println("޸ʱSQL"+sql); +conn.close(); +return falg; +} +//ɾ +public int delete(ReaderTypeForm readerTypeForm){ + String sql_1="SELECT * FROM tb_reader WHERE typeid="+readerTypeForm.getId()+""; + ResultSet rs=conn.executeQuery(sql_1); + int flag=0; + try { + if(!rs.next()){ + String sql="Delete from tb_readerType where id="+readerTypeForm.getId()+""; + flag=conn.executeUpdate(sql); + System.out.println("ɾʱSQL"+sql); + } + } catch (Exception e) { + e.printStackTrace(); + } + return flag; +} + +} diff --git "a/12/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216\344\271\246.doc" "b/12/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216\344\271\246.doc" new file mode 100644 index 0000000..6244169 Binary files /dev/null and "b/12/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216\344\271\246.doc" differ diff --git a/13/.classpath b/13/.classpath new file mode 100644 index 0000000..f68c74e --- /dev/null +++ b/13/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/13/.mymetadata b/13/.mymetadata new file mode 100644 index 0000000..905da09 --- /dev/null +++ b/13/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/13/.project b/13/.project new file mode 100644 index 0000000..dd8472d --- /dev/null +++ b/13/.project @@ -0,0 +1,50 @@ + + + 13 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/13/.settings/.jsdtscope b/13/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/13/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/13/.settings/org.eclipse.wst.jsdt.ui.superType.container b/13/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/13/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/13/.settings/org.eclipse.wst.jsdt.ui.superType.name b/13/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/13/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/13/WebRoot/Database/db_photo_Data.MDF b/13/WebRoot/Database/db_photo_Data.MDF new file mode 100644 index 0000000..eb6c9f0 Binary files /dev/null and b/13/WebRoot/Database/db_photo_Data.MDF differ diff --git a/13/WebRoot/Database/db_photo_Log.LDF b/13/WebRoot/Database/db_photo_Log.LDF new file mode 100644 index 0000000..3b3a8db Binary files /dev/null and b/13/WebRoot/Database/db_photo_Log.LDF differ diff --git a/13/WebRoot/META-INF/MANIFEST.MF b/13/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..5e94951 --- /dev/null +++ b/13/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/13/WebRoot/WEB-INF/classes/com/wy/dao/OperationData.class b/13/WebRoot/WEB-INF/classes/com/wy/dao/OperationData.class new file mode 100644 index 0000000..e55a001 Binary files /dev/null and b/13/WebRoot/WEB-INF/classes/com/wy/dao/OperationData.class differ diff --git a/13/WebRoot/WEB-INF/classes/com/wy/form/Photo.class b/13/WebRoot/WEB-INF/classes/com/wy/form/Photo.class new file mode 100644 index 0000000..9b00010 Binary files /dev/null and b/13/WebRoot/WEB-INF/classes/com/wy/form/Photo.class differ diff --git a/13/WebRoot/WEB-INF/classes/com/wy/form/UserInfo.class b/13/WebRoot/WEB-INF/classes/com/wy/form/UserInfo.class new file mode 100644 index 0000000..e590aeb Binary files /dev/null and b/13/WebRoot/WEB-INF/classes/com/wy/form/UserInfo.class differ diff --git a/13/WebRoot/WEB-INF/classes/com/wy/servlet/PhotoServlet.class b/13/WebRoot/WEB-INF/classes/com/wy/servlet/PhotoServlet.class new file mode 100644 index 0000000..8ac7776 Binary files /dev/null and b/13/WebRoot/WEB-INF/classes/com/wy/servlet/PhotoServlet.class differ diff --git a/13/WebRoot/WEB-INF/classes/com/wy/servlet/UserInfoServlet.class b/13/WebRoot/WEB-INF/classes/com/wy/servlet/UserInfoServlet.class new file mode 100644 index 0000000..62e6d6c Binary files /dev/null and b/13/WebRoot/WEB-INF/classes/com/wy/servlet/UserInfoServlet.class differ diff --git a/13/WebRoot/WEB-INF/classes/com/wy/tools/Encrypt.class b/13/WebRoot/WEB-INF/classes/com/wy/tools/Encrypt.class new file mode 100644 index 0000000..68e566f Binary files /dev/null and b/13/WebRoot/WEB-INF/classes/com/wy/tools/Encrypt.class differ diff --git a/13/WebRoot/WEB-INF/classes/com/wy/tools/ImageUtils.class b/13/WebRoot/WEB-INF/classes/com/wy/tools/ImageUtils.class new file mode 100644 index 0000000..e340478 Binary files /dev/null and b/13/WebRoot/WEB-INF/classes/com/wy/tools/ImageUtils.class differ diff --git a/13/WebRoot/WEB-INF/classes/com/wy/tools/JDBConnection.class b/13/WebRoot/WEB-INF/classes/com/wy/tools/JDBConnection.class new file mode 100644 index 0000000..23f8a8a Binary files /dev/null and b/13/WebRoot/WEB-INF/classes/com/wy/tools/JDBConnection.class differ diff --git a/13/WebRoot/WEB-INF/lib/jsmartcom_zh_CN.jar b/13/WebRoot/WEB-INF/lib/jsmartcom_zh_CN.jar new file mode 100644 index 0000000..8b6a089 Binary files /dev/null and b/13/WebRoot/WEB-INF/lib/jsmartcom_zh_CN.jar differ diff --git a/13/WebRoot/WEB-INF/lib/sqljdbc.jar b/13/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/13/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/13/WebRoot/WEB-INF/web.xml b/13/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..d2e3f1f --- /dev/null +++ b/13/WebRoot/WEB-INF/web.xml @@ -0,0 +1,27 @@ + + + + UserInfoServlet + com.wy.servlet.UserInfoServlet + + + PhotoServlet + com.wy.servlet.PhotoServlet + + + + UserInfoServlet + /userInfoServlet + + + PhotoServlet + /photoServlet + + + index.jsp + + diff --git a/13/WebRoot/css/style.css b/13/WebRoot/css/style.css new file mode 100644 index 0000000..e3128a7 --- /dev/null +++ b/13/WebRoot/css/style.css @@ -0,0 +1,225 @@ + \ No newline at end of file diff --git a/13/WebRoot/css/style1.css b/13/WebRoot/css/style1.css new file mode 100644 index 0000000..b702d87 --- /dev/null +++ b/13/WebRoot/css/style1.css @@ -0,0 +1,257 @@ + + \ No newline at end of file diff --git a/13/WebRoot/dealwith.jsp b/13/WebRoot/dealwith.jsp new file mode 100644 index 0000000..f0181dd --- /dev/null +++ b/13/WebRoot/dealwith.jsp @@ -0,0 +1,6 @@ +<%@ page language="java" import="java.util.*" pageEncoding="gbk"%> + + + + + diff --git a/13/WebRoot/down.jsp b/13/WebRoot/down.jsp new file mode 100644 index 0000000..3c5bd5b --- /dev/null +++ b/13/WebRoot/down.jsp @@ -0,0 +1,7 @@ + + + + +
    + + diff --git a/13/WebRoot/image.jsp b/13/WebRoot/image.jsp new file mode 100644 index 0000000..be3f367 --- /dev/null +++ b/13/WebRoot/image.jsp @@ -0,0 +1,74 @@ +<%@ page contentType="image/jpeg" + import="java.awt.*,java.awt.image.*,java.util.*,javax.imageio.*" + pageEncoding="gb2312"%> +<%!Color getRandColor(int fc, int bc) + {//Χɫ + Random random = new Random(); + if (fc > 255) + fc = 255; + if (bc > 255) + bc = 255; + int r = fc + random.nextInt(bc - fc); + int g = fc + random.nextInt(bc - fc); + int b = fc + random.nextInt(bc - fc); + return new Color(r, g, b); + }%><% + response.setHeader("Pragma", "No-cache"); + response.setHeader("Cache-Control", "no-cache"); + response.setDateHeader("Expires", 0); + // ڴдͼ + int width = 60, height = 20; + BufferedImage image = new BufferedImage(width, height, + BufferedImage.TYPE_INT_RGB); + + // ȡͼ + Graphics g = image.getGraphics(); + + // + Random random = new Random(); + + // 趨ɫ + g.setColor(getRandColor(200, 250)); + g.fillRect(0, 0, width, height); + + //趨 + g.setFont(new Font("Times New Roman", Font.PLAIN, 18)); + + // 155ߣʹͼе֤벻ױ̽⵽ + g.setColor(getRandColor(160, 200)); + for (int i = 0; i < 155; i++) + { + int x = random.nextInt(width); + int y = random.nextInt(height); + int xl = random.nextInt(12); + int yl = random.nextInt(12); + g.drawLine(x, y, x + xl, y + yl); + } + + // ȡ֤(4λ) + String sRand = ""; + for (int i = 0; i < 4; i++) + { + String rand = String + .valueOf(random.nextInt(10)); + sRand += rand; + // ֤ʾͼ + g.setColor(new Color(20 + random.nextInt(110), + 20 + random.nextInt(110), 20 + random + .nextInt(110))); + //úɫͬΪ̫ӽֱֻ + g.drawString(rand, 13 * i + 6, 16); + } + + // ֤SESSION + session.setAttribute("rand", sRand); + + // ͼЧ + g.dispose(); + + // ͼҳ + ImageIO + .write(image, "JPEG",response.getOutputStream()); + out.clear(); + out=pageContext.pushBody(); +%> \ No newline at end of file diff --git a/13/WebRoot/images/1.jpg b/13/WebRoot/images/1.jpg new file mode 100644 index 0000000..63cfc2f Binary files /dev/null and b/13/WebRoot/images/1.jpg differ diff --git a/13/WebRoot/images/10.gif b/13/WebRoot/images/10.gif new file mode 100644 index 0000000..bad1ec3 Binary files /dev/null and b/13/WebRoot/images/10.gif differ diff --git a/13/WebRoot/images/10.jpg b/13/WebRoot/images/10.jpg new file mode 100644 index 0000000..86f855e Binary files /dev/null and b/13/WebRoot/images/10.jpg differ diff --git a/13/WebRoot/images/11.gif b/13/WebRoot/images/11.gif new file mode 100644 index 0000000..2924251 Binary files /dev/null and b/13/WebRoot/images/11.gif differ diff --git a/13/WebRoot/images/11.jpg b/13/WebRoot/images/11.jpg new file mode 100644 index 0000000..535d595 Binary files /dev/null and b/13/WebRoot/images/11.jpg differ diff --git a/13/WebRoot/images/12.jpg b/13/WebRoot/images/12.jpg new file mode 100644 index 0000000..85f1979 Binary files /dev/null and b/13/WebRoot/images/12.jpg differ diff --git a/13/WebRoot/images/13.jpg b/13/WebRoot/images/13.jpg new file mode 100644 index 0000000..57fd6a9 Binary files /dev/null and b/13/WebRoot/images/13.jpg differ diff --git a/13/WebRoot/images/14.jpg b/13/WebRoot/images/14.jpg new file mode 100644 index 0000000..c983bfa Binary files /dev/null and b/13/WebRoot/images/14.jpg differ diff --git a/13/WebRoot/images/15.jpg b/13/WebRoot/images/15.jpg new file mode 100644 index 0000000..ecded09 Binary files /dev/null and b/13/WebRoot/images/15.jpg differ diff --git a/13/WebRoot/images/16.jpg b/13/WebRoot/images/16.jpg new file mode 100644 index 0000000..af4c531 Binary files /dev/null and b/13/WebRoot/images/16.jpg differ diff --git a/13/WebRoot/images/17.jpg b/13/WebRoot/images/17.jpg new file mode 100644 index 0000000..b27ff1e Binary files /dev/null and b/13/WebRoot/images/17.jpg differ diff --git a/13/WebRoot/images/18.jpg b/13/WebRoot/images/18.jpg new file mode 100644 index 0000000..496bea9 Binary files /dev/null and b/13/WebRoot/images/18.jpg differ diff --git a/13/WebRoot/images/2.jpg b/13/WebRoot/images/2.jpg new file mode 100644 index 0000000..58cb80d Binary files /dev/null and b/13/WebRoot/images/2.jpg differ diff --git a/13/WebRoot/images/21.gif b/13/WebRoot/images/21.gif new file mode 100644 index 0000000..c3fa809 Binary files /dev/null and b/13/WebRoot/images/21.gif differ diff --git a/13/WebRoot/images/22.gif b/13/WebRoot/images/22.gif new file mode 100644 index 0000000..ed5b184 Binary files /dev/null and b/13/WebRoot/images/22.gif differ diff --git a/13/WebRoot/images/3.jpg b/13/WebRoot/images/3.jpg new file mode 100644 index 0000000..eb18b07 Binary files /dev/null and b/13/WebRoot/images/3.jpg differ diff --git a/13/WebRoot/images/4.jpg b/13/WebRoot/images/4.jpg new file mode 100644 index 0000000..9f2dcf9 Binary files /dev/null and b/13/WebRoot/images/4.jpg differ diff --git a/13/WebRoot/images/5.jpg b/13/WebRoot/images/5.jpg new file mode 100644 index 0000000..026c241 Binary files /dev/null and b/13/WebRoot/images/5.jpg differ diff --git a/13/WebRoot/images/6.jpg b/13/WebRoot/images/6.jpg new file mode 100644 index 0000000..7607468 Binary files /dev/null and b/13/WebRoot/images/6.jpg differ diff --git a/13/WebRoot/images/7.jpg b/13/WebRoot/images/7.jpg new file mode 100644 index 0000000..8acc168 Binary files /dev/null and b/13/WebRoot/images/7.jpg differ diff --git a/13/WebRoot/images/8.jpg b/13/WebRoot/images/8.jpg new file mode 100644 index 0000000..1493e21 Binary files /dev/null and b/13/WebRoot/images/8.jpg differ diff --git a/13/WebRoot/images/9.gif b/13/WebRoot/images/9.gif new file mode 100644 index 0000000..958681c Binary files /dev/null and b/13/WebRoot/images/9.gif differ diff --git a/13/WebRoot/images/9.jpg b/13/WebRoot/images/9.jpg new file mode 100644 index 0000000..04355c8 Binary files /dev/null and b/13/WebRoot/images/9.jpg differ diff --git a/13/WebRoot/images/Thumbs.db b/13/WebRoot/images/Thumbs.db new file mode 100644 index 0000000..c3a53e4 Binary files /dev/null and b/13/WebRoot/images/Thumbs.db differ diff --git a/13/WebRoot/images/bg.gif b/13/WebRoot/images/bg.gif new file mode 100644 index 0000000..4b7ac11 Binary files /dev/null and b/13/WebRoot/images/bg.gif differ diff --git a/13/WebRoot/images/bg.jpg b/13/WebRoot/images/bg.jpg new file mode 100644 index 0000000..628afdc Binary files /dev/null and b/13/WebRoot/images/bg.jpg differ diff --git a/13/WebRoot/images/bg_1.gif b/13/WebRoot/images/bg_1.gif new file mode 100644 index 0000000..376aa72 Binary files /dev/null and b/13/WebRoot/images/bg_1.gif differ diff --git a/13/WebRoot/images/bg_1.jpg b/13/WebRoot/images/bg_1.jpg new file mode 100644 index 0000000..d0fae63 Binary files /dev/null and b/13/WebRoot/images/bg_1.jpg differ diff --git a/13/WebRoot/images/land.gif b/13/WebRoot/images/land.gif new file mode 100644 index 0000000..05643ea Binary files /dev/null and b/13/WebRoot/images/land.gif differ diff --git a/13/WebRoot/images/register.gif b/13/WebRoot/images/register.gif new file mode 100644 index 0000000..c858b5c Binary files /dev/null and b/13/WebRoot/images/register.gif differ diff --git a/13/WebRoot/index.jsp b/13/WebRoot/index.jsp new file mode 100644 index 0000000..8a6a64f --- /dev/null +++ b/13/WebRoot/index.jsp @@ -0,0 +1,3 @@ +<% +response.sendRedirect("photoServlet?info=forward_index"); +%> \ No newline at end of file diff --git a/13/WebRoot/js/js.js b/13/WebRoot/js/js.js new file mode 100644 index 0000000..cdcc90e --- /dev/null +++ b/13/WebRoot/js/js.js @@ -0,0 +1,128 @@ + +function clockon(bgclock) { + var now = new Date(); + var year = now.getYear(); + var month = now.getMonth(); + var date = now.getDate(); + var day = now.getDay(); + var hour = now.getHours(); + var minu = now.getMinutes(); + var sec = now.getSeconds(); + var week; + month = month + 1; + if (month < 10) { + month = "0" + month; + } + if (date < 10) { + date = "0" + date; + } + if (hour < 10) { + hour = "0" + hour; + } + if (minu < 10) { + minu = "0" + minu; + } + if (sec < 10) { + sec = "0" + sec; + } + var arr_week = new Array("\u661f\u671f\u65e5", "\u661f\u671f\u4e00", "\u661f\u671f\u4e8c", "\u661f\u671f\u4e09", "\u661f\u671f\u56db", "\u661f\u671f\u4e94", "\u661f\u671f\u516d"); + week = arr_week[day]; + var time = ""; + time = year + "\u5e74" + month + "\u6708" + date + "\u65e5 " + week + " " + hour + ":" + minu + ":" + sec; + if (document.all) { + bgclock.innerHTML = "" + time + ""; + } + var timer = setTimeout("clockon(bgclock)", 200); +} +function reload() { + document.checkCode.src = "image.jsp"; +} +function checkemail(email) { + var str = email; + //JavaScriptУʽֻʹ"/"ͷͽʹ˫ + var Expression = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/; + var objExp = new RegExp(Expression); + if (objExp.test(str) == true) { + return true; + } else { + return false; + } +} +function checkEmpty(form) { + if (form.username.value == "") { + window.alert("\u8bf7\u8f93\u5165\u7528\u6237\u540d\uff01"); + return false; + } + if (form.password.value == "") { + window.alert("\u8bf7\u8f93\u5165\u5bc6\u7801\uff01"); + return false; + } + if (form.code.value == "") { + window.alert("\u8bf7\u8f93\u5165\u6821\u9a8c\u7801\uff01"); + return false; + } +} +function checkUser(form) { + if (form.username.value == "") { + window.alert("\u8bf7\u8f93\u5165\u7528\u6237\u540d\uff01"); + return false; + } + if (form.password.value == "") { + window.alert("\u8bf7\u8f93\u5165\u5bc6\u7801\uff01"); + return false; + } + if (form.repassword.value == "") { + window.alert("\u8bf7\u8f93\u5165\u5bc6\u7801\u786e\u8ba4"); + return false; + } + if (form.password.value != form.repassword.value) { + window.alert("\u60a8\u8f93\u5165\u7684\u5bc6\u7801\u4e0e\u786e\u8ba4\u5bc6\u7801\u4e0d\u4e00\u81f4\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\uff01"); + return false; + } + if (form.realname.value == "") { + window.alert("\u8bf7\u8f93\u5165\u771f\u5b9e\u59d3\u540d\uff01"); + return false; + } + if (form.email.value == "") { + window.alert("\u8bf7\u8f93\u5165Email\u5730\u5740\uff01"); + return false; + } + if (!checkemail(form.email.value)) { + window.alert("\u60a8\u8f93\u5165\u7684email\u5730\u5740\u683c\u5f0f\u4e0d\u6b63\u786e\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\uff01"); + return false; + } + if (form.result.value == "") { + window.alert("\u8bf7\u8f93\u5165\u95ee\u9898\u7b54\u6848\uff01"); + return false; + } + if (form.code.value == "") { + window.alert("\u8bf7\u8f93\u5165\u6821\u9a8c\u7801\uff01"); + return false; + } +} +function checkPhoto(form) { + if (form.photoName.value == "") { + alert("\u8bf7\u8f93\u5165\u76f8\u7247\u7684\u540d\u79f0\uff01"); + return false; + } + if (form.file.value == "") { + alert("\u8bf7\u9009\u62e9\u6587\u4ef6\u4f4d\u7f6e"); + return false; + } + if (form.code.value == "") { + alert("\u8bf7\u8f93\u5165\u6821\u9a8c\u7801\uff01"); + return false; + } +} +function checkUserInfo() { + alert("\u8bf7\u60a8\u5148\u767b\u5f55\uff01"); +} + +function checkPhotoPrint(form) { + if (form.information.value == "") { + alert("Ҫˮӡ֣"); + return false; +} + + +} \ No newline at end of file diff --git a/13/WebRoot/photoIndex.jsp b/13/WebRoot/photoIndex.jsp new file mode 100644 index 0000000..a179aac --- /dev/null +++ b/13/WebRoot/photoIndex.jsp @@ -0,0 +1,143 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,java.util.*,com.wy.form.*" errorPage="" %> + + + + + + +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + +ᡪҳ + + + + + + + + + + + +
    + + + + + + + + +
      + + + +
    ҳ  |   + + + ҵ + + + ҵ + +   |   + +  |  + + ֻ
    + + + + + + + + + + +
    +
    + +<% +List list1=(List)request.getAttribute("list"); +int a=0; +for(Photo photo1:list1){ +%> + + + + + + + <% + List list2=dao.photo_queryList("photoType='"+photo1.getPhotoType()+"'"); + int b=0; + for(Photo photo2:list2){ + %> + + <% + b++; + if(b==3) + break; } + if(list2.size()<3){ + for(int i=0;i<3-list2.size();i++){ %> + + <%} + + + } %> + +
    <%=photo1.getPhotoType()%>
    + + + + +

    +<% + +a++; +if(a==3) +break; + +} %> + + + + + + + + + + + + + + + + + + +
    + + + + + + + +    ۰   ױ   ͨ   Ϸͼ   Цͼ   ļӡ

    +    ζ   ʱоƷ   ԰         糵Ӱ

    +       ׳ɽ   з   ʤż   ھ
    + + + + + + + + + + + + diff --git a/13/WebRoot/photoShow.jsp b/13/WebRoot/photoShow.jsp new file mode 100644 index 0000000..ab03fe9 --- /dev/null +++ b/13/WebRoot/photoShow.jsp @@ -0,0 +1,115 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + +ᡪƬϸѯ + + + + +<% +Photo photo=(Photo)request.getAttribute("photo"); +%> + + + + + + + +

            ǰû${sessionScope.userInfo.username}

    + + + + + +
    + + + +
    鿴ԴƬ    鿴ˮӡƬ
    + + + + + + +
      + + + +
     
    + + + + +
    + + + + +
     ƬϢ
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    Ƭƣ<%=photo.getPhotoName()%>
    ƣ<%=photo.getPhotoType()%>
    ƬС<% + float size = Integer.valueOf(photo.getPhotoSize()) /1024; + out.print(size); + %>KB
    ϴʱ䣺<%=photo.getPhotoTime()%>
    ϴû<%=photo.getUsername()%>
    + + <%if(null!=session.getAttribute("userInfo")){ %> + +

    + + + +              ɾƬ + + +
    + +




    +
    + + + + + + + + + + +
        ˮӡ
       ˮӡͼƬ
    +
    +
    + ${requestScope.information} +
    +
    + <%} %> + +
    + + + diff --git a/13/WebRoot/photoShowSlide.jsp b/13/WebRoot/photoShowSlide.jsp new file mode 100644 index 0000000..83d3d33 --- /dev/null +++ b/13/WebRoot/photoShowSlide.jsp @@ -0,0 +1,153 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +String newAddress=""; +String[] address=(String[])request.getAttribute("address"); +for(int i=0;i + + + + +õƬƬ + + + + + + + + + + + + + + + + + + +
         ǰû${sessionScope.userInfo.username}ϴԼƬ +
    + + + + +
    + + + +
    ͼƬ   õƬ
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + +
      
    + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/13/WebRoot/right.jsp b/13/WebRoot/right.jsp new file mode 100644 index 0000000..c1fd17d --- /dev/null +++ b/13/WebRoot/right.jsp @@ -0,0 +1,61 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + +
    + +


    + + + + +
    + + + + + + + + + + + + + + + + + + + + +
    û
      룺
    ֤룺
     
    + +    + +
    +
    + +
    + + + + + + + + + + +
    ${sessionScope.userInfo.username}Ѿɹ¼
    ˳
    +
    +
    +

    + + + diff --git a/13/WebRoot/savePrint/1220527234750.JPG b/13/WebRoot/savePrint/1220527234750.JPG new file mode 100644 index 0000000..ef15cff Binary files /dev/null and b/13/WebRoot/savePrint/1220527234750.JPG differ diff --git a/13/WebRoot/savePrint/1220578198218.JPG b/13/WebRoot/savePrint/1220578198218.JPG new file mode 100644 index 0000000..e318d8c Binary files /dev/null and b/13/WebRoot/savePrint/1220578198218.JPG differ diff --git a/13/WebRoot/savePrint/1220945562781.JPG b/13/WebRoot/savePrint/1220945562781.JPG new file mode 100644 index 0000000..35dfd5a Binary files /dev/null and b/13/WebRoot/savePrint/1220945562781.JPG differ diff --git a/13/WebRoot/savePrint/Thumbs.db b/13/WebRoot/savePrint/Thumbs.db new file mode 100644 index 0000000..0d30064 Binary files /dev/null and b/13/WebRoot/savePrint/Thumbs.db differ diff --git a/13/WebRoot/saveSmall/1220611468796.JPG b/13/WebRoot/saveSmall/1220611468796.JPG new file mode 100644 index 0000000..4274942 Binary files /dev/null and b/13/WebRoot/saveSmall/1220611468796.JPG differ diff --git a/13/WebRoot/saveSmall/1220611469984.JPG b/13/WebRoot/saveSmall/1220611469984.JPG new file mode 100644 index 0000000..71f88b0 Binary files /dev/null and b/13/WebRoot/saveSmall/1220611469984.JPG differ diff --git a/13/WebRoot/saveSmall/1220611470718.JPG b/13/WebRoot/saveSmall/1220611470718.JPG new file mode 100644 index 0000000..9a5fe44 Binary files /dev/null and b/13/WebRoot/saveSmall/1220611470718.JPG differ diff --git a/13/WebRoot/saveSmall/1220611471437.JPG b/13/WebRoot/saveSmall/1220611471437.JPG new file mode 100644 index 0000000..b61ac73 Binary files /dev/null and b/13/WebRoot/saveSmall/1220611471437.JPG differ diff --git a/13/WebRoot/saveSmall/1220611472390.JPG b/13/WebRoot/saveSmall/1220611472390.JPG new file mode 100644 index 0000000..9a90733 Binary files /dev/null and b/13/WebRoot/saveSmall/1220611472390.JPG differ diff --git a/13/WebRoot/saveSmall/1220851255859.JPG b/13/WebRoot/saveSmall/1220851255859.JPG new file mode 100644 index 0000000..2f20ffe Binary files /dev/null and b/13/WebRoot/saveSmall/1220851255859.JPG differ diff --git a/13/WebRoot/saveSmall/1220851256265.JPG b/13/WebRoot/saveSmall/1220851256265.JPG new file mode 100644 index 0000000..8eac455 Binary files /dev/null and b/13/WebRoot/saveSmall/1220851256265.JPG differ diff --git a/13/WebRoot/saveSmall/1220851329531.JPG b/13/WebRoot/saveSmall/1220851329531.JPG new file mode 100644 index 0000000..ee37622 Binary files /dev/null and b/13/WebRoot/saveSmall/1220851329531.JPG differ diff --git a/13/WebRoot/saveSmall/1220851330484.JPG b/13/WebRoot/saveSmall/1220851330484.JPG new file mode 100644 index 0000000..011ea87 Binary files /dev/null and b/13/WebRoot/saveSmall/1220851330484.JPG differ diff --git a/13/WebRoot/saveSmall/1220851331203.JPG b/13/WebRoot/saveSmall/1220851331203.JPG new file mode 100644 index 0000000..3f6b34f Binary files /dev/null and b/13/WebRoot/saveSmall/1220851331203.JPG differ diff --git a/13/WebRoot/saveSmall/1220851331828.JPG b/13/WebRoot/saveSmall/1220851331828.JPG new file mode 100644 index 0000000..45b6649 Binary files /dev/null and b/13/WebRoot/saveSmall/1220851331828.JPG differ diff --git a/13/WebRoot/saveSmall/1220851592171.JPG b/13/WebRoot/saveSmall/1220851592171.JPG new file mode 100644 index 0000000..c273a27 Binary files /dev/null and b/13/WebRoot/saveSmall/1220851592171.JPG differ diff --git a/13/WebRoot/saveSmall/1220851592765.JPG b/13/WebRoot/saveSmall/1220851592765.JPG new file mode 100644 index 0000000..43725db Binary files /dev/null and b/13/WebRoot/saveSmall/1220851592765.JPG differ diff --git a/13/WebRoot/saveSmall/1220851593406.JPG b/13/WebRoot/saveSmall/1220851593406.JPG new file mode 100644 index 0000000..df9f7c1 Binary files /dev/null and b/13/WebRoot/saveSmall/1220851593406.JPG differ diff --git a/13/WebRoot/saveSmall/1220851594390.JPG b/13/WebRoot/saveSmall/1220851594390.JPG new file mode 100644 index 0000000..96237cd Binary files /dev/null and b/13/WebRoot/saveSmall/1220851594390.JPG differ diff --git a/13/WebRoot/saveSmall/1220851673046.JPG b/13/WebRoot/saveSmall/1220851673046.JPG new file mode 100644 index 0000000..a152b28 Binary files /dev/null and b/13/WebRoot/saveSmall/1220851673046.JPG differ diff --git a/13/WebRoot/saveSmall/1220851673546.JPG b/13/WebRoot/saveSmall/1220851673546.JPG new file mode 100644 index 0000000..0cee7c9 Binary files /dev/null and b/13/WebRoot/saveSmall/1220851673546.JPG differ diff --git a/13/WebRoot/saveSmall/Thumbs.db b/13/WebRoot/saveSmall/Thumbs.db new file mode 100644 index 0000000..a69566c Binary files /dev/null and b/13/WebRoot/saveSmall/Thumbs.db differ diff --git a/13/WebRoot/savefile/1220524459546.jpg b/13/WebRoot/savefile/1220524459546.jpg new file mode 100644 index 0000000..2a960f5 Binary files /dev/null and b/13/WebRoot/savefile/1220524459546.jpg differ diff --git a/13/WebRoot/savefile/1220524459671.jpg b/13/WebRoot/savefile/1220524459671.jpg new file mode 100644 index 0000000..109ebbf Binary files /dev/null and b/13/WebRoot/savefile/1220524459671.jpg differ diff --git a/13/WebRoot/savefile/1220524897812.jpg b/13/WebRoot/savefile/1220524897812.jpg new file mode 100644 index 0000000..a8a9916 Binary files /dev/null and b/13/WebRoot/savefile/1220524897812.jpg differ diff --git a/13/WebRoot/savefile/1220524898031.jpg b/13/WebRoot/savefile/1220524898031.jpg new file mode 100644 index 0000000..07fa9e4 Binary files /dev/null and b/13/WebRoot/savefile/1220524898031.jpg differ diff --git a/13/WebRoot/savefile/1220524898109.jpg b/13/WebRoot/savefile/1220524898109.jpg new file mode 100644 index 0000000..206acd3 Binary files /dev/null and b/13/WebRoot/savefile/1220524898109.jpg differ diff --git a/13/WebRoot/savefile/1220524971546.jpg b/13/WebRoot/savefile/1220524971546.jpg new file mode 100644 index 0000000..96e6fd2 Binary files /dev/null and b/13/WebRoot/savefile/1220524971546.jpg differ diff --git a/13/WebRoot/savefile/1220525046843.jpg b/13/WebRoot/savefile/1220525046843.jpg new file mode 100644 index 0000000..8111580 Binary files /dev/null and b/13/WebRoot/savefile/1220525046843.jpg differ diff --git a/13/WebRoot/savefile/1220525046937.jpg b/13/WebRoot/savefile/1220525046937.jpg new file mode 100644 index 0000000..95c2186 Binary files /dev/null and b/13/WebRoot/savefile/1220525046937.jpg differ diff --git a/13/WebRoot/savefile/1220525047015.jpg b/13/WebRoot/savefile/1220525047015.jpg new file mode 100644 index 0000000..d16f678 Binary files /dev/null and b/13/WebRoot/savefile/1220525047015.jpg differ diff --git a/13/WebRoot/savefile/1220525047140.jpg b/13/WebRoot/savefile/1220525047140.jpg new file mode 100644 index 0000000..bfe677f Binary files /dev/null and b/13/WebRoot/savefile/1220525047140.jpg differ diff --git a/13/WebRoot/savefile/1220525082031.jpg b/13/WebRoot/savefile/1220525082031.jpg new file mode 100644 index 0000000..f1f1a6c Binary files /dev/null and b/13/WebRoot/savefile/1220525082031.jpg differ diff --git a/13/WebRoot/savefile/1220525082281.jpg b/13/WebRoot/savefile/1220525082281.jpg new file mode 100644 index 0000000..5260fb9 Binary files /dev/null and b/13/WebRoot/savefile/1220525082281.jpg differ diff --git a/13/WebRoot/savefile/1220576004906.jpg b/13/WebRoot/savefile/1220576004906.jpg new file mode 100644 index 0000000..c4afcd7 Binary files /dev/null and b/13/WebRoot/savefile/1220576004906.jpg differ diff --git a/13/WebRoot/savefile/1220576076640.jpg b/13/WebRoot/savefile/1220576076640.jpg new file mode 100644 index 0000000..3400c47 Binary files /dev/null and b/13/WebRoot/savefile/1220576076640.jpg differ diff --git a/13/WebRoot/savefile/1220576076703.jpg b/13/WebRoot/savefile/1220576076703.jpg new file mode 100644 index 0000000..3401607 Binary files /dev/null and b/13/WebRoot/savefile/1220576076703.jpg differ diff --git a/13/WebRoot/savefile/1220576122453.jpg b/13/WebRoot/savefile/1220576122453.jpg new file mode 100644 index 0000000..9b16311 Binary files /dev/null and b/13/WebRoot/savefile/1220576122453.jpg differ diff --git a/13/WebRoot/savefile/1220576165359.jpg b/13/WebRoot/savefile/1220576165359.jpg new file mode 100644 index 0000000..7fa8706 Binary files /dev/null and b/13/WebRoot/savefile/1220576165359.jpg differ diff --git a/13/WebRoot/savefile/1220576325718.jpg b/13/WebRoot/savefile/1220576325718.jpg new file mode 100644 index 0000000..4e79572 Binary files /dev/null and b/13/WebRoot/savefile/1220576325718.jpg differ diff --git a/13/WebRoot/savefile/1220576355859.jpg b/13/WebRoot/savefile/1220576355859.jpg new file mode 100644 index 0000000..1f9856d Binary files /dev/null and b/13/WebRoot/savefile/1220576355859.jpg differ diff --git a/13/WebRoot/savefile/1220576407718.jpg b/13/WebRoot/savefile/1220576407718.jpg new file mode 100644 index 0000000..4c4545d Binary files /dev/null and b/13/WebRoot/savefile/1220576407718.jpg differ diff --git a/13/WebRoot/savefile/1220576613312.jpg b/13/WebRoot/savefile/1220576613312.jpg new file mode 100644 index 0000000..66a1145 Binary files /dev/null and b/13/WebRoot/savefile/1220576613312.jpg differ diff --git a/13/WebRoot/savefile/1220576639093.jpg b/13/WebRoot/savefile/1220576639093.jpg new file mode 100644 index 0000000..c007a8b Binary files /dev/null and b/13/WebRoot/savefile/1220576639093.jpg differ diff --git a/13/WebRoot/savefile/1220576675125.bmp b/13/WebRoot/savefile/1220576675125.bmp new file mode 100644 index 0000000..712f6f8 Binary files /dev/null and b/13/WebRoot/savefile/1220576675125.bmp differ diff --git a/13/WebRoot/savefile/1220576841703.jpg b/13/WebRoot/savefile/1220576841703.jpg new file mode 100644 index 0000000..2564398 Binary files /dev/null and b/13/WebRoot/savefile/1220576841703.jpg differ diff --git a/13/WebRoot/savefile/1220576944343.jpg b/13/WebRoot/savefile/1220576944343.jpg new file mode 100644 index 0000000..e81b5d4 Binary files /dev/null and b/13/WebRoot/savefile/1220576944343.jpg differ diff --git a/13/WebRoot/savefile/1220577229984.JPG b/13/WebRoot/savefile/1220577229984.JPG new file mode 100644 index 0000000..b23f102 Binary files /dev/null and b/13/WebRoot/savefile/1220577229984.JPG differ diff --git a/13/WebRoot/savefile/1220577284937.JPG b/13/WebRoot/savefile/1220577284937.JPG new file mode 100644 index 0000000..cabd50e Binary files /dev/null and b/13/WebRoot/savefile/1220577284937.JPG differ diff --git a/13/WebRoot/savefile/1220577285015.JPG b/13/WebRoot/savefile/1220577285015.JPG new file mode 100644 index 0000000..db22685 Binary files /dev/null and b/13/WebRoot/savefile/1220577285015.JPG differ diff --git a/13/WebRoot/savefile/1220577285046.JPG b/13/WebRoot/savefile/1220577285046.JPG new file mode 100644 index 0000000..dd622c3 Binary files /dev/null and b/13/WebRoot/savefile/1220577285046.JPG differ diff --git a/13/WebRoot/savefile/1220577489015.JPG b/13/WebRoot/savefile/1220577489015.JPG new file mode 100644 index 0000000..5664512 Binary files /dev/null and b/13/WebRoot/savefile/1220577489015.JPG differ diff --git a/13/WebRoot/savefile/1220577489062.JPG b/13/WebRoot/savefile/1220577489062.JPG new file mode 100644 index 0000000..e6372d0 Binary files /dev/null and b/13/WebRoot/savefile/1220577489062.JPG differ diff --git a/13/WebRoot/savefile/1220577489140.JPG b/13/WebRoot/savefile/1220577489140.JPG new file mode 100644 index 0000000..3c2661f Binary files /dev/null and b/13/WebRoot/savefile/1220577489140.JPG differ diff --git a/13/WebRoot/savefile/1220577489171.JPG b/13/WebRoot/savefile/1220577489171.JPG new file mode 100644 index 0000000..8638bd5 Binary files /dev/null and b/13/WebRoot/savefile/1220577489171.JPG differ diff --git a/13/WebRoot/savefile/1220611044718.JPG b/13/WebRoot/savefile/1220611044718.JPG new file mode 100644 index 0000000..dd863de Binary files /dev/null and b/13/WebRoot/savefile/1220611044718.JPG differ diff --git a/13/WebRoot/savefile/1220611044859.JPG b/13/WebRoot/savefile/1220611044859.JPG new file mode 100644 index 0000000..89cea12 Binary files /dev/null and b/13/WebRoot/savefile/1220611044859.JPG differ diff --git a/13/WebRoot/savefile/1220611044921.JPG b/13/WebRoot/savefile/1220611044921.JPG new file mode 100644 index 0000000..8702a72 Binary files /dev/null and b/13/WebRoot/savefile/1220611044921.JPG differ diff --git a/13/WebRoot/savefile/1220611045015.JPG b/13/WebRoot/savefile/1220611045015.JPG new file mode 100644 index 0000000..32b23e2 Binary files /dev/null and b/13/WebRoot/savefile/1220611045015.JPG differ diff --git a/13/WebRoot/savefile/1220611045062.JPG b/13/WebRoot/savefile/1220611045062.JPG new file mode 100644 index 0000000..2947957 Binary files /dev/null and b/13/WebRoot/savefile/1220611045062.JPG differ diff --git a/13/WebRoot/savefile/1220611294156.JPG b/13/WebRoot/savefile/1220611294156.JPG new file mode 100644 index 0000000..549db34 Binary files /dev/null and b/13/WebRoot/savefile/1220611294156.JPG differ diff --git a/13/WebRoot/savefile/1220611294234.JPG b/13/WebRoot/savefile/1220611294234.JPG new file mode 100644 index 0000000..c58c4ef Binary files /dev/null and b/13/WebRoot/savefile/1220611294234.JPG differ diff --git a/13/WebRoot/savefile/1220611294312.JPG b/13/WebRoot/savefile/1220611294312.JPG new file mode 100644 index 0000000..91e7b33 Binary files /dev/null and b/13/WebRoot/savefile/1220611294312.JPG differ diff --git a/13/WebRoot/savefile/1220611294375.JPG b/13/WebRoot/savefile/1220611294375.JPG new file mode 100644 index 0000000..ccccb5d Binary files /dev/null and b/13/WebRoot/savefile/1220611294375.JPG differ diff --git a/13/WebRoot/savefile/1220611294437.JPG b/13/WebRoot/savefile/1220611294437.JPG new file mode 100644 index 0000000..55f612d Binary files /dev/null and b/13/WebRoot/savefile/1220611294437.JPG differ diff --git a/13/WebRoot/savefile/1220611468796.JPG b/13/WebRoot/savefile/1220611468796.JPG new file mode 100644 index 0000000..89ef383 Binary files /dev/null and b/13/WebRoot/savefile/1220611468796.JPG differ diff --git a/13/WebRoot/savefile/1220611469984.JPG b/13/WebRoot/savefile/1220611469984.JPG new file mode 100644 index 0000000..db888c9 Binary files /dev/null and b/13/WebRoot/savefile/1220611469984.JPG differ diff --git a/13/WebRoot/savefile/1220611470718.JPG b/13/WebRoot/savefile/1220611470718.JPG new file mode 100644 index 0000000..4ce2f50 Binary files /dev/null and b/13/WebRoot/savefile/1220611470718.JPG differ diff --git a/13/WebRoot/savefile/1220611471437.JPG b/13/WebRoot/savefile/1220611471437.JPG new file mode 100644 index 0000000..f0efbaf Binary files /dev/null and b/13/WebRoot/savefile/1220611471437.JPG differ diff --git a/13/WebRoot/savefile/1220611472390.JPG b/13/WebRoot/savefile/1220611472390.JPG new file mode 100644 index 0000000..0d99ef0 Binary files /dev/null and b/13/WebRoot/savefile/1220611472390.JPG differ diff --git a/13/WebRoot/savefile/1220851255859.JPG b/13/WebRoot/savefile/1220851255859.JPG new file mode 100644 index 0000000..cebe00f Binary files /dev/null and b/13/WebRoot/savefile/1220851255859.JPG differ diff --git a/13/WebRoot/savefile/1220851256265.JPG b/13/WebRoot/savefile/1220851256265.JPG new file mode 100644 index 0000000..c6e1272 Binary files /dev/null and b/13/WebRoot/savefile/1220851256265.JPG differ diff --git a/13/WebRoot/savefile/1220851329531.JPG b/13/WebRoot/savefile/1220851329531.JPG new file mode 100644 index 0000000..4329c0e Binary files /dev/null and b/13/WebRoot/savefile/1220851329531.JPG differ diff --git a/13/WebRoot/savefile/1220851330484.JPG b/13/WebRoot/savefile/1220851330484.JPG new file mode 100644 index 0000000..c510d1e Binary files /dev/null and b/13/WebRoot/savefile/1220851330484.JPG differ diff --git a/13/WebRoot/savefile/1220851331203.JPG b/13/WebRoot/savefile/1220851331203.JPG new file mode 100644 index 0000000..0953c25 Binary files /dev/null and b/13/WebRoot/savefile/1220851331203.JPG differ diff --git a/13/WebRoot/savefile/1220851331828.JPG b/13/WebRoot/savefile/1220851331828.JPG new file mode 100644 index 0000000..47501c7 Binary files /dev/null and b/13/WebRoot/savefile/1220851331828.JPG differ diff --git a/13/WebRoot/savefile/1220851592171.JPG b/13/WebRoot/savefile/1220851592171.JPG new file mode 100644 index 0000000..2258827 Binary files /dev/null and b/13/WebRoot/savefile/1220851592171.JPG differ diff --git a/13/WebRoot/savefile/1220851592765.JPG b/13/WebRoot/savefile/1220851592765.JPG new file mode 100644 index 0000000..6484213 Binary files /dev/null and b/13/WebRoot/savefile/1220851592765.JPG differ diff --git a/13/WebRoot/savefile/1220851593406.JPG b/13/WebRoot/savefile/1220851593406.JPG new file mode 100644 index 0000000..913bc4c Binary files /dev/null and b/13/WebRoot/savefile/1220851593406.JPG differ diff --git a/13/WebRoot/savefile/1220851594390.JPG b/13/WebRoot/savefile/1220851594390.JPG new file mode 100644 index 0000000..a0ada99 Binary files /dev/null and b/13/WebRoot/savefile/1220851594390.JPG differ diff --git a/13/WebRoot/savefile/1220851673046.JPG b/13/WebRoot/savefile/1220851673046.JPG new file mode 100644 index 0000000..fccd86e Binary files /dev/null and b/13/WebRoot/savefile/1220851673046.JPG differ diff --git a/13/WebRoot/savefile/1220851673546.JPG b/13/WebRoot/savefile/1220851673546.JPG new file mode 100644 index 0000000..7e00d5d Binary files /dev/null and b/13/WebRoot/savefile/1220851673546.JPG differ diff --git a/13/WebRoot/savefile/Thumbs.db b/13/WebRoot/savefile/Thumbs.db new file mode 100644 index 0000000..d214c38 Binary files /dev/null and b/13/WebRoot/savefile/Thumbs.db differ diff --git a/13/WebRoot/top.jsp b/13/WebRoot/top.jsp new file mode 100644 index 0000000..8052e6e --- /dev/null +++ b/13/WebRoot/top.jsp @@ -0,0 +1,26 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +
    + + + +
    + ҳ  |   + + + ҵ + + + ҵ + +   |   + +  |  + + ֻ +
    \ No newline at end of file diff --git a/13/WebRoot/user_queryPhoto.jsp b/13/WebRoot/user_queryPhoto.jsp new file mode 100644 index 0000000..bf37dce --- /dev/null +++ b/13/WebRoot/user_queryPhoto.jsp @@ -0,0 +1,123 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + +ᡪѯ + + +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + +<% +if(null==session.getAttribute("userInfo")){ +response.sendRedirect("index.jsp"); +} + +%> + + + + + + + + +
         ǰû${sessionScope.userInfo.username}ϴԼƬ +
    + + + + +
    + + + +
    ѯ
    + + + + +
    + + + + + + + + <% + String[] typePhoto=(String[])request.getAttribute("type"); + int lineCount=5; + int typeLength=typePhoto.length; + int rowCount=typeLength/lineCount; + if(typeLength%lineCount!=0){ + rowCount++; + } + List list=(List)request.getAttribute("list"); + %> + + <% + for(int i=0;i + + <% + if(i%lineCount==lineCount-1){ + + out.print(""); + } + } + + if(rowCount*lineCount-typeLength>0){ + int overCount=rowCount*lineCount-typeLength; + for(int j=0;j "); + } + } + %> + +
    + + + + + + + + + +
    + <% + for(int j=0;j + + + + + + + + <% + break; + } }%> +
    <%=typePhoto[i]%>
    +
    + + + + + +
    + + + + + + + +
    + + + diff --git a/13/WebRoot/user_queryPhotoList.jsp b/13/WebRoot/user_queryPhotoList.jsp new file mode 100644 index 0000000..522e6cf --- /dev/null +++ b/13/WebRoot/user_queryPhotoList.jsp @@ -0,0 +1,122 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + +ᡪѯеƬѯ + + +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + <% + List list=(List)request.getAttribute("list"); + Photo photo=(Photo)list.get(0); + %> + + + + + + + + +
         ǰû${sessionScope.userInfo.username} + <%if(null!=session.getAttribute("userInfo")){ %> + ϴԼƬ + <%} %> +
    + + + + +
    + + + + + +
    + ͼƬ  " class="a3">õƬ +
    + +
    + + + + + + + + + + + + + + + + +
    + + + + +

    +
    + + + + + + + +
    + + + + + <%for(int j=0;j + + <%}%> + +
    +   + + +
    + + + +
    +
    + +
    + + + + + + diff --git a/13/WebRoot/user_save.jsp b/13/WebRoot/user_save.jsp new file mode 100644 index 0000000..efcc23f --- /dev/null +++ b/13/WebRoot/user_save.jsp @@ -0,0 +1,106 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +ᡪûע + + +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + + + + + + + + +
     
    + + + + +
    + + + +
    ûע
    + + + + +
    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    û
    ȷ룺
    ʵ
    Emailַ
    + +
    𰸣
    У룺
     
      + +      + +
    +
    +


    + + ${requestScope.information}

    + Ҫֱӵ¼뵥 +
    + + + +
    + + + + + diff --git a/13/WebRoot/user_upLoadPhoto.jsp b/13/WebRoot/user_upLoadPhoto.jsp new file mode 100644 index 0000000..098bfeb --- /dev/null +++ b/13/WebRoot/user_upLoadPhoto.jsp @@ -0,0 +1,152 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + +ᡪ + + +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + <%response.sendRedirect("index.jsp");%> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
         ǰû${sessionScope.userInfo.username} 
    + + + + +
    + + + +
    ϴͼƬ
    + + + + + + + + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ƭƣ
    Ƭͣ + +
    ϴʱ䣺<%=Encrypt.currentlyTime()%>
    Ƭλã
    ϴû${sessionScope.userInfo.username}
     ֤ 룺
     
      + +    + +    + +
    +
    + ע⣺ͼƬĸʽֻΪjpgJPGgifbmpBNPʽ

    + ${requestScope.information}
    +
    + + + diff --git a/13/src/com/wy/dao/OperationData.java b/13/src/com/wy/dao/OperationData.java new file mode 100644 index 0000000..9edf2eb --- /dev/null +++ b/13/src/com/wy/dao/OperationData.java @@ -0,0 +1,174 @@ +package com.wy.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.wy.form.Photo; +import com.wy.form.UserInfo; +import com.wy.tools.JDBConnection; + +public class OperationData { + private JDBConnection connection = null; //ݿJDBConnection󲢸ֵΪnull + private List list = null; //һListֵ࣬Ϊnull + String sql = ""; //һSQL͵Ķ󣬲ֵΪһַ + //ûΪѯûFormǵû + public UserInfo user_query(String username) { + UserInfo userInfo = null; //ûUserInfo + connection = new JDBConnection(); //JDBCOnnectionʵ + sql = "SELECT * FROM tb_userInfo WHERE username='" + username + "'"; + //òѯSQL + ResultSet rs = connection.executeQuery(sql); //ִвѯؽResultSet + try { + //Խѭ + while (rs.next()) { + userInfo = new UserInfo(); // ʵUserInfo + userInfo.setId(rs.getInt("id")); // ݱidֶݽиֵ + userInfo.setUsername(rs.getString("username")); // ݱusernameֶݽиֵ + userInfo.setPassword(rs.getString("password")); // ݱpasswrodֶݽиֵ + userInfo.setRealname(rs.getString("realname")); // ݱrealnameֶݽиֵ + userInfo.setEmail(rs.getString("email")); // ݱemailֶݽиֵ + userInfo.setQuestion(rs.getString("question")); // ݱquestionֶݽиֵ + userInfo.setResult(rs.getString("result")); // ݱresultֶݽиֵ + } + } catch (SQLException e) { + e.printStackTrace(); + + } finally { + connection.closeConnection(); // ִйرݿӵIJ + } + return userInfo; // ûΪвѯûһ + } + + // ʵû÷ûϢĶΪ + public boolean user_save(UserInfo userinfo) { + connection = new JDBConnection(); //JDBConnectionʵ + sql = "INSERT INTO tb_userInfo VALUES ('" + userinfo.getUsername() + + "','" + userinfo.getPassword() + "','" + + userinfo.getRealname() + "','" + userinfo.getEmail() + "','" + + userinfo.getQuestion() + "','" + userinfo.getResult() + "')"; + boolean flag = connection.executeUpdate(sql); //ִбûIJflagֵʾݿԱʾִеĽ + connection.closeConnection(); //رݿӲ + return flag; //flagΪķؽ + } + + // ʵƬݱ÷ƬϢĶΪ + public boolean photo_save(Photo photo) { + connection = new JDBConnection(); // JDBConnectionʵ + sql = "insert into tb_photo values ('" + photo.getPhotoName() + "','" + + photo.getPhotoSize() + "','" + photo.getPhotoType() + "','" + + photo.getPhotoTime() + "','" + photo.getPhotoAddress() + + "','" + photo.getUsername() + "',0,'" + photo.getSmallPhoto() + + "')"; + // ñƬݿSQL + boolean flag = connection.executeUpdate(sql); // ִбƬϢSQL + connection.closeConnection(); // رݿӲ + return flag; // flagΪķؽ + } + + // Ƭɾ÷ƬidΪ + public boolean photo_delete(Integer id) { + connection = new JDBConnection(); // ʵJDBConnectionĶ + sql = "delete from tb_photo where id=" + id + ""; // ɾƬSQL + boolean flag = connection.executeUpdate(sql); // ִɾSQLִнֵflag + connection.closeConnection(); // رݿӲ + return flag; // SQLִнΪķֵ + } + + // ѯIJconditionΪIJҪòѯ + public List photo_queryList(String condition) { + Photo photo = null; // ƬϢĶ + list = new ArrayList(); // List϶ʵ + sql = "SELECT * FROM tb_photo"; // öƬȫѯIJ + if (condition != null) { // conditionΪգSQL + sql = "SELECT * FROM tb_photo WHERE " + condition + ""; + } + connection = new JDBConnection(); // ʵJDBCOnneciotn + ResultSet rs = connection.executeQuery(sql); // ִвѯSQL䣬ѯĽֵResultSet + try { + // ѭrs + while (rs.next()) { + photo = new Photo(); // ƬϢʵ + photo.setId(rs.getInt(1)); // 1ֶݽиֵ + photo.setPhotoName(rs.getString(2));// 2ֶݽиֵ + photo.setPhotoSize(rs.getString(3));// 3ֶݽиֵ + photo.setPhotoType(rs.getString(4));// 4ֶݽиֵ + photo.setPhotoTime(rs.getString(5));// 5ֶݽиֵ + photo.setPhotoAddress(rs.getString(6));// 61ֶݽиֵ + photo.setUsername(rs.getString(7));// 7ֶݽиֵ + photo.setPrintAddress(rs.getString(8));// 8ֶݽиֵ + photo.setSmallPhoto(rs.getString(9));// 9ֶݽиֵ + list.add(photo); // ѯĽList϶ + } + } catch (SQLException e) { + e.printStackTrace(); + } finally { + connection.closeConnection(); // رݿӲ + } + return list; + } + + // ûΪѯϴ + public String[] queryPhotoType(String username) { + String[] type = null; // type飬ݱûϴ + sql = "select photoType from tb_photo where username='" + username + + "' group by photoType"; // ÷ѯSQL + connection = new JDBConnection(); // JDBConnectionʵ + ResultSet rs = connection.executeQuery(sql); // ִвѯSQL䣬ѯrs + try { + rs.last(); // rsִָһ + int length = rs.getRow(); // ѯǰ¼ + type = new String[length]; // ݵijȽ + rs.beforeFirst(); // rsָָǰݿ + int i = 0; // i¼ѭĴ + // rsѭ + while (rs.next()) { + type[i++] = rs.getString("photoType");// еÿиֵ + } + } catch (SQLException e) { + e.printStackTrace(); + } finally { + connection.closeConnection(); + } + return type; // ѯĽз + } + + // ԶΪ޸ˮӡͼƬλ + public boolean updatePhoto(Photo photo) { + connection = new JDBConnection(); // JDBConnectionʵ + sql = "update tb_photo set printAddress = '" + photo.getPrintAddress() + + "' where id = '" + photo.getId() + "'"; + + if (connection.executeUpdate(sql)) { + return true; + } else { + return false; + } + } + + // ҳѯ + public List queryPhotoList() { + connection = new JDBConnection(); + list = new ArrayList(); // List϶ʵ + sql = "select photoType,count(*) as number from tb_photo group by photoType order by number desc"; + Photo photo = null; + ResultSet rs = connection.executeQuery(sql); + try { + while (rs.next()) { + photo = new Photo(); + photo.setPhotoType(rs.getString("photoType")); + photo.setNumber(rs.getInt("number")); + list.add(photo); // ѯĽList϶ + } + } catch (SQLException e) { + e.printStackTrace(); + } finally { + connection.closeConnection(); // رݿӲ + } + return list; + } + + +} diff --git a/13/src/com/wy/form/Photo.java b/13/src/com/wy/form/Photo.java new file mode 100644 index 0000000..e8a437a --- /dev/null +++ b/13/src/com/wy/form/Photo.java @@ -0,0 +1,111 @@ +package com.wy.form; + +public class Photo { + private Integer id = -1; // ݿԶŵĶ + private String photoName = ""; // ƬƵĶ + private String photoSize = ""; // ƬСĶ + private String photoTime = ""; // ƬϴʱĶ + private String photoAddress = ""; // Ƭڷ˵ַĶ + private String username = ""; // ƬϴûĶ + private String photoType = ""; // ƬƵĶ + private String printAddress=""; + + + private String smallPhoto=""; + + private Integer number=null; + + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public String getPrintAddress() { + return printAddress; + } + + public void setPrintAddress(String printAddress) { + this.printAddress = printAddress; + } + + //ϢĹ췽 + public Photo() { + } + + /******************ƬƶgetXXX()setXXX()*************/ + public String getPhotoType() { + return photoType; + } + + public void setPhotoType(String photoType) { + this.photoType = photoType; + } + /***************************************************/ + + /******************ݿԶŶgetXXX()setXXX()*************/ + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + /***************************************************/ + /******************Ƭŷ˵ַgetXXX()setXXX()*************/ + public String getPhotoAddress() { + return photoAddress; + } + + public void setPhotoAddress(String photoAddress) { + this.photoAddress = photoAddress; + } + /***************************************************/ + /******************ƬƶgetXXX()setXXX()*************/ + public String getPhotoName() { + return photoName; + } + + public void setPhotoName(String photoName) { + this.photoName = photoName; + } + /***************************************************/ + /******************ƬСgetXXX()setXXX()*************/ + public String getPhotoSize() { + return photoSize; + } + + public void setPhotoSize(String photoSize) { + this.photoSize = photoSize; + } + /***************************************************/ + /******************ƬϴʱgetXXX()setXXX()*************/ + public String getPhotoTime() { + return photoTime; + } + + public void setPhotoTime(String photoTime) { + this.photoTime = photoTime; + } + /***************************************************/ + /******************ƬϴûgetXXX()setXXX()*************/ + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + /***************************************************/ + + public String getSmallPhoto() { + return smallPhoto; + } + + public void setSmallPhoto(String smallPhoto) { + this.smallPhoto = smallPhoto; + } +} diff --git a/13/src/com/wy/form/UserInfo.java b/13/src/com/wy/form/UserInfo.java new file mode 100644 index 0000000..a168f26 --- /dev/null +++ b/13/src/com/wy/form/UserInfo.java @@ -0,0 +1,67 @@ +package com.wy.form; + +public class UserInfo { + private Integer id = -1; //ݿԶŶ + private String username = ""; //ûƶ + private String password = ""; //û¼ + private String realname = ""; //ûʵ + private String email = ""; //ûemailַ + private String question = ""; //û + private String result = ""; //û𰸶 + /*************emailַΪgetXXX()setXXX()*******************/ + public String getEmail() { + return email; + } + public void setEmail(String email) { + this.email = email; + } + /***********************************************/ + /*************idΪgetXXX()setXXX()*******************/ + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + /*************passwordΪgetXXX()setXXX()*******************/ + /***********************************************/ + public String getPassword() { + return password; + } + public void setPassword(String password) { + this.password = password; + } + /***********************************************/ + /*************questionΪgetXXX()setXXX()*******************/ + public String getQuestion() { + return question; + } + public void setQuestion(String question) { + this.question = question; + } + /***********************************************/ + /*************realnameΪgetXXX()setXXX()*******************/ + public String getRealname() { + return realname; + } + public void setRealname(String realname) { + this.realname = realname; + } + /***********************************************/ + /*************resultΪgetXXX()setXXX()*******************/ + public String getResult() { + return result; + } + public void setResult(String result) { + this.result = result; + } + /***********************************************/ + /*************usernameΪgetXXX()setXXX()*******************/ + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + /***********************************************/ +} diff --git a/13/src/com/wy/servlet/PhotoServlet.java b/13/src/com/wy/servlet/PhotoServlet.java new file mode 100644 index 0000000..7b6d21d --- /dev/null +++ b/13/src/com/wy/servlet/PhotoServlet.java @@ -0,0 +1,323 @@ +package com.wy.servlet; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.jspsmart.upload.File; +import com.jspsmart.upload.Files; +import com.wy.dao.OperationData; +import com.wy.form.Photo; +import com.wy.form.UserInfo; + +public class PhotoServlet extends HttpServlet { + private String info = ""; + + private OperationData data = null; + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + info = request.getParameter("info"); + // ҳinfoIJִֵͬвͬIJ + if (info.equals("userQueryPhoto")) { + this.user_queryPhoto(request, response); + } + if (info.equals("userUploadPhoto")) { + this.user_uploadPhoto(request, response); + } + if (info.equals("queryOnePhoto")) { + + this.queryOnePhoto(request, response); + } + if (info.equals("queryPhotoList")) { + + this.user_queryPhotoList(request, response); + } + if (info.equals("queryOnePhoto")) { + + this.queryOnePhoto(request, response); + } + if (info.equals("queryPhotoSlide")) { + + this.queryPhotoSlide(request, response); + } + if (info.equals("userDeletePhoto")) { + + this.user_deletePhoto(request, response); + } + if (info.equals("userprintPhoto")) { + + this.user_printPhoto(request, response); + } + if (info.equals("forward_index")) { + + this.forward_index(request, response); + } + + } + + // תҳ + public void forward_index(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + List list = new OperationData().queryPhotoList(); + request.setAttribute("list", list); + request.getRequestDispatcher("photoIndex.jsp").forward(request, + response); + } + + // ˮӡͼƬ + public void user_printPhoto(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + data = new OperationData(); + Integer id = Integer.valueOf(request.getParameter("id")); + String condition = "id = '" + id + "'"; + List list = data.photo_queryList(condition); + Photo photo1 = (Photo) list.get(0); + String filePath = request.getRealPath(photo1.getPhotoAddress()); // ͼƬԴļ + String print = "savePrint/" + System.currentTimeMillis() + ".JPG"; + String printPath = request.getRealPath(print); // ˮӡͼƬλ + /** ******************************************************************************* */ + if (!photo1.getPrintAddress().equals("0")) { + String path = request.getRealPath(photo1.getPrintAddress()); + java.io.File file1 = new java.io.File(path); + if (file1.exists()) { + file1.delete(); + } + } + /** ******************************************************************************* */ + String printInforamtion = com.wy.tools.Encrypt.toChinese(request + .getParameter("information")); + String information = "ˮӡЧʧܣ"; + if (com.wy.tools.ImageUtils.createMark(filePath, printPath, + printInforamtion)) { + Photo photo2 = new Photo(); + photo2.setId(photo1.getId()); + photo2.setPrintAddress(print); + if (data.updatePhoto(photo2)) { + information = "ˮӡЧɹ"; + } + } + + request.setAttribute("information", information); + List list1 = data.photo_queryList(condition); + Photo photo3 = (Photo) list1.get(0); + request.setAttribute("photo", photo3); + request.getRequestDispatcher("photoShow.jsp") + .forward(request, response); + } + + // ɾͼƬ + public void user_deletePhoto(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html;charset=GBK"); + PrintWriter out = response.getWriter(); + data = new OperationData(); + Integer id = Integer.valueOf(request.getParameter("id")); // ҳлȡҪɾƬid + String condition = "id=" + id; // idΪòѯ + List list = data.photo_queryList(condition); // idֵвѯƬһϢ + String address = null; // ôŷ˵ַ + String print = null; + String type = null; // Ƭ + if (list.size() == 1) { // жϲѯļǷʹһ + Photo photo = (Photo) list.get(0); + address = photo.getPhotoAddress(); // ȡݿƬŷ˵ĵַ + print = photo.getPrintAddress(); + type = photo.getPhotoType(); // ȡƬ + } + String path = request.getRealPath("/" + address); // ȡļʵʵַ + data.photo_delete(id); // ɾƬӦSQL + // IJǸļλýɾ + java.io.File file1 = new java.io.File(path); + if (file1.exists()) { + file1.delete(); + } + String printPath = request.getRealPath("/" + print); + java.io.File file2 = new java.io.File(printPath); + if (file2.exists()) { + file2.delete(); + } + // ļͱrequestΧ + request.setAttribute("type", type); + request.getRequestDispatcher("dealwith.jsp").forward(request, response); + } + + // ʵûϴԼͼƬ + public void user_uploadPhoto(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + data = new OperationData(); + com.jspsmart.upload.SmartUpload su = new com.jspsmart.upload.SmartUpload(); + String information = "Ƭʧܣ"; + try { + su.initialize(this.getServletConfig(), request, response); // óijʼ + su.setMaxFileSize(2 * 1024 * 1024); // ϴļĴС + su.upload(); + Files files = su.getFiles(); // ȡϴļ + + for (int i = 0; i < files.getCount(); i++) { + File singleFile = files.getFile(i); // ȡϴļĵļ + + String fileType = singleFile.getFileExt(); // ȡϴļչ + String[] type = { "JPG", "jpg", "gif", "bmp", "BMP" }; // ϴļչ + int place = java.util.Arrays.binarySearch(type, fileType); // жϴļǷȷ + + String code = su.getRequest().getParameter("code"); // ȡ֤ + String codeSession = (String) request.getSession() + .getAttribute("rand"); // ȡͻsessionֵ֤ + if (code.equals(codeSession)) { // ж֤Ƿȷ + + if (place != -1) { // жļչǷȷ + if (!singleFile.isMissing()) { // жϸļǷѡ + String photoName = su.getRequest().getParameter( + "photoName") + + i; // ȡƬ + String photoType = su.getRequest().getParameter( + "photoType"); // ȡ + String photoTime = su.getRequest().getParameter( + "photoTime"); // ȡϴʱ + String username = su.getRequest().getParameter( + "username"); // ȡϴû + String photoSize = String.valueOf(singleFile + .getSize()); // ȡϴļĴС + String filedir = "savefile/" + + System.currentTimeMillis() + "." + + singleFile.getFileExt(); // ϵͳʱΪϴļƣϴļ· + + String smalldir = "saveSmall/" + + System.currentTimeMillis() + "." + + singleFile.getFileExt(); + + Photo photo = new Photo(); + /** ********photoеԽһһֵ*** */ + photo.setPhotoName(photoName); + photo.setPhotoType(photoType); + photo.setPhotoSize(photoSize); + photo.setPhotoTime(photoTime); + photo.setUsername(username); + photo.setPhotoAddress(filedir); + photo.setSmallPhoto(smalldir); + /** ************************************ */ + if (data.photo_save(photo)) { // ʵϴSQL + singleFile.saveAs(filedir, File.SAVEAS_VIRTUAL); // ִϴ + com.wy.tools.ImageUtils.createSmallPhoto( + request.getRealPath("/" + filedir), + request.getRealPath("/" + smalldir)); + information = "Ƭɹ!"; + + } + + } + + } + + } + } + + } catch (Exception e) { + System.out.println(e); + } + + request.setAttribute("information", information); + request.getRequestDispatcher("user_upLoadPhoto.jsp").forward(request, + response); + + } + + // ûɹ¼ʵֵ¼ûѯĹ + public void user_queryPhoto(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + data = new OperationData(); + UserInfo userInfo = (UserInfo) request.getSession().getAttribute( + "userInfo"); // ȡͻ˴sessionе + String username = userInfo.getUsername(); // ȡû + String[] type = data.queryPhotoType(username); // ûѯûϴ + request.setAttribute("type", type); // ʹrequestΧ + String condition = "username = '" + username + "'"; + List list = data.photo_queryList(condition); // ûѯ + request.setAttribute("list", list); // ѯĽrequestΧ + request.getRequestDispatcher("user_queryPhoto.jsp").forward(request, + response); + } + + // û¼󣬶ÿеƬвѯ + public void user_queryPhotoList(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + + data = new OperationData(); + String type = com.wy.tools.Encrypt.toChinese(request + .getParameter("type")); // ȡҳе + String condition = "photoType = '" + type + "'"; + if (null != request.getSession().getAttribute("userInfo")) { + UserInfo userInfo = (UserInfo) request.getSession().getAttribute( + "userInfo"); // ȡͻsessionеĶ + String username = userInfo.getUsername(); // ݿͻsessionеĶ󣬻ȡû + condition = "username ='" + username + "' and photoType = '" + type + + "'"; // òѯֱûͽвѯ + } + List list = data.photo_queryList(condition); // ִвѯ + if (list.size() == 0) { + request.setCharacterEncoding("gb2312"); + PrintWriter out = response.getWriter(); + out.print(""); + } else { + request.setAttribute("list", list); // ѯĽrequestΧ + request.setAttribute("type", type); // ƱrequestΧ + request.getRequestDispatcher("user_queryPhotoList.jsp").forward( + request, response); + } + } + + // Ƭϸѯ + public void queryOnePhoto(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + data = new OperationData(); + Integer id = Integer.valueOf(request.getParameter("id")); // ȡҳID + String condition = "id = '" + id + "'"; // òѯidΪѯ + List list = data.photo_queryList(condition); // ִвѯķ + Photo photo = null; + if (list.size() == 1) { // idŵֵݿΨһģֻһ + photo = (Photo) list.get(0); + } + request.setAttribute("photo", photo); // ѯĽrequestΧ + try { + request.getRequestDispatcher("photoShow.jsp").forward(request, + response); + return; + } catch (Exception e) { + + } + + } + + // õƬ + public void queryPhotoSlide(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + data = new OperationData(); + UserInfo userInfo = (UserInfo) request.getSession().getAttribute( + "userInfo"); // ȡͻsessionеָ + String username = userInfo.getUsername(); // ȡû + String type = com.wy.tools.Encrypt.toChinese(request + .getParameter("type")); // ȡվ + String condition = "username ='" + username + "' and photoType = '" + + type + "'"; // òѯûΪ + List list = data.photo_queryList(condition); // ִвѯ + String address[] = new String[list.size()]; // Ƭλõ + for (int i = 0; i < list.size(); i++) { + Photo photo = (Photo) list.get(i); + address[i] = photo.getPhotoAddress(); // ѯĽУƬλýһһֵ + } + request.setAttribute("address", address); // ƬַrequestΧ + request.getRequestDispatcher("photoShowSlide.jsp").forward(request, + response); + } + + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + this.doGet(request, response); + } + +} diff --git a/13/src/com/wy/servlet/UserInfoServlet.java b/13/src/com/wy/servlet/UserInfoServlet.java new file mode 100644 index 0000000..20033ad --- /dev/null +++ b/13/src/com/wy/servlet/UserInfoServlet.java @@ -0,0 +1,126 @@ +package com.wy.servlet; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.wy.dao.OperationData; +import com.wy.form.UserInfo; + +public class UserInfoServlet extends HttpServlet { + private String info = null; // StringͶinfoöִвͬķ + + private OperationData data = null; // OperationData + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + info = request.getParameter("info"); + // ݲͬIJƣִвͬķ + if (info.equals("saveUser")) { + this.user_save(request, response); + } + if (info.equals("checkUser")) { + this.user_check(request, response); + } + if (info.equals("cannleUser")) { + this.user_cannle(request, response); + } + if (info.equals("userLand")) { + this.user_land(request, response); + } + } + + // ûעɹִи÷Զ¼Ĺ + private void user_land(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + data = new OperationData(); // dataʵ + String username = com.wy.tools.Encrypt.toChinese(request + .getParameter("username")); // ҳлȡû + UserInfo userInfo = data.user_query(username); // ûΪѯûϢһ + request.getSession().setAttribute("userInfo", userInfo); // ûϢsession + request.getRequestDispatcher("index.jsp").forward(request, response); // صҳ + } + + // ûɲִи÷ʵûעĹ + private void user_cannle(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + if (null != request.getSession().getAttribute("userInfo")) { + request.getSession().invalidate(); // ʵsessionٵIJ + } + request.getRequestDispatcher("index.jsp").forward(request, response); // ҳ + } + + // ʵû¼ + private void user_check(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + data = new OperationData(); + String username = com.wy.tools.Encrypt.toChinese(request + .getParameter("username")); // ȡҳû + String password = com.wy.tools.Encrypt.encode(request + .getParameter("password")); // ȡҳе + UserInfo userInfo = data.user_query(username); // ûΪвѯûϢһ + String code = request.getParameter("code"); // ȡҳеУ + String codeSession = (String) request.getSession().getAttribute("rand"); // ȡͻsessionеУ + if (code.equals(codeSession)) { + if (null != userInfo) { + if (userInfo.getPassword().equals(password)) { + request.getSession().setAttribute("userInfo", userInfo); + } + } + } + + request.getRequestDispatcher("index.jsp").forward(request, response); + } + + // ʵûעṦ + private void user_save(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html;charset=GBK"); + PrintWriter out = response.getWriter(); + data = new OperationData(); + UserInfo userInfo = new UserInfo(); + userInfo.setUsername(com.wy.tools.Encrypt.toChinese(request + .getParameter("username"))); // ȡͻûϢı + userInfo.setPassword(com.wy.tools.Encrypt.encode(request + .getParameter("password"))); // ȡͻϢı + userInfo.setRealname(com.wy.tools.Encrypt.toChinese(request + .getParameter("realname"))); // ȡͻʵı + userInfo.setEmail(request.getParameter("email")); // ȡͻemailַı + userInfo.setQuestion(com.wy.tools.Encrypt.toChinese(request + .getParameter("question"))); // ȡͻı + userInfo.setResult(com.wy.tools.Encrypt.toChinese(request + .getParameter("result"))); // ȡͻ˴𰸵ı + String information = ""; + String code = request.getParameter("code"); // ȡͻ֤ + String codeSession = (String) request.getSession().getAttribute("rand"); // ȡͻsessionеУ + if (code.equals(codeSession)) { // ж֤Ƿȷ + if (!data.user_save(userInfo)) { // жûǷɹ + information = "ûظעʧܣ"; + } + } else { + information = "У벻ȷעʧܣ"; + } + if (information.equals("")) { // informationжûĵ¼ + information = "ûעɹ"; + String username = com.wy.tools.Encrypt.toChinese(request + .getParameter("username")); + request.setAttribute("information", information); // ûעrequestΧ + request.setAttribute("username", username); // ûrequestΧ + request.getRequestDispatcher("user_save.jsp").forward(request, + response); + } + out.print(""); // ûעʧܣҳ潫תһҳ + } + + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + this.doGet(request, response); + + } + +} diff --git a/13/src/com/wy/tools/Encrypt.java b/13/src/com/wy/tools/Encrypt.java new file mode 100644 index 0000000..91f0118 --- /dev/null +++ b/13/src/com/wy/tools/Encrypt.java @@ -0,0 +1,53 @@ +package com.wy.tools; + +import java.security.*; +import java.text.DateFormat; +import java.util.Date; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class Encrypt { + + // ÷MD5ļܣΪֱ̬ͨӷ + public static String encode(String str) { + if (str == null) // strΪգֱͨreturnؼֽз + return null; + StringBuilder sb = new StringBuilder(); + try { + MessageDigest code = MessageDigest.getInstance("MD5"); + code.update(str.getBytes()); + byte[] bs = code.digest(); + for (int i = 0; i < bs.length; i++) { + int v = bs[i] & 0xFF; + if (v < 16) + sb.append(0); + sb.append(Integer.toHexString(v)); + } + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + return sb.toString().toUpperCase(); + } + + // ÷صϵͳʱ䣬ҲǾ̬ + public static String currentlyTime() { + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.FULL); + return dateFormat.format(date); + } + // ÷ݽת룬ҲǾ̬ + public static String toChinese(String strvalue) { + try { + if (strvalue == null) { + return ""; + } else { + strvalue = new String(strvalue.getBytes("ISO8859_1"), "GBK"); + return strvalue; + } + } catch (Exception e) { + return ""; + } + + } + +} diff --git a/13/src/com/wy/tools/ImageUtils.java b/13/src/com/wy/tools/ImageUtils.java new file mode 100644 index 0000000..04c013f --- /dev/null +++ b/13/src/com/wy/tools/ImageUtils.java @@ -0,0 +1,80 @@ +package com.wy.tools; + +import java.awt.AlphaComposite; +import java.awt.Color; +import java.awt.Font; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.image.BufferedImage; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; + +import javax.swing.ImageIcon; + +import com.sun.image.codec.jpeg.JPEGCodec; +import com.sun.image.codec.jpeg.JPEGEncodeParam; +import com.sun.image.codec.jpeg.JPEGImageEncoder; + +import java.io.FileOutputStream; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.image.BufferedImage; +import com.sun.image.codec.jpeg.JPEGCodec; +import com.sun.image.codec.jpeg.JPEGImageEncoder; + +public class ImageUtils { + + public static boolean createMark(String filePath, String printPath, + String markContent) { + ImageIcon imgIcon = new ImageIcon(filePath); + Image theImg = imgIcon.getImage(); + int width = theImg.getWidth(null); + int height = theImg.getHeight(null); + BufferedImage bimage = new BufferedImage(width, height, + BufferedImage.TYPE_INT_RGB); + Graphics2D g = bimage.createGraphics(); + g.setColor(Color.red); + g.drawImage(theImg, 0, 0, null); + Font font = new Font(markContent, Font.BOLD, 200); + g.setFont(font); + g.setComposite(AlphaComposite + .getInstance(AlphaComposite.SRC_OVER, 0.5f));// 10%͸ + g.rotate(0.3f); // ֵתǶ + g.drawString(markContent, width / 3, height / 3);// ˮӡλ + g.dispose(); + try { + FileOutputStream out = new FileOutputStream(printPath); + JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); + JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bimage); + param.setQuality(100f, true); + encoder.encode(bimage, param); + out.close(); + } catch (Exception e) { + e.printStackTrace(); + return false; + } + return true; + } + + public static void createSmallPhoto(String photoPath, String smallPath) { + File _file = new File(photoPath); // ļ + Image src; + try { + src = javax.imageio.ImageIO.read(_file); + int wideth = 110; // õԴͼ + int height = 80; // õԴͼ + BufferedImage tag = new BufferedImage(wideth, height, + BufferedImage.TYPE_INT_RGB); + tag.getGraphics().drawImage(src, 0, 0, wideth, height, null); // Сͼ + FileOutputStream out = new FileOutputStream(smallPath); // ļ + JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); + encoder.encode(tag); // JPEG + out.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/13/src/com/wy/tools/JDBConnection.java b/13/src/com/wy/tools/JDBConnection.java new file mode 100644 index 0000000..685b8ed --- /dev/null +++ b/13/src/com/wy/tools/JDBConnection.java @@ -0,0 +1,85 @@ +package com.wy.tools; + +import java.sql.*; + +public class JDBConnection { + private final String dbDriver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; // SQL + // Server2005ݿ + private final String url = "jdbc:sqlserver://127.0.0.1:1433;DatabaseName=db_photo"; // SQL + // Servlet2005utlַ + private final String userName = "sa"; // õ¼ݿû + private final String password = "111"; // õ¼û + private Connection con = null; // Ӷ󣬲ֵΪnull + // ͨ췽ݿ + public JDBConnection() { + try { + Class.forName(dbDriver).newInstance(); // ͨJavaƽмݿ + } catch (Exception ex) { + System.out.println("ݿʧ"); + } + } + // ݿ + public boolean creatConnection() { + try { + con = DriverManager.getConnection(url, userName, password); // ûurlַԼӲ + con.setAutoCommit(true); // ϵͳԶӲ + return true; + } catch (SQLException e) { + System.out.println(e.getMessage()); + System.out.println("creatConnectionError!"); + return false; + } + } + // ݿӡ޸ĺɾIJ + public boolean executeUpdate(String sql) { + if (con == null) { // conΪգcreatConnection()ʵݿӲ + creatConnection(); + } + try { + Statement stmt = con.createStatement(); + int iCount = stmt.executeUpdate(sql); // ִвSQL + System.out.println("ɹӰļ¼Ϊ" + String.valueOf(iCount)); // ڿ̨ʾִеĽ + return true; // SQLִгɹtrue + } catch (SQLException e) { + System.out.println(e.getMessage()); + return false; // SQLִʧܣfalse + } + } + // ݿIJѯ + public ResultSet executeQuery(String sql) { + ResultSet rs; // ResultSetrs + try { + if (con == null) { // conΪnullȡݿӲ + creatConnection(); + } + Statement stmt = con.createStatement( + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + try { + rs = stmt.executeQuery(sql); // ִвеSQL + } catch (SQLException e) { + System.out.println(e.getMessage()); + return null; + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + System.out.println("executeQueryError!"); + return null; + } + return rs; // ѯĽͨreturnؼֽз + } + // رݿIJ + public void closeConnection() { + if (con != null) { + try { + con.close(); + } catch (SQLException e) { + e.printStackTrace(); + System.out.println("Failed to close connection!"); + } finally { + con = null; + } + } + } + +} diff --git "a/13/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/13/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..ba37540 Binary files /dev/null and "b/13/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/14/.classpath b/14/.classpath new file mode 100644 index 0000000..b1b358b --- /dev/null +++ b/14/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/14/.mymetadata b/14/.mymetadata new file mode 100644 index 0000000..c0f58f8 --- /dev/null +++ b/14/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/14/.project b/14/.project new file mode 100644 index 0000000..9f6a6b6 --- /dev/null +++ b/14/.project @@ -0,0 +1,50 @@ + + + 14 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/14/.settings/.jsdtscope b/14/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/14/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/14/.settings/org.eclipse.jdt.core.prefs b/14/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..c0264a6 --- /dev/null +++ b/14/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Wed May 11 08:27:08 GMT+08:00 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.source=1.3 diff --git a/14/.settings/org.eclipse.wst.jsdt.ui.superType.container b/14/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/14/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/14/.settings/org.eclipse.wst.jsdt.ui.superType.name b/14/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/14/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/14/WebRoot/META-INF/MANIFEST.MF b/14/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/14/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/14/WebRoot/WEB-INF/classes/SetCharacterEncodingFilter.class b/14/WebRoot/WEB-INF/classes/SetCharacterEncodingFilter.class new file mode 100644 index 0000000..e9a6e10 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/SetCharacterEncodingFilter.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/BasetableFactoryProxy.class b/14/WebRoot/WEB-INF/classes/com/BasetableFactoryProxy.class new file mode 100644 index 0000000..52f906f Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/BasetableFactoryProxy.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/connDB.properties b/14/WebRoot/WEB-INF/classes/com/connDB.properties new file mode 100644 index 0000000..8a57c23 --- /dev/null +++ b/14/WebRoot/WEB-INF/classes/com/connDB.properties @@ -0,0 +1,5 @@ +#DB_CLASS_NAME( +DB_CLASS_NAME=com.mysql.jdbc.Driver + +#DB_URLҪݿĵַ +DB_URL=jdbc:mysql://127.0.0.1:3306/db_myEnterprise?user=root&password=111&useUnicode=true diff --git a/14/WebRoot/WEB-INF/classes/com/core/BasetableFactory.class b/14/WebRoot/WEB-INF/classes/com/core/BasetableFactory.class new file mode 100644 index 0000000..941f90c Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/core/BasetableFactory.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/core/Crazyadept.class b/14/WebRoot/WEB-INF/classes/com/core/Crazyadept.class new file mode 100644 index 0000000..4f1f8be Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/core/Crazyadept.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/core/Database.class b/14/WebRoot/WEB-INF/classes/com/core/Database.class new file mode 100644 index 0000000..167a438 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/core/Database.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/core/FileUtils.class b/14/WebRoot/WEB-INF/classes/com/core/FileUtils.class new file mode 100644 index 0000000..31c5989 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/core/FileUtils.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/core/FinalConstants.class b/14/WebRoot/WEB-INF/classes/com/core/FinalConstants.class new file mode 100644 index 0000000..b5d2267 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/core/FinalConstants.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/core/HtmlUtils.class b/14/WebRoot/WEB-INF/classes/com/core/HtmlUtils.class new file mode 100644 index 0000000..56d9119 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/core/HtmlUtils.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/core/ParamUtils.class b/14/WebRoot/WEB-INF/classes/com/core/ParamUtils.class new file mode 100644 index 0000000..5fad489 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/core/ParamUtils.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/core/StringUtils.class b/14/WebRoot/WEB-INF/classes/com/core/StringUtils.class new file mode 100644 index 0000000..1f6859f Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/core/StringUtils.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/DbBasetableFactory.class b/14/WebRoot/WEB-INF/classes/com/dao/DbBasetableFactory.class new file mode 100644 index 0000000..4a59419 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/DbBasetableFactory.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Dbaffiche.class b/14/WebRoot/WEB-INF/classes/com/dao/Dbaffiche.class new file mode 100644 index 0000000..d98cf41 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Dbaffiche.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Dbguestboard.class b/14/WebRoot/WEB-INF/classes/com/dao/Dbguestboard.class new file mode 100644 index 0000000..ff358ae Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Dbguestboard.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Dbhead.class b/14/WebRoot/WEB-INF/classes/com/dao/Dbhead.class new file mode 100644 index 0000000..f6fca31 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Dbhead.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Dblink.class b/14/WebRoot/WEB-INF/classes/com/dao/Dblink.class new file mode 100644 index 0000000..5d13d65 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Dblink.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Dbmend.class b/14/WebRoot/WEB-INF/classes/com/dao/Dbmend.class new file mode 100644 index 0000000..20452a7 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Dbmend.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Dbnew.class b/14/WebRoot/WEB-INF/classes/com/dao/Dbnew.class new file mode 100644 index 0000000..371af96 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Dbnew.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Dbquestion.class b/14/WebRoot/WEB-INF/classes/com/dao/Dbquestion.class new file mode 100644 index 0000000..a9a38be Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Dbquestion.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Dbresolvent.class b/14/WebRoot/WEB-INF/classes/com/dao/Dbresolvent.class new file mode 100644 index 0000000..6bb0d56 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Dbresolvent.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Dbsoft.class b/14/WebRoot/WEB-INF/classes/com/dao/Dbsoft.class new file mode 100644 index 0000000..b901536 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Dbsoft.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Dbssort.class b/14/WebRoot/WEB-INF/classes/com/dao/Dbssort.class new file mode 100644 index 0000000..1fc58ee Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Dbssort.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Dbuser.class b/14/WebRoot/WEB-INF/classes/com/dao/Dbuser.class new file mode 100644 index 0000000..ca7c6f7 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Dbuser.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/dao/Line.class b/14/WebRoot/WEB-INF/classes/com/dao/Line.class new file mode 100644 index 0000000..13e006a Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/dao/Line.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/Affiche.class b/14/WebRoot/WEB-INF/classes/com/model/Affiche.class new file mode 100644 index 0000000..75f9956 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/Affiche.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/Fsort.class b/14/WebRoot/WEB-INF/classes/com/model/Fsort.class new file mode 100644 index 0000000..427f4b7 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/Fsort.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/Guestboard.class b/14/WebRoot/WEB-INF/classes/com/model/Guestboard.class new file mode 100644 index 0000000..f0e03d3 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/Guestboard.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/Head.class b/14/WebRoot/WEB-INF/classes/com/model/Head.class new file mode 100644 index 0000000..123fd04 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/Head.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/Link.class b/14/WebRoot/WEB-INF/classes/com/model/Link.class new file mode 100644 index 0000000..69626bc Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/Link.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/Mend.class b/14/WebRoot/WEB-INF/classes/com/model/Mend.class new file mode 100644 index 0000000..7933c93 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/Mend.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/New.class b/14/WebRoot/WEB-INF/classes/com/model/New.class new file mode 100644 index 0000000..25561b2 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/New.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/Question.class b/14/WebRoot/WEB-INF/classes/com/model/Question.class new file mode 100644 index 0000000..f8692ae Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/Question.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/Resolvent.class b/14/WebRoot/WEB-INF/classes/com/model/Resolvent.class new file mode 100644 index 0000000..2857c81 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/Resolvent.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/Soft.class b/14/WebRoot/WEB-INF/classes/com/model/Soft.class new file mode 100644 index 0000000..53a1d5a Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/Soft.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/Ssort.class b/14/WebRoot/WEB-INF/classes/com/model/Ssort.class new file mode 100644 index 0000000..26cb509 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/Ssort.class differ diff --git a/14/WebRoot/WEB-INF/classes/com/model/User.class b/14/WebRoot/WEB-INF/classes/com/model/User.class new file mode 100644 index 0000000..4a50a36 Binary files /dev/null and b/14/WebRoot/WEB-INF/classes/com/model/User.class differ diff --git a/14/WebRoot/WEB-INF/lib/jspSmartUpload.jar b/14/WebRoot/WEB-INF/lib/jspSmartUpload.jar new file mode 100644 index 0000000..e297164 Binary files /dev/null and b/14/WebRoot/WEB-INF/lib/jspSmartUpload.jar differ diff --git a/14/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar b/14/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar new file mode 100644 index 0000000..0539039 Binary files /dev/null and b/14/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar differ diff --git a/14/WebRoot/WEB-INF/web.xml b/14/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..3609828 --- /dev/null +++ b/14/WebRoot/WEB-INF/web.xml @@ -0,0 +1,12 @@ + + + + + + index.jsp + + diff --git a/14/WebRoot/add_guestboard.jsp b/14/WebRoot/add_guestboard.jsp new file mode 100644 index 0000000..f52b8b5 --- /dev/null +++ b/14/WebRoot/add_guestboard.jsp @@ -0,0 +1,74 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.core.*" %> +<%@ page import="com.model.Guestboard" %> +<%@ page import="com.model.User" %> + + + + + + + + +<% +User user1=(User)session.getAttribute("user"); +String user="ο"; +if(user1!=null){ + user=user1.getName(); +} +boolean flag=false; +String submit=ParamUtils.getParameter(request,"submit"); +if(submit!=null&&!"".equals(submit)){ + session.removeAttribute("error"); + if("".equals(ParamUtils.getParameter(request,"title"))){ + flag=true; + session.setAttribute("error","ûӱ"); + response.sendRedirect("error.jsp"); + }else{ + BasetableFactory bf=BasetableFactory.getInstance(); + if(!bf.CreateGuestboard(request)){ + flag=true; + session.setAttribute("error","ʧ"); + response.sendRedirect("error.jsp"); + }else{ + out.print(""); + } + } +} +%> + + + + + + + + + + + + + + + + + + + + + +
    Ա
      
    +   + +
    + + diff --git a/14/WebRoot/admin/add_affiche.jsp b/14/WebRoot/admin/add_affiche.jsp new file mode 100644 index 0000000..aee9983 --- /dev/null +++ b/14/WebRoot/admin/add_affiche.jsp @@ -0,0 +1,45 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.core.*" %> +<% +response.setHeader("Cache-Control","no-cache"); +response.setHeader("Cache-Control","no-store"); +response.setDateHeader("Expires",0); +response.setHeader("Pragma","no-cache"); +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +add_affiche + + + + + + + + + + + + + + + + + + + + + +
    ӹ
    + "> + +   +
    + + + + +
    + + diff --git a/14/WebRoot/admin/add_guestboard.jsp b/14/WebRoot/admin/add_guestboard.jsp new file mode 100644 index 0000000..b9c877e --- /dev/null +++ b/14/WebRoot/admin/add_guestboard.jsp @@ -0,0 +1,59 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Guestboard" %> +<%@ page import="com.core.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +add_guestboard + + + + + + + + + <% +int gid=ParamUtils.getIntParameter(request,"gid"); +BasetableFactory bf=BasetableFactory.getInstance(); +Guestboard a=bf.SearchGuestboard("WHERE gid="+gid); +if(a.getGid()<=0){ +%> + + + + <%}else{%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%}%> +
    ظϢ
    ǰΪ
    Ա<%=a.getTitle()%>
    ʱ<%=a.getGtime()%>
      <%=a.getGuest()%>
        <%=a.getContent()%>
    ظ
    +   +
    + + diff --git a/14/WebRoot/admin/add_link.jsp b/14/WebRoot/admin/add_link.jsp new file mode 100644 index 0000000..433ca25 --- /dev/null +++ b/14/WebRoot/admin/add_link.jsp @@ -0,0 +1,40 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.core.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +add_affiche + + + + + + + + + + + + + + + + + + + + + +
    ӵַ
    + + +   +
    + + + + +
    + + diff --git a/14/WebRoot/admin/add_mend.jsp b/14/WebRoot/admin/add_mend.jsp new file mode 100644 index 0000000..6d6b918 --- /dev/null +++ b/14/WebRoot/admin/add_mend.jsp @@ -0,0 +1,84 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.*" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +add_mend + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ¹
    + + +
    Ƽָ
    С + (MB)
    ϴ
    ˵
    + +   +
    + + + + +
    + + diff --git a/14/WebRoot/admin/add_new.jsp b/14/WebRoot/admin/add_new.jsp new file mode 100644 index 0000000..406314e --- /dev/null +++ b/14/WebRoot/admin/add_new.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.core.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +add_new + + + + + + + + + + + + + + + + + + + + + + + + + +
    ű
    ժ
    + "> + +   +
    + + + + +
    + + diff --git a/14/WebRoot/admin/add_question.jsp b/14/WebRoot/admin/add_question.jsp new file mode 100644 index 0000000..b82bfe6 --- /dev/null +++ b/14/WebRoot/admin/add_question.jsp @@ -0,0 +1,38 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.core.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +add_question + + + + + + + + + + + + + + + + + + + + + +
    ӳ
    ӻش
    + +   +
    + + + + +
    + + diff --git a/14/WebRoot/admin/add_resolvent.jsp b/14/WebRoot/admin/add_resolvent.jsp new file mode 100644 index 0000000..2865293 --- /dev/null +++ b/14/WebRoot/admin/add_resolvent.jsp @@ -0,0 +1,92 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.model.*" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +add_affiche + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ӽ
    ƣ
    ʵӦã
    ϴͼ  +
    + +   +
    + + + + +
    + + diff --git a/14/WebRoot/admin/add_soft.jsp b/14/WebRoot/admin/add_soft.jsp new file mode 100644 index 0000000..6913e74 --- /dev/null +++ b/14/WebRoot/admin/add_soft.jsp @@ -0,0 +1,104 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.*" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +add_soft + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    ʽ汾 + + +
    ۸ + (Ԫ)
    л
    Ƽָ
    С + (MB)
    ϴ ע⣺ܴ50MB
    ˵
    + "> + +   +
    + + + + +
    + + diff --git a/14/WebRoot/admin/add_ssort.jsp b/14/WebRoot/admin/add_ssort.jsp new file mode 100644 index 0000000..88997e0 --- /dev/null +++ b/14/WebRoot/admin/add_ssort.jsp @@ -0,0 +1,38 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.core.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +add_ssort + + + + + + + + + + + + + + + + + + + + + +
    + +   +
    + + + + +
    + + diff --git a/14/WebRoot/admin/blank.jsp b/14/WebRoot/admin/blank.jsp new file mode 100644 index 0000000..0d4e8d6 --- /dev/null +++ b/14/WebRoot/admin/blank.jsp @@ -0,0 +1,19 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.core.*" %> +<% +response.setHeader("Cache-Control","no-cache"); +response.setHeader("Cache-Control","no-store"); +response.setDateHeader("Expires",0); +response.setHeader("Pragma","no-cache"); +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) { + out.println(""); + return ; +} +%> + + + + + + + diff --git a/14/WebRoot/admin/bottom.jsp b/14/WebRoot/admin/bottom.jsp new file mode 100644 index 0000000..192f61b --- /dev/null +++ b/14/WebRoot/admin/bottom.jsp @@ -0,0 +1,25 @@ +<%@ page contentType="text/html; charset=GBK" %> + + + + + + + + + + + + + + + + + + + + + + +
    +
     âƼͻߣ0431-8497898184978982 棺0431-84972266 
      CopyRight © 2008 www.mrbccd.com ʡտƼ޹˾ 
     վʹIE6.0ϰ汾 1024*768ΪʾЧ 
    diff --git a/14/WebRoot/admin/error.jsp b/14/WebRoot/admin/error.jsp new file mode 100644 index 0000000..d6e4ba9 --- /dev/null +++ b/14/WebRoot/admin/error.jsp @@ -0,0 +1,33 @@ +<%@ page contentType="text/html; charset=GBK" %> + + +û¼ + + + + + + + + + + + + + + + + + + + + + +

    error

    <% String error=session.getAttribute("error").toString(); + if(error!=null){ + out.print(error); + }else{ + out.print("δ֪󣡣"); + }%>
    ҳ  رմ
    + + diff --git a/14/WebRoot/admin/errorw.jsp b/14/WebRoot/admin/errorw.jsp new file mode 100644 index 0000000..47c4277 --- /dev/null +++ b/14/WebRoot/admin/errorw.jsp @@ -0,0 +1,27 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + +û¼ + + + + + + + + + + + + + + +

    error

    + <% String error=session.getAttribute("error").toString(); + if(error!=null){ + out.print(error); + }else{ + out.print("δ֪󣡣"); + }%>
    ҳ  رմ
    + + diff --git a/14/WebRoot/admin/exit.jsp b/14/WebRoot/admin/exit.jsp new file mode 100644 index 0000000..c2cdb0f --- /dev/null +++ b/14/WebRoot/admin/exit.jsp @@ -0,0 +1 @@ +<%@ page contentType="text/html; charset=GBK" %><%session.removeAttribute("user");session.invalidate();response.sendRedirect("../index.jsp");%> diff --git a/14/WebRoot/admin/index.jsp b/14/WebRoot/admin/index.jsp new file mode 100644 index 0000000..c9e9c61 --- /dev/null +++ b/14/WebRoot/admin/index.jsp @@ -0,0 +1,41 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.core.*" %> +<% +response.setHeader("Cache-Control","no-cache"); +response.setHeader("Cache-Control","no-store"); +response.setDateHeader("Expires",0); +response.setHeader("Pragma","no-cache"); +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) { + response.sendRedirect("../user_logon.jsp"); +} +%> + + +Ա̨ + + + + + + + + + + + + + + +
    + +
    + + +

    + +
    +
    + + diff --git a/14/WebRoot/admin/info_affiche.jsp b/14/WebRoot/admin/info_affiche.jsp new file mode 100644 index 0000000..b701db2 --- /dev/null +++ b/14/WebRoot/admin/info_affiche.jsp @@ -0,0 +1,42 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Affiche" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +info_affiche + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance();String aid=ParamUtils.getRequestString(request,"aid"); +Affiche a=bf.SearchAffiche("WHERE aid='"+aid+"'");if(a!=null&&a.getAid()>0){ %> + + + + + + + + + + + + + + + + + <%}%> +
    ϸϢ
     <%=a.getTitle()%>
       <%=a.getContent()%>
     <%=bf.SearchUser("WHERE uid='"+a.getUid()+"'").getName()%>
    ʱ <%=a.getAtime()%>
    + + + + +
    + + diff --git a/14/WebRoot/admin/info_guestboard.jsp b/14/WebRoot/admin/info_guestboard.jsp new file mode 100644 index 0000000..1864fc4 --- /dev/null +++ b/14/WebRoot/admin/info_guestboard.jsp @@ -0,0 +1,46 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Guestboard" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %><%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +add_guestboard + + + + + + + <%int gid=ParamUtils.getIntParameter(request,"gid");BasetableFactory bf=BasetableFactory.getInstance(); +Guestboard a=bf.SearchGuestboard("WHERE gid="+gid);if(a.getGid()<=0){%> + + + <%}else{%> + + + + + + + + + + + + + + + + + + + + + + + <%}%> +
    ظϢ
    ǰΪ
    Ա<%=a.getTitle()%>
    ʱ<%=a.getGtime()%>
      <%=a.getGuest()%>
        <%=a.getContent()%>
    ظ    <%=a.getRecontent()%>
    + + diff --git a/14/WebRoot/admin/info_mend.jsp b/14/WebRoot/admin/info_mend.jsp new file mode 100644 index 0000000..d3344e8 --- /dev/null +++ b/14/WebRoot/admin/info_mend.jsp @@ -0,0 +1,57 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Mend" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +info_new + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance();int nid=ParamUtils.getIntParameter(request,"mid"); +Mend n=bf.SearchMend("WHERE mid="+nid);if(n!=null&&n.getMid()>0){%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%}%> +
    ϸϢ
    <%=n.getName()%>
    <%=bf.SearchSsort("where sid="+n.getSid()).getName()%>
    <%=n.getState()==FinalConstants.STATE_MEND?"":""%>
    Ƽָ<% for(int i=0;i");}%>
    С<%=n.getFilesize()%>
    ϴʱ<%=n.getUptime()%>
    ش<%=n.getLoadnum()%>
        <%=n.getResume()%>
    + + + + +
    + + diff --git a/14/WebRoot/admin/info_new.jsp b/14/WebRoot/admin/info_new.jsp new file mode 100644 index 0000000..c9e5e0b --- /dev/null +++ b/14/WebRoot/admin/info_new.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.New" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> + + + +info_new + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance();String nid=ParamUtils.getRequestString(request,"nid"); + New n=bf.SearchNew("WHERE nid='"+nid+"'");if(n!=null&&n.getNid()>0){ %> + + + + + + + + + + + + + + + + + + + + <%}%> +
    ϸϢ
    ű <%=n.getTitle()%>
       <%=n.getContent()%>
    ժ <%=n.getFromto()%>
     <%=bf.SearchUser("WHERE uid='"+n.getUid()+"'").getName()%>
    ʱ <%=n.getNtime()%>
    + + + + +
    + + diff --git a/14/WebRoot/admin/info_resolvent.jsp b/14/WebRoot/admin/info_resolvent.jsp new file mode 100644 index 0000000..de919ea --- /dev/null +++ b/14/WebRoot/admin/info_resolvent.jsp @@ -0,0 +1,59 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.*" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +update_resolvent + + +<%int rid=ParamUtils.getIntParameter(request,"rid");BasetableFactory bf=BasetableFactory.getInstance(); +Resolvent r=bf.SearchResolvent("WHERE rid="+rid);if(r.getRid()<=0){ + session.setAttribute("error","ʧ"); response.sendRedirect("error.jsp");}else{ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    <%=r.getName()%>
    <%=bf.SearchSsort("WHERE sid="+r.getSid()).getName()%>
    ʵӦ<%=bf.SearchSoft("WHERE sfid="+r.getSfid()).getName()%>
    <%=r.getContent()%>
    <%String path=bf.SearchHead("WHERE iid='"+r.getIid()+"'").getPath();if(path==null){out.print("ͼƬ");}else{out.print("");}%>
    <%=((User)bf.SearchUser("WHERE uid='"+r.getUid()+"'")).getName()%>
    ʱ<%=r.getUptime()%>
     
    + + + + +
    <%}%> + + diff --git a/14/WebRoot/admin/info_soft.jsp b/14/WebRoot/admin/info_soft.jsp new file mode 100644 index 0000000..76003b2 --- /dev/null +++ b/14/WebRoot/admin/info_soft.jsp @@ -0,0 +1,82 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Soft" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +info_soft + + + +<%int uid=ParamUtils.getIntParameter(request,"sfid");BasetableFactory bf=BasetableFactory.getInstance(); +Soft u=bf.SearchSoft("WHERE sfid="+uid);session.removeAttribute("error");if(u.getSfid()<=0){ + session.setAttribute("error","ʧ");response.sendRedirect("error.jsp");}else{%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ϸϢ
    <%=u.getName()%><%String path=bf.SearchHead("WHERE iid='"+u.getIid()+"'").getPath(); + if(path==null||"".equals(path)){out.print("ͼƬ");}else{out.print("");}%>
    <%=u.getEdition()%>
    <%String name=bf.SearchSsort("where sid="+u.getSid()).getName();if(name==null){out.print("");}else{out.print(name);}%>
    ʽ汾<%=u.getRegular()==FinalConstants.STATE_REGULAR?"ʽ":"ð"%>
    ۸<%=u.getPrice()%>(Ԫ)
    л<%=u.getEnvironment()%>
    Ƽָ<% for(int i=0;i");}%>
    С<%=u.getFilesize()%>(MB)
    <%=u.getLoadnum()%>
    ϴ<%=bf.SearchUser("WHERE uid='"+u.getUid()+"'").getName()%>
    ϴʱ<%=u.getUptime()%>
        <%=u.getIntroduce()%>
    ˵    <%=u.getResume()%>
    + + + + +
    +<%}%> + + diff --git a/14/WebRoot/admin/info_user.jsp b/14/WebRoot/admin/info_user.jsp new file mode 100644 index 0000000..5c3da3f --- /dev/null +++ b/14/WebRoot/admin/info_user.jsp @@ -0,0 +1,95 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Head" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +info_user + + + <%String uid=ParamUtils.getRequestString(request,"uid");User u=BasetableFactory.getInstance().SearchUser("WHERE uid='"+uid+"'"); +session.removeAttribute("error");if(u.getUid()==null||"".equals(u.getUid())){ session.setAttribute("error","ѯʧ"); + response.sendRedirect("error.jsp");}else{%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ûעϸϢ
    ûID<%=ParamUtils.nullToString(u.getUid(),"")%>
    ʵ<%=ParamUtils.nullToString(u.getName(),"")%>
    ȡʾ<%=ParamUtils.nullToString(u.getRegqu(),"")%>
    ȡش<%=ParamUtils.nullToString(u.getReganswer(),"")%>
    Ա<%=u.getSex()==1?"":"Ů"%>
    <%=u.getAge()%>
    <%=ParamUtils.nullToString(u.getTel(),"")%>
    Email<%=ParamUtils.nullToString(u.getEmail(),"")%>
    QQ<%=ParamUtils.nullToString(u.getQq(),"")%>
    ˵ַ<%=ParamUtils.nullToString(u.getAddress(),"")%>
    ҳ<%=ParamUtils.nullToString(u.getHttp(),"")%>
    עʱ<%=u.getRegtime()%>
    Ȩ޼<%=u.getStatus()==FinalConstants.STATUS_ADMIN?"Ա":"ͨû"%>
    ״̬ʾ<%=u.getState()==FinalConstants.STATE_FREE?"":""%>
    ˼    <%=ParamUtils.nullToString(u.getResume(),"")%>
    ͷ<%if(u.getIid()==null||"".equals(u.getIid())){ out.print("δѡ"); +}else{ Head h=BasetableFactory.getInstance().SearchHead("WHERE iid='"+u.getIid()+"'"); + out.print("");}%>
     
    + + + + +
    <%}%> + + diff --git a/14/WebRoot/admin/left.jsp b/14/WebRoot/admin/left.jsp new file mode 100644 index 0000000..9955d8e --- /dev/null +++ b/14/WebRoot/admin/left.jsp @@ -0,0 +1,119 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.model.User" %> +<%@ page import="com.core.*" %> +<% +response.setHeader("Cache-Control","no-cache"); +response.setHeader("Cache-Control","no-store"); +response.setDateHeader("Expires",0); +response.setHeader("Pragma","no-cache"); +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) { + out.println(""); + return ; +} +%> + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        û
        û
        ûͷ
        
        Ź
        ӹ
        
        Դ
        
        
        Ա
        
    + + diff --git a/14/WebRoot/admin/main.jsp b/14/WebRoot/admin/main.jsp new file mode 100644 index 0000000..31a0cc2 --- /dev/null +++ b/14/WebRoot/admin/main.jsp @@ -0,0 +1,19 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.core.*" %> +<% +response.setHeader("Cache-Control","no-cache"); +response.setHeader("Cache-Control","no-store"); +response.setDateHeader("Expires",0); +response.setHeader("Pragma","no-cache"); +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) { + out.println(""); + return ; +} +%> + + + + + + + diff --git a/14/WebRoot/admin/manage_affiche.jsp b/14/WebRoot/admin/manage_affiche.jsp new file mode 100644 index 0000000..fcd8b6d --- /dev/null +++ b/14/WebRoot/admin/manage_affiche.jsp @@ -0,0 +1,49 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Affiche" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<% +response.setHeader("Cache-Control","no-cache"); +response.setHeader("Cache-Control","no-store"); +response.setDateHeader("Expires",0); +response.setHeader("Pragma","no-cache"); +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) { out.println(""); + return ;}%> + + +manage_affiche + + + + + + + + + + + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance();int submit_page=ParamUtils.getIntParameter(request,"page"); + Collection coll=bf.ListAffiche(submit_page,"");if(coll==null||coll.size()<=0){%> + + + <%}else{Iterator it=coll.iterator(); while(it.hasNext()){ + Affiche a=(Affiche)it.next();%> + + + + + + <%}%> + + + <%}%> +
     ӹ
    ʱ޸ɾ
    ǰ¼Ϊ
    <%=a.getTitle()%><%=a.getAtime()%><%=bf.SearchUser("WHERE uid='"+a.getUid()+"'").getName()%>   
    <%=HtmlUtils.table(bf.getRow("affiche"),submit_page,"manage_affiche.jsp")%>
    + + diff --git a/14/WebRoot/admin/manage_guestboard.jsp b/14/WebRoot/admin/manage_guestboard.jsp new file mode 100644 index 0000000..80ce0d5 --- /dev/null +++ b/14/WebRoot/admin/manage_guestboard.jsp @@ -0,0 +1,41 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Guestboard" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +manage_guestboard + + + + + + + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance();int submit_page=ParamUtils.getIntParameter(request,"page"); +Collection coll=bf.ListGuestboard(submit_page,"ORDER BY gid");if(coll==null||coll.size()<=0){%> + + + + <% }else{ Iterator it=coll.iterator(); while(it.hasNext()){Guestboard a=(Guestboard)it.next();%> + + + + + <%}}%> + + + +
    Բ
    Աظɾ
    ǰԱΪ
    <%=a.getTitle()%> <%if(a.getGflag()==0){%> + δظ <%}else{%> + ѻظ <%}%> ɾ
    <%=HtmlUtils.table(bf.getRow("guestboard ORDER BY gid"),submit_page,"manage_guestboard.jsp")%>
    + + diff --git a/14/WebRoot/admin/manage_head.jsp b/14/WebRoot/admin/manage_head.jsp new file mode 100644 index 0000000..5be10ff --- /dev/null +++ b/14/WebRoot/admin/manage_head.jsp @@ -0,0 +1,37 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.*" %> +<%@ page import="com.model.Head" %> +<%@ page import="com.core.*" %><%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +manage_head + + + + + + + + + + + <% BasetableFactory bf=BasetableFactory.getInstance(); int submit_page=ParamUtils.getIntParameter(request,"page"); + Collection coll=bf.ListHead(submit_page,"WHERE state="+FinalConstants.STATE_HEAD); if(coll==null||coll.size()<=0){%> + + + + <% + }else{ Iterator it=coll.iterator(); int i=0; + while(it.hasNext()){ Head head=(Head)it.next(); i++;%> + + <% if(i==4){ i=0; out.print(""); } } if(i!=0) for(int j=0;j<(4-i);j++){ out.print(""); } if(i!=4) out.println(""); + }%> + + + +
    ûͷ
     ϴͷ
    ûͷ

    +
    + ϴʱ:<%=head.getAtime()%>
    + ɾ
     
    <%=HtmlUtils.table(bf.getRow("ico WHERE state="+FinalConstants.STATE_HEAD),submit_page,"manage_head.jsp")%>
    + + diff --git a/14/WebRoot/admin/manage_link.jsp b/14/WebRoot/admin/manage_link.jsp new file mode 100644 index 0000000..100e080 --- /dev/null +++ b/14/WebRoot/admin/manage_link.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Link" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +manage_link + + + + + + + + + + + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance();int submit_page=ParamUtils.getIntParameter(request,"page"); +Collection coll=bf.ListLink(submit_page,"");if(coll==null||coll.size()<=0){%> + + + <% }else{Iterator it=coll.iterator(); while(it.hasNext()){ + Link a=(Link)it.next();%> + + + + + + <%}%> + + + <%}%> +
    ӹ
     
    ӵַʱ޸ɾ
    ǰӼ¼Ϊ
    <%=a.getName()%><%=a.getUrl()%><%=a.getLtime()%>   
    <%=HtmlUtils.table(bf.getRow("link"),submit_page,"manage_link.jsp")%>
    + + diff --git a/14/WebRoot/admin/manage_mend.jsp b/14/WebRoot/admin/manage_mend.jsp new file mode 100644 index 0000000..718a022 --- /dev/null +++ b/14/WebRoot/admin/manage_mend.jsp @@ -0,0 +1,52 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Mend" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + + + +manage_mend + + + + + + + + + + + + + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance();int submit_page=ParamUtils.getIntParameter(request,"page"); +Collection coll=bf.ListMend(submit_page,"");if(coll==null||coll.size()<=0){%> + + + + <% }else{ Iterator it=coll.iterator();while(it.hasNext()){ + Mend a=(Mend)it.next();%> + + + + + + + + + <%}%> + + + <% }%> +
     ӹ/
    ϴʱ޸ɾ
    ǰ/ؼ¼Ϊ
    <%String name=bf.SearchSsort("where sid="+a.getSid()).getName();if(name==null){out.print("");}else{out.print(name);}%><%=a.getName()%><%=a.getUptime()%><%=a.getLoadnum()%><%=a.getState()==FinalConstants.STATE_MEND?"":""%>  
    <%=HtmlUtils.table(bf.getRow("mend"),submit_page,"manage_mend.jsp")%>
    + + diff --git a/14/WebRoot/admin/manage_new.jsp b/14/WebRoot/admin/manage_new.jsp new file mode 100644 index 0000000..2834a5f --- /dev/null +++ b/14/WebRoot/admin/manage_new.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.New" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +manage_new + + + + + + + + + + + + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance();int submit_page=ParamUtils.getIntParameter(request,"page"); + Collection coll=bf.ListNew(submit_page,"");if(coll==null||coll.size()<=0){%> + + + <%}else{Iterator it=coll.iterator();while(it.hasNext()){ New n=(New)it.next();%> + + + + + + + <%}%> + + + <%}%> +
    Ź
     
    űʱժɾ
    ǰż¼Ϊ
    <%=n.getTitle()%><%=n.getNtime()%><%=bf.SearchUser("WHERE uid='"+n.getUid()+"'").getName()%> <%=ParamUtils.nullToString(n.getFromto(),"")%>
    <%=HtmlUtils.table(bf.getRow("new"),submit_page,"manage_new.jsp")%>
    + + diff --git a/14/WebRoot/admin/manage_question.jsp b/14/WebRoot/admin/manage_question.jsp new file mode 100644 index 0000000..dfb8b00 --- /dev/null +++ b/14/WebRoot/admin/manage_question.jsp @@ -0,0 +1,43 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Question" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +manage_question + + + + + + + + + + + <%StringUtils su=new StringUtils(); + BasetableFactory bf=BasetableFactory.getInstance(); +int submit_page=ParamUtils.getIntParameter(request,"page");Collection coll=bf.ListQuestion(submit_page,"ORDER BY qid");if(coll==null||coll.size()<=0){ +%> + + + + <% }else{Iterator it=coll.iterator();while(it.hasNext()){Question a=(Question)it.next(); +%> + + + + + + + <%}%> + + + + <%}%> +
     ӳ
    ǰΪ
    Q<%=a.getQuestion()%>
    A<%=su.escapeHTMLTags(a.getAnswer())%>
    <%=HtmlUtils.table(bf.getRow("question ORDER BY qid"),submit_page,"manage_question.jsp")%>
    + + diff --git a/14/WebRoot/admin/manage_resolvent.jsp b/14/WebRoot/admin/manage_resolvent.jsp new file mode 100644 index 0000000..05a51d6 --- /dev/null +++ b/14/WebRoot/admin/manage_resolvent.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Resolvent" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +manage_resolvent + + + + + + + + + + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance(); +int submit_page=ParamUtils.getIntParameter(request,"page"); + +Collection coll=bf.ListResolvent(submit_page,"");if(coll==null||coll.size()<=0){%> + + + <%}else{ Iterator it=coll.iterator(); + while(it.hasNext()){Resolvent a=(Resolvent)it.next();%> + + + + + <%}%> + + + <%}%> +
     ӽ
    ʱ޸ɾ
    ǰΪ
    <%=a.getName()%><%=a.getUptime()%>   
    <%=HtmlUtils.table(bf.getRow("resolvent"),submit_page,"manage_resolvent.jsp")%>
    + + diff --git a/14/WebRoot/admin/manage_soft.jsp b/14/WebRoot/admin/manage_soft.jsp new file mode 100644 index 0000000..de068b8 --- /dev/null +++ b/14/WebRoot/admin/manage_soft.jsp @@ -0,0 +1,54 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Soft" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +manage_soft + + + + + + + + + + + + + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance();int submit_page=ParamUtils.getIntParameter(request,"page"); +Collection coll=bf.ListSoft(submit_page,"ORDER BY sid,uptime");if(coll==null||coll.size()<=0){%> + + + <% }else{Iterator it=coll.iterator(); + while(it.hasNext()){Soft a=(Soft)it.next();%> + + + + + + + + + <% + } +%> + + + + <% + } +%> +
    Դ
     
    ۸ϴʱ޸ɾ
    ǰ¼Ϊ
    <%String name=bf.SearchSsort("where sid="+a.getSid()).getName();if(name==null){out.print("");}else{out.print(name);}%><%=a.getName()%><%=a.getPrice()%> <%=a.getUptime()%><%=a.getLoadnum()%>  
    <%=HtmlUtils.table(bf.getRow("soft"),submit_page,"manage_soft.jsp")%>
    + + diff --git a/14/WebRoot/admin/manage_ssort.jsp b/14/WebRoot/admin/manage_ssort.jsp new file mode 100644 index 0000000..c8090e5 --- /dev/null +++ b/14/WebRoot/admin/manage_ssort.jsp @@ -0,0 +1,41 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Ssort" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + +manage_ssort + + + + + + + + + + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance();int submit_page=ParamUtils.getIntParameter(request,"page"); +Collection coll=bf.ListSsort(submit_page,"");if(coll==null||coll.size()<=0){%> + + + <%}else{Iterator it=coll.iterator();while(it.hasNext()){Ssort a=(Ssort)it.next();%> + + + + + <%}%> + + + <%}%> +
     
    ޸ɾ
    ¼Ϊ
    <%=a.getName()%><%=a.getResume()%>  
    <%=HtmlUtils.table(bf.getRow("ssort"),submit_page,"manage_ssort.jsp")%>
    + + diff --git a/14/WebRoot/admin/manage_user.jsp b/14/WebRoot/admin/manage_user.jsp new file mode 100644 index 0000000..a2f829e --- /dev/null +++ b/14/WebRoot/admin/manage_user.jsp @@ -0,0 +1,163 @@ +<%@ page contentType="text/html; charset=gb2312"%> +<%@ page import="com.model.User"%> +<%@ page import="com.core.*"%> +<%@ page import="java.util.*"%> +<% + if (!Crazyadept.UserIsOK(session, FinalConstants.STATUS_ADMIN)) + return; +%> + + + view_user + + + + + + + + + + + + + + + <% + String uid = "", name = "", tel = "", qq = "", email = "", http = "", address = "", sql = "", age = ""; + int int_age = -1; + String value = ParamUtils.getRequestString(request, "select"); + if ("uid".equals(value)) { + uid = ParamUtils.getRequestString(request, "value"); + } else if ("name".equals(value)) { + name = ParamUtils.getRequestString(request, "value"); + } else if ("tel".equals(value)) { + tel = ParamUtils.getRequestString(request, "value"); + } else if ("qq".equals(value)) { + qq = ParamUtils.getRequestString(request, "value"); + } else if ("email".equals(value)) { + email = ParamUtils.getRequestString(request, "value"); + } else if ("http".equals(value)) { + http = ParamUtils.getRequestString(request, "value"); + } else if ("address".equals(value)) { + address = ParamUtils.getRequestString(request, "value"); + } else if ("age".equals(value)) { + int_age = ParamUtils.getIntParameter(request, "value", -1); + } + uid = StringUtils.SqlToLink(uid); + name = StringUtils.SqlToLink(name); + tel = StringUtils.SqlToLink(tel); + qq = StringUtils.SqlToLink(qq); + email = StringUtils.SqlToLink(email); + http = StringUtils.SqlToLink(http); + address = StringUtils.SqlToLink(address); + age = StringUtils.SqlToLink(int_age); + String sex = StringUtils.SqlToLink(ParamUtils.getIntParameter( + request, "sex", -1)); + String status = StringUtils.SqlToLink(ParamUtils.getIntParameter( + request, "status", -1)); + String state = StringUtils.SqlToLink(ParamUtils.getIntParameter( + request, "state", -1)); + String submit = ParamUtils.getRequestString(request, "submit"); + if (submit == null || "".equals(submit)) { + try { + sql = session.getAttribute("sqlsearch").toString(); + } catch (Exception e) { + } + } else { + sql = " WHERE uid " + uid + " AND name " + name + " AND tel " + + tel + " AND qq " + qq + " AND email " + email + + " AND http " + http + " AND address " + address + + " AND age " + age + " AND sex " + sex + + " AND status " + status + " AND state " + state; + session.setAttribute("sqlsearch", sql); + } + BasetableFactory bf = BasetableFactory.getInstance(); + int submit_page = ParamUtils.getIntParameter(request, "page"); + Collection coll = bf.ListUser(submit_page, sql); + if (coll == null || coll.size() <= 0) { + %> + + + + <% + } else { + Iterator it = coll.iterator(); + while (it.hasNext()) { + User user = (User) it.next(); + %> + + + + + + + + + + + <% + } + %> + + + + + <% + } + %> +
    + û +
    + ûID + + עʱ + + ûȨ + + û״̬ +
    + ǰû¼Ϊ +
    + <%=user.getUid()%> + <%=user.getRegtime()%>
    + > + Ա + <% + if (!"mr".equals(user.getUid())) { + %> + > + ͨû + <% + } + %> + +
    + > + + <% + if (!"mr".equals(user.getUid())) { + %> + > + + <% + } + %> + +
    <%=HtmlUtils.table(bf.getRow("user" + sql), submit_page, + "manage_user.jsp")%>
    + + diff --git a/14/WebRoot/admin/modify_affiche.jsp b/14/WebRoot/admin/modify_affiche.jsp new file mode 100644 index 0000000..5d0eedc --- /dev/null +++ b/14/WebRoot/admin/modify_affiche.jsp @@ -0,0 +1,21 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Affiche" %> +<%@ page import="com.core.*" %> + +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error"); +String action =request.getParameter("action").toString(); +int aid=ParamUtils.getIntParameter(request,"aid"); +BasetableFactory bf=BasetableFactory.getInstance(); +if(action==null||"".equals(action)){ + return;}else if("add".equals(action)&&bf.CreateAffiche(request)){ + response.sendRedirect("manage_affiche.jsp"); +}else if("del".equals(action)&&bf.DeleteAffiche("WHERE aid="+aid)){ + response.sendRedirect("manage_affiche.jsp");}else if("modify".equals(action)){ + Affiche a=bf.SearchAffiche("WHERE aid="+aid); a.setTitle(ParamUtils.getRequestString(request,"title")); + a.setContent(ParamUtils.getRequestString(request,"content")); + response.sendRedirect("manage_affiche.jsp"); +}else{ session.setAttribute("error","ڹϢвʧ"); + response.sendRedirect("error.jsp"); +} +%> diff --git a/14/WebRoot/admin/modify_guestboard.jsp b/14/WebRoot/admin/modify_guestboard.jsp new file mode 100644 index 0000000..6047613 --- /dev/null +++ b/14/WebRoot/admin/modify_guestboard.jsp @@ -0,0 +1,18 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Guestboard" %> +<%@ page import="com.core.*" %> + +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error"); +String action =request.getParameter("action").toString(); +int lid=ParamUtils.getIntParameter(request,"gid"); +BasetableFactory bf=BasetableFactory.getInstance(); +if(action==null||"".equals(action)){ return; +}else if("del".equals(action)&&bf.DeleteGuestboard("WHERE gid="+lid)){ + response.sendRedirect("manage_guestboard.jsp"); +}else if("add".equals(action)){ Guestboard b=bf.SearchGuestboard("WHERE gid="+lid); + b.setRecontent(ParamUtils.getRequestString(request,"recontent")); + response.sendRedirect("manage_guestboard.jsp"); +}else{ session.setAttribute("error","Բвʧ"); response.sendRedirect("error.jsp");} +%> diff --git a/14/WebRoot/admin/modify_head.jsp b/14/WebRoot/admin/modify_head.jsp new file mode 100644 index 0000000..1915e79 --- /dev/null +++ b/14/WebRoot/admin/modify_head.jsp @@ -0,0 +1,16 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Head" %> +<%@ page import="com.core.*" %> +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error"); +String action =request.getParameter("action").toString(); +String lid=ParamUtils.getRequestString(request,"iid"); +BasetableFactory bf=BasetableFactory.getInstance(); +if(action==null||"".equals(action)){ + return;}else if("del".equals(action)&&bf.DeleteHead(request,"WHERE iid='"+lid+"'")){ + response.sendRedirect("manage_head.jsp");}else{ + session.setAttribute("error","ɾͷвʧ"); + response.sendRedirect("error.jsp"); +} +%> diff --git a/14/WebRoot/admin/modify_link.jsp b/14/WebRoot/admin/modify_link.jsp new file mode 100644 index 0000000..35a5636 --- /dev/null +++ b/14/WebRoot/admin/modify_link.jsp @@ -0,0 +1,20 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Link" %> +<%@ page import="com.core.*" %> +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error"); +String action =request.getParameter("action").toString(); +int lid=ParamUtils.getIntParameter(request,"lid"); +BasetableFactory bf=BasetableFactory.getInstance(); +if(action==null||"".equals(action)){ + return;}else if("add".equals(action)&&bf.CreateLink(request)){ + response.sendRedirect("manage_link.jsp");}else if("del".equals(action)&&bf.DeleteLink("WHERE lid="+lid)){ + response.sendRedirect("manage_link.jsp");}else if("modify".equals(action)){ + Link l=bf.SearchLink("WHERE lid="+lid); + l.setName(ParamUtils.getRequestString(request,"name")); + l.setUrl(ParamUtils.getRequestString(request,"url")); response.sendRedirect("manage_link.jsp");}else{ + session.setAttribute("error","вʧ"); + response.sendRedirect("error.jsp"); +} +%> diff --git a/14/WebRoot/admin/modify_mend.jsp b/14/WebRoot/admin/modify_mend.jsp new file mode 100644 index 0000000..fc34e1e --- /dev/null +++ b/14/WebRoot/admin/modify_mend.jsp @@ -0,0 +1,27 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Mend" %> +<%@ page import="com.core.*" %> + +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error"); +String action =request.getParameter("action").toString(); +int lid=ParamUtils.getIntParameter(request,"mid"); +BasetableFactory bf=BasetableFactory.getInstance(); +if(action==null||"".equals(action)){ + return; +}else if("del".equals(action)&&bf.DeleteMend(request,"WHERE mid="+lid)){ + response.sendRedirect("manage_mend.jsp"); +}else if("modify".equals(action)){ + Mend l=bf.SearchMend("WHERE mid="+lid); + l.setName(ParamUtils.getRequestString(request,"name")); + l.setResume(ParamUtils.getRequestString(request,"resume")); + l.setSid(ParamUtils.getIntParameter(request,"sid")); + l.setState(ParamUtils.getIntParameter(request,"state")); + l.setCommend(ParamUtils.getIntParameter(request,"commend")); + l.setFilesize(ParamUtils.getIntParameter(request,"filesize")); + response.sendRedirect("manage_mend.jsp"); +}else{ session.setAttribute("error","ڹвʧ"); + response.sendRedirect("error.jsp"); +} +%> diff --git a/14/WebRoot/admin/modify_new.jsp b/14/WebRoot/admin/modify_new.jsp new file mode 100644 index 0000000..222841c --- /dev/null +++ b/14/WebRoot/admin/modify_new.jsp @@ -0,0 +1,17 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.New" %> +<%@ page import="com.core.*" %> +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error"); +String action =request.getParameter("action").toString(); +int nid=ParamUtils.getIntParameter(request,"nid"); +BasetableFactory bf=BasetableFactory.getInstance(); +if(action==null||"".equals(action)){ return;}else if("add".equals(action)&&bf.CreateNew(request)){ + response.sendRedirect("manage_new.jsp"); +}else if("del".equals(action)&&bf.DeleteNew("WHERE nid="+nid)){ + response.sendRedirect("manage_new.jsp"); +}else{ session.setAttribute("error","ڹϢвʧ"); + response.sendRedirect("error.jsp"); +} +%> diff --git a/14/WebRoot/admin/modify_question.jsp b/14/WebRoot/admin/modify_question.jsp new file mode 100644 index 0000000..0fe3c74 --- /dev/null +++ b/14/WebRoot/admin/modify_question.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Question"%> +<%@ page import="com.core.*" %> + +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error");String action =request.getParameter("action").toString(); +int lid=ParamUtils.getIntParameter(request,"qid"); +BasetableFactory bf=BasetableFactory.getInstance(); +if(action==null||"".equals(action)){ return; +}else if("add".equals(action)&&bf.CreateQuestion(request)){ response.sendRedirect("manage_question.jsp"); +}else if("del".equals(action)&&bf.DeleteQuestion("WHERE qid="+lid)){ + response.sendRedirect("manage_question.jsp"); +}else { session.setAttribute("error","ڳвʧ"); response.sendRedirect("error.jsp");} +%> diff --git a/14/WebRoot/admin/modify_resolvent.jsp b/14/WebRoot/admin/modify_resolvent.jsp new file mode 100644 index 0000000..e807054 --- /dev/null +++ b/14/WebRoot/admin/modify_resolvent.jsp @@ -0,0 +1,23 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Resolvent" %> +<%@ page import="com.core.*" %> +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error"); +String action =request.getParameter("haction").toString(); +int sfid=ParamUtils.getIntParameter(request,"rid"); +BasetableFactory bf=BasetableFactory.getInstance();if(action==null||"".equals(action)){ + return;}else if("del".equals(action)){ + bf.DeleteHead(request,"WHERE iid='"+bf.SearchResolvent("WHERE rid="+sfid).getIid()+"'"); + if(bf.DeleteResolvent("WHERE rid="+sfid)){ + response.sendRedirect("manage_resolvent.jsp"); }else{ + session.setAttribute("error","ɾʧ"); + response.sendRedirect("error.jsp"); }}else if("modify".equals(action)){ + Resolvent s=bf.SearchResolvent("WHERE rid="+sfid); + s.setName(ParamUtils.getRequestString(request,"name")); + s.setSid(ParamUtils.getIntParameter(request,"sid")); + s.setSfid(ParamUtils.getIntParameter(request,"sfid")); + s.setContent(ParamUtils.getRequestString(request,"content")); + response.sendRedirect("manage_resolvent.jsp");}else{ session.setAttribute("error","ԽϸϢ޸ʧ"); + response.sendRedirect("error.jsp");} +%> diff --git a/14/WebRoot/admin/modify_soft.jsp b/14/WebRoot/admin/modify_soft.jsp new file mode 100644 index 0000000..d5b1f86 --- /dev/null +++ b/14/WebRoot/admin/modify_soft.jsp @@ -0,0 +1,37 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Soft" %> +<%@ page import="com.core.*" %> +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error"); +String action =request.getParameter("action").toString(); +int sfid=ParamUtils.getIntParameter(request,"sfid"); +BasetableFactory bf=BasetableFactory.getInstance(); +if(action==null||"".equals(action)){ + return; +}else if("del".equals(action)){ + bf.DeleteHead(request,"WHERE iid='"+bf.SearchSoft("WHERE sfid="+sfid).getIid()+"'"); + if(bf.DeleteSoft(request,"WHERE sfid="+sfid)){ + response.sendRedirect("manage_soft.jsp"); + }else{ + session.setAttribute("error","ɾϢʧ"); + response.sendRedirect("error.jsp"); + } +}else if("modify".equals(action)){ + Soft s=bf.SearchSoft("WHERE sfid="+sfid); + s.setName(ParamUtils.getRequestString(request,"name")); + s.setEdition(ParamUtils.getRequestString(request, "edition")); + s.setPrice(new Float(ParamUtils.getRequestString(request,"price")).floatValue()); + s.setSid(ParamUtils.getIntParameter(request,"sid")); + s.setEnvironment(ParamUtils.getRequestString(request,"environment")); + s.setFilesize(ParamUtils.getIntParameter(request,"filesize")); + s.setCommend(ParamUtils.getIntParameter(request,"commend")); + s.setRegular(ParamUtils.getIntParameter(request,"regular")); + s.setIntroduce(ParamUtils.getRequestString(request,"introduce")); + s.setResume(ParamUtils.getRequestString(request,"resume")); + response.sendRedirect("manage_soft.jsp"); +}else{ + session.setAttribute("error","ϸϢ޸ʧ"); + response.sendRedirect("error.jsp"); +} +%> diff --git a/14/WebRoot/admin/modify_ssort.jsp b/14/WebRoot/admin/modify_ssort.jsp new file mode 100644 index 0000000..f98e3b8 --- /dev/null +++ b/14/WebRoot/admin/modify_ssort.jsp @@ -0,0 +1,36 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Ssort" %> +<%@ page import="com.core.*" %> + +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error"); +String action =request.getParameter("action").toString(); +int sid=ParamUtils.getIntParameter(request,"sid"); +BasetableFactory bf=BasetableFactory.getInstance(); +if(action==null||"".equals(action)){return;} +else if("add".equals(action)&&bf.CreateSsort(request)){ + response.sendRedirect("manage_ssort.jsp");} +else if("del".equals(action)){ +if(bf.SearchMend("WHERE sid="+sid).getMid()!=0){ + session.setAttribute("error","ɾ𣬸ڹбʹ"); + response.sendRedirect("error.jsp"); } +else if(bf.SearchResolvent("WHERE sid="+sid).getRid()!=0){ + session.setAttribute("error","ɾ𣬸ڽбʹ"); + response.sendRedirect("error.jsp"); } +else if(bf.SearchSoft("WHERE sid="+sid).getSfid()!=0){ + session.setAttribute("error","ɾ𣬸Դбʹ"); + response.sendRedirect("error.jsp"); } +else if(bf.DeleteSsort("WHERE sid="+sid)){ + response.sendRedirect("manage_ssort.jsp"); } +else{ + session.setAttribute("error","ɾʧ"); + response.sendRedirect("error.jsp");}} +else if("modify".equals(action)){ + Ssort l=bf.SearchSsort("WHERE sid="+sid); + l.setName(ParamUtils.getRequestString(request,"name")); + l.setResume(ParamUtils.getRequestString(request,"resume")); + response.sendRedirect("manage_ssort.jsp"); +}else{ session.setAttribute("error","вʧ"); + response.sendRedirect("error.jsp");} +%> diff --git a/14/WebRoot/admin/modify_user.jsp b/14/WebRoot/admin/modify_user.jsp new file mode 100644 index 0000000..775104e --- /dev/null +++ b/14/WebRoot/admin/modify_user.jsp @@ -0,0 +1,22 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.core.*" %> +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +String uid=ParamUtils.getRequestString(request,"uid"); +int status=ParamUtils.getIntParameter(request,"status",-1); +int state=ParamUtils.getIntParameter(request,"state",-1); +User user=BasetableFactory.getInstance().SearchUser("where uid='"+uid+"'"); +session.removeAttribute("error"); +if(uid==null){ + return; +}else if(state!=-1){ + user.setState(state); + response.sendRedirect("manage_user.jsp"); +}else if(status!=-1){ + user.setStatus(status); + response.sendRedirect("manage_user.jsp"); + }else{ + return; +} +%> diff --git a/14/WebRoot/admin/search_user.jsp b/14/WebRoot/admin/search_user.jsp new file mode 100644 index 0000000..093cf04 --- /dev/null +++ b/14/WebRoot/admin/search_user.jsp @@ -0,0 +1,51 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +find_user + + +
    + + + + + + + + + + + + + + + +
    û
    +   + +      + + Ů +
    + Ա + + ͨû
    + + +
    +
    + + diff --git a/14/WebRoot/admin/top.jsp b/14/WebRoot/admin/top.jsp new file mode 100644 index 0000000..b604bb6 --- /dev/null +++ b/14/WebRoot/admin/top.jsp @@ -0,0 +1,40 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.model.User" %> +<%@ page import="com.core.*" %> +<% +response.setHeader("Cache-Control","no-cache"); +response.setHeader("Cache-Control","no-store"); +response.setDateHeader("Expires",0); +response.setHeader("Pragma","no-cache"); +User u=null;if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) { + out.println(""); return ;}else{ u=(User)session.getAttribute("user");}%> +<% +response.setHeader("Cache-Control","no-cache"); +response.setHeader("Cache-Control","no-store"); +response.setDateHeader("Expires",0); +response.setHeader("Pragma","no-cache"); +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +%> + + + + + + + +
    + + + + + + + + + + + + + + +
     ǰԱ[<%=u.getUid()%>]ҳȫ˳
     
    \ No newline at end of file diff --git a/14/WebRoot/admin/up_head.jsp b/14/WebRoot/admin/up_head.jsp new file mode 100644 index 0000000..0ad9bec --- /dev/null +++ b/14/WebRoot/admin/up_head.jsp @@ -0,0 +1,29 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.core.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +up_head + + + + + + + + + + + + + + + + + + +
    ϴûͷ
    ע⣺ֻϴ*.gif롰*.jpgͷ,ļܴ100KB
    +   +
    + + diff --git a/14/WebRoot/admin/up_modify_mend.jsp b/14/WebRoot/admin/up_modify_mend.jsp new file mode 100644 index 0000000..a390995 --- /dev/null +++ b/14/WebRoot/admin/up_modify_mend.jsp @@ -0,0 +1,36 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.io.File" %> +<%@ page import="com.jspsmart.upload.Request" %> +<%@ page import="com.model.Soft" %> +<%@ page import="com.core.*" %> +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error"); +int count=0; +up.initialize(pageContext); +try{up.upload();}catch(Exception e){} +Request uprequest=up.getRequest(); +String action =uprequest.getParameter("action").toString(); +if(action==null||"".equals(action)){ + return; +}else{ + File f=new File(application.getRealPath("/upload")+File.separatorChar+up.getFiles().getFile(0).getFileName()); + if(f.exists()){ + session.setAttribute("error","ļѾ"); + response.sendRedirect("errorw.jsp"); + }else{ + try { count = up.save("upload"); } catch (Exception e) {} + if(count==1){ + if(BasetableFactory.getInstance().CreateMend(uprequest,File.separatorChar+up.getFiles().getFile(0).getFileName())){ + response.sendRedirect("manage_mend.jsp"); + }else{ + session.setAttribute("error","Ϣ洢ʧ"); + response.sendRedirect("errorw.jsp"); + } + }else{ + session.setAttribute("error","ϴʧ"); + response.sendRedirect("errorw.jsp"); + } + } +} +%> diff --git a/14/WebRoot/admin/up_modify_resolvent.jsp b/14/WebRoot/admin/up_modify_resolvent.jsp new file mode 100644 index 0000000..e3c362f --- /dev/null +++ b/14/WebRoot/admin/up_modify_resolvent.jsp @@ -0,0 +1,25 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.jspsmart.upload.Request" %> +<%@ page import="com.model.Head" %> +<%@ page import="com.core.*" %> +<%@ page import="com.jspsmart.upload.*" %> +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error");int count=0;up.initialize(pageContext); +try{up.upload();}catch(Exception e){} + java.util.Random r=new java.util.Random(System.currentTimeMillis()+1); + long longr=r.nextLong(); long longd=System.currentTimeMillis()+longr; + String name=new Long(longr).toString(); name=name.replace('-','_'); + File f=up.getFiles().getFile(0); String path="images/resolvent/"+name+"."+f.getFileExt(); +Request uprequest=up.getRequest(); +BasetableFactory bf=BasetableFactory.getInstance(); +if(!f.isMissing()){ + try { f.saveAs(path);} catch (Exception e) {} + if(!bf.CreateHead(name,path,FinalConstants.STATE_RESOLVENT)){ + session.setAttribute("error","ӽͼƬʧ"); + response.sendRedirect("errorw.jsp"); + } + } + if(bf.CreateResolvent(uprequest,name)){ response.sendRedirect("manage_resolvent.jsp"); + }else{ session.setAttribute("error","ӽʧ"); response.sendRedirect("errorw.jsp"); + }%> diff --git a/14/WebRoot/admin/up_modify_soft.jsp b/14/WebRoot/admin/up_modify_soft.jsp new file mode 100644 index 0000000..c31dd17 --- /dev/null +++ b/14/WebRoot/admin/up_modify_soft.jsp @@ -0,0 +1,42 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.io.File" %> +<%@ page import="com.jspsmart.upload.Request" %> +<%@ page import="com.model.Soft" %> +<%@ page import="com.core.*" %> +<% +if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; +session.removeAttribute("error"); +int count=0; +up.initialize(pageContext); +try{up.upload();}catch(Exception e){} + +Request uprequest=up.getRequest(); +BasetableFactory bf=BasetableFactory.getInstance(); + +String action =uprequest.getParameter("action").toString(); +if(action==null||"".equals(action)){ + return; +}else{ + File f=new File(application.getRealPath("/upload")+File.separatorChar+up.getFiles().getFile(0).getFileName()); + if(f.exists()){ + session.setAttribute("error","ļѾ"); + response.sendRedirect("errorw.jsp"); + }else{ + try { count = up.save("upload"); } catch (Exception e) {} + if(count==1){ + String uploadFileName=new String(up.getFiles().getFile(0).getFileName().getBytes("GBK"),"ISO-8859-1"); + //String uploadFileName=up.getFiles().getFile(0).getFileName(); + System.out.println("ļ"+new String(uploadFileName.getBytes("ISO-8859-1"),"GBK")); + if(bf.CreateSoft(uprequest,File.separatorChar+uploadFileName)){ + response.sendRedirect("manage_soft.jsp"); + }else{ + session.setAttribute("error","Ϣ洢ʧ"); + response.sendRedirect("errorw.jsp"); + } + }else{ + session.setAttribute("error","ϴʧ"); + response.sendRedirect("errorw.jsp"); + } + } +} +%> diff --git a/14/WebRoot/admin/up_soft.jsp b/14/WebRoot/admin/up_soft.jsp new file mode 100644 index 0000000..8860d34 --- /dev/null +++ b/14/WebRoot/admin/up_soft.jsp @@ -0,0 +1,29 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.core.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +ϴ + + + + + + + + + + + + + + + + + + +
    ϴ
    ע⣺ֻϴ(*.gif)(*.jpg)ͼƬ,ͼƬܴ100KB
    +   +
    + + diff --git a/14/WebRoot/admin/update_affiche.jsp b/14/WebRoot/admin/update_affiche.jsp new file mode 100644 index 0000000..419264b --- /dev/null +++ b/14/WebRoot/admin/update_affiche.jsp @@ -0,0 +1,55 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Affiche" %> +<%@ page import="com.core.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +update_affiche + + + + + + + + + <% +BasetableFactory bf=BasetableFactory.getInstance(); +String aid=ParamUtils.getRequestString(request,"aid"); +Affiche a=bf.SearchAffiche("WHERE aid='"+aid+"'"); +if(a!=null&&a.getAid()>0){ + %> + + + + + + + + + + + + + + + + + + + + + +
    ϸϢ޸
     <%=bf.SearchUser("WHERE uid='"+a.getUid()+"'").getName()%>
    ʱ <%=a.getAtime()%>
    + + +   +
    +<%}%> + + + + +
    + + diff --git a/14/WebRoot/admin/update_link.jsp b/14/WebRoot/admin/update_link.jsp new file mode 100644 index 0000000..b19f4dd --- /dev/null +++ b/14/WebRoot/admin/update_link.jsp @@ -0,0 +1,51 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Link" %> +<%@ page import="com.core.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +update_link + + + + + + + + + <% +BasetableFactory bf=BasetableFactory.getInstance(); +String aid=ParamUtils.getRequestString(request,"lid"); +Link a=bf.SearchLink("WHERE lid='"+aid+"'"); +if(a!=null&&a.getLid()>0){ + %> + + + + + + + + + + + + + + + + + +
    Ϣ޸
    ַ
    ʱ <%=a.getLtime()%>
    + + +   +
    +<%}%> + + + + +
    + + diff --git a/14/WebRoot/admin/update_mend.jsp b/14/WebRoot/admin/update_mend.jsp new file mode 100644 index 0000000..bba7217 --- /dev/null +++ b/14/WebRoot/admin/update_mend.jsp @@ -0,0 +1,92 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Mend" %> +<%@ page import="com.model.Ssort" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +update_soft + + + + +<% +int uid=ParamUtils.getIntParameter(request,"mid"); +BasetableFactory bf=BasetableFactory.getInstance(); +Mend u=bf.SearchMend("WHERE mid="+uid); +session.removeAttribute("error"); +if(u==null||u.getMid()==0){ + session.setAttribute("error","ʧ"); + response.sendRedirect("error.jsp"); +}else{ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ޸Ĺ
    > + + > +
    Ƽָ
    С + (MB)
    ˵
    + + +   +
    + + + + +
    +<%}%> + + diff --git a/14/WebRoot/admin/update_resolvent.jsp b/14/WebRoot/admin/update_resolvent.jsp new file mode 100644 index 0000000..96c5108 --- /dev/null +++ b/14/WebRoot/admin/update_resolvent.jsp @@ -0,0 +1,112 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.*" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +update_resolvent + + +<% +int rid=ParamUtils.getIntParameter(request,"rid"); +BasetableFactory bf=BasetableFactory.getInstance(); +Resolvent r=bf.SearchResolvent("WHERE rid="+rid); +if(r.getRid()<=0){ + session.setAttribute("error","ʧ"); + response.sendRedirect("errorw.jsp"); +}else{ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ޸Ľ
    ʵӦ
    <%String path=bf.SearchHead("WHERE iid='"+r.getIid()+"'").getPath();if(path==null){out.print("ͼƬ");}else{out.print("");}%>
    <%=((User)bf.SearchUser("WHERE uid='"+r.getUid()+"'")).getName()%>
    ʱ<%=r.getUptime()%>
    + +   +
    + + + + +
    +<%}%> + + diff --git a/14/WebRoot/admin/update_soft.jsp b/14/WebRoot/admin/update_soft.jsp new file mode 100644 index 0000000..38fde5d --- /dev/null +++ b/14/WebRoot/admin/update_soft.jsp @@ -0,0 +1,114 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Soft" %> +<%@ page import="com.model.Ssort" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +update_soft + + + + +<% +int uid=ParamUtils.getIntParameter(request,"sfid"); +BasetableFactory bf=BasetableFactory.getInstance(); +Soft u=bf.SearchSoft("WHERE sfid="+uid); +session.removeAttribute("error"); +if(u.getSfid()<=0){ + session.setAttribute("error","ʧ"); + response.sendRedirect("error.jsp");}else{ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Դ޸
    <%String path=bf.SearchHead("WHERE iid='"+u.getIid()+"'").getPath(); + if(path==null||"".equals(path)){out.print("ͼƬ");}else{out.print("");}%>
    ʽ汾> + + > +
    ۸ + (Ԫ)
    л
    Ƽָ
    С + (MB)
    <%=u.getLoadnum()%>
    ϴ<%=bf.SearchUser("WHERE uid='"+u.getUid()+"'").getName()%>
    ϴʱ<%=u.getUptime()%>
    ˵
    + + +   +
    + + + + +
    <%}%> + + diff --git a/14/WebRoot/admin/update_ssort.jsp b/14/WebRoot/admin/update_ssort.jsp new file mode 100644 index 0000000..c6b4546 --- /dev/null +++ b/14/WebRoot/admin/update_ssort.jsp @@ -0,0 +1,42 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Ssort" %> +<%@ page import="com.core.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + +update_ssort + + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance(); +String aid=ParamUtils.getRequestString(request,"sid");Ssort a=bf.SearchSsort("WHERE sid='"+aid+"'"); +if(a!=null&&a.getSid()>0){ %> + + + + + + + + + + + + + +
    Ϣ޸
    + + +   +
    <%}%> + + + + +
    + + diff --git a/14/WebRoot/admin/upimg_head.jsp b/14/WebRoot/admin/upimg_head.jsp new file mode 100644 index 0000000..114679c --- /dev/null +++ b/14/WebRoot/admin/upimg_head.jsp @@ -0,0 +1,43 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="javax.servlet.http.HttpServletRequest" %> +<%@ page import="com.model.Head" %> +<%@ page import="com.core.*" %> +<%@ page import="com.jspsmart.upload.*" %> + +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return; + session.removeAttribute("error"); +%> + + + + + + + +
    <% + int count=0; + up.initialize(pageContext); + up.setTotalMaxFileSize(100000); + up.setAllowedFilesList("gif,jpg"); + try{ + up.upload(); + }catch(Exception e){ + System.out.println("up.upload()ʱ"); + } + java.util.Random r=new java.util.Random(System.currentTimeMillis()+1); + long longr=r.nextLong(); + long longd=System.currentTimeMillis()+longr; + String name=new Long(longr).toString(); + name=name.replace('-','_'); + File f=up.getFiles().getFile(0); + System.out.println(f); + String path="images/ico/"+name+"."+f.getFileExt(); + BasetableFactory bf=BasetableFactory.getInstance(); + if(!f.isMissing()){ + try { f.saveAs(path);} catch (Exception e) {} + if(bf.CreateHead(name,path,FinalConstants.STATE_HEAD)){ + out.println("ϴɹ"); + }else{ + session.setAttribute("error","ϴʧ"); + response.sendRedirect("errorw.jsp");} + }%>
    ҳ  رմ
    diff --git a/14/WebRoot/admin/upimg_soft.jsp b/14/WebRoot/admin/upimg_soft.jsp new file mode 100644 index 0000000..06bb5fa --- /dev/null +++ b/14/WebRoot/admin/upimg_soft.jsp @@ -0,0 +1,37 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.core.*" %> +<%@ page import="com.jspsmart.upload.*" %> +<%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%> + + + + + + + + + + +
    <% session.removeAttribute("error"); + int count=0; up.initialize(pageContext); + up.setTotalMaxFileSize(1000000); + up.setAllowedFilesList("gif,jpg"); + try{up.upload();}catch(Exception e){} + BasetableFactory bf=BasetableFactory.getInstance(); + java.util.Random r=new java.util.Random(System.currentTimeMillis()+1); + long longr=r.nextLong(); + long longd=System.currentTimeMillis()+longr; + String name=new Long(longr).toString(); + name=name.replace('-','_'); + File f=up.getFiles().getFile(0); + String path="images/soft/"+name+"."+f.getFileExt(); + if(!f.isMissing()){ + try { f.saveAs(path); } catch (Exception e) {} + if(bf.CreateHead(name,path,FinalConstants.STATE_SOFT)){ + out.println("ϴɹ"); + }else{ + session.setAttribute("error","ϴʧ"); + response.sendRedirect("errorw.jsp");} + }%>
    + + diff --git a/14/WebRoot/affiche.jsp b/14/WebRoot/affiche.jsp new file mode 100644 index 0000000..df21abe --- /dev/null +++ b/14/WebRoot/affiche.jsp @@ -0,0 +1,38 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.Affiche" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> + + + +鿴ϸ + + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance(); +String aid=ParamUtils.getRequestString(request,"aid"); +Affiche a=bf.SearchAffiche("WHERE aid='"+aid+"'");if(a!=null&&a.getAid()>0){ %> + + + + + + + + + + + + + + <%}%> + + + +
    <%=a.getTitle()%>
        <%=a.getContent()%>
     <%=bf.SearchUser("WHERE uid='"+a.getUid()+"'").getName()%>
    ʱ <%=a.getAtime()%>
    + + diff --git a/14/WebRoot/bottom.jsp b/14/WebRoot/bottom.jsp new file mode 100644 index 0000000..57f33c0 --- /dev/null +++ b/14/WebRoot/bottom.jsp @@ -0,0 +1,25 @@ +<%@ page contentType="text/html; charset=gb2312"%> + + + + + + + + + + + + + + + + + + + + + + +
    +
     âƼͻߣ0431-8497898184978982 棺0431-84972266 
      CopyRight © 2008 www.mrbccd.com ʡտƼ޹˾ 
     վʹIE6.0ϰ汾 1024*768ΪʾЧ 
    diff --git a/14/WebRoot/css/admin.css b/14/WebRoot/css/admin.css new file mode 100644 index 0000000..d1bff87 --- /dev/null +++ b/14/WebRoot/css/admin.css @@ -0,0 +1,56 @@ + diff --git a/14/WebRoot/css/css.css b/14/WebRoot/css/css.css new file mode 100644 index 0000000..b13c406 --- /dev/null +++ b/14/WebRoot/css/css.css @@ -0,0 +1,248 @@ + + diff --git a/14/WebRoot/css/index.jsp b/14/WebRoot/css/index.jsp new file mode 100644 index 0000000..5e06940 --- /dev/null +++ b/14/WebRoot/css/index.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=GBK" %> + + + +index + + + +

    +<% +response.sendError(response.SC_METHOD_NOT_ALLOWED,"ֹԴ"); +%> +

    + + diff --git a/14/WebRoot/css/style.css b/14/WebRoot/css/style.css new file mode 100644 index 0000000..63269dd --- /dev/null +++ b/14/WebRoot/css/style.css @@ -0,0 +1,75 @@ + + \ No newline at end of file diff --git a/14/WebRoot/database/14.sql b/14/WebRoot/database/14.sql new file mode 100644 index 0000000..a26620e --- /dev/null +++ b/14/WebRoot/database/14.sql @@ -0,0 +1,338 @@ +-- MySQL Administrator dump 1.4 +-- +-- ------------------------------------------------------ +-- Server version 5.0.82-community-nt + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + + +-- +-- Create schema db_myenterprise +-- + +CREATE DATABASE IF NOT EXISTS db_myenterprise; +USE db_myenterprise; + +-- +-- Definition of table `affiche` +-- + +DROP TABLE IF EXISTS `affiche`; +CREATE TABLE `affiche` ( + `aid` int(11) NOT NULL auto_increment, + `uid` varchar(50) default NULL, + `title` varchar(200) default NULL, + `atime` datetime default NULL, + `content` text, + PRIMARY KEY (`aid`) +) ENGINE=MyISAM AUTO_INCREMENT=60 DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `affiche` +-- + +/*!40000 ALTER TABLE `affiche` DISABLE KEYS */; +INSERT INTO `affiche` (`aid`,`uid`,`title`,`atime`,`content`) VALUES + (59,'mr','¹«¸æ±êÌâ','2011-02-14 10:41:14','¹«¸æ±ê'); +/*!40000 ALTER TABLE `affiche` ENABLE KEYS */; + + +-- +-- Definition of table `guestboard` +-- + +DROP TABLE IF EXISTS `guestboard`; +CREATE TABLE `guestboard` ( + `gid` int(11) NOT NULL auto_increment, + `title` varchar(100) default NULL, + `guest` varchar(50) default NULL, + `gtime` datetime default NULL, + `content` varchar(250) default NULL, + `gflag` tinyint(1) default '0', + `rtime` datetime default NULL, + `recontent` text, + PRIMARY KEY (`gid`) +) ENGINE=MyISAM AUTO_INCREMENT=79 DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `guestboard` +-- + +/*!40000 ALTER TABLE `guestboard` DISABLE KEYS */; +INSERT INTO `guestboard` (`gid`,`title`,`guest`,`gtime`,`content`,`gflag`,`rtime`,`recontent`) VALUES + (76,'Ï£Íû¹ó¹«Ë¾Ô½À´Ô½ºÃ','ÓοÍ','2011-02-19 11:27:36','·Ç³£Ï²»¶¹ó¹«Ë¾µÄ²úÆ·¡£¡£',1,'2011-02-19 11:28:48','лл'), + (77,'ÄãºÃÎÒÏ빺ÂòÄãÃÇÉÌÆ·È¥ÄÄÂò£¿','ÓοÍ','2011-02-25 16:09:24','ÈçÌâ',0,NULL,NULL), + (78,'ÓÃÁËÄãÃǵIJúÆ·','ÓοÍ','2011-02-25 16:10:04','·Ç³£ºÃ',0,NULL,NULL); +/*!40000 ALTER TABLE `guestboard` ENABLE KEYS */; + + +-- +-- Definition of table `ico` +-- + +DROP TABLE IF EXISTS `ico`; +CREATE TABLE `ico` ( + `iid` varchar(50) NOT NULL default '', + `path` varchar(50) default NULL, + `atime` datetime default NULL, + `state` int(11) default '0', + PRIMARY KEY (`iid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `ico` +-- + +/*!40000 ALTER TABLE `ico` DISABLE KEYS */; +INSERT INTO `ico` (`iid`,`path`,`atime`,`state`) VALUES + ('01.gif','images/ico/01.gif','2011-02-18 13:20:22',0), + ('08.gif','images/ico/08.gif','2011-02-18 15:29:46',0), + ('_2676648875979061543','images/resolvent/_2676648875979061543.jpg','2011-02-18 11:28:40',2); +/*!40000 ALTER TABLE `ico` ENABLE KEYS */; + + +-- +-- Definition of table `link` +-- + +DROP TABLE IF EXISTS `link`; +CREATE TABLE `link` ( + `lid` int(11) NOT NULL auto_increment, + `name` varchar(50) default NULL, + `ltime` datetime default NULL, + `url` varchar(50) default NULL, + PRIMARY KEY (`lid`) +) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `link` +-- + +/*!40000 ALTER TABLE `link` DISABLE KEYS */; +INSERT INTO `link` (`lid`,`name`,`ltime`,`url`) VALUES + (31,'¼ªÁÖÊ¡Ã÷ÈտƼ¼ÓÐÏÞ¹«Ë¾','2011-02-14 12:50:10','http://www.mingrisoft.com'); +/*!40000 ALTER TABLE `link` ENABLE KEYS */; + + +-- +-- Definition of table `mend` +-- + +DROP TABLE IF EXISTS `mend`; +CREATE TABLE `mend` ( + `mid` int(11) NOT NULL auto_increment, + `sid` int(11) default NULL, + `name` varchar(50) default NULL, + `path` varchar(50) default NULL, + `state` int(11) default NULL, + `uptime` datetime default NULL, + `commend` int(11) default NULL, + `loadnum` int(11) default NULL, + `filesize` int(11) default NULL, + `resume` varchar(250) default NULL, + PRIMARY KEY (`mid`) +) ENGINE=MyISAM AUTO_INCREMENT=38 DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `mend` +-- + +/*!40000 ALTER TABLE `mend` DISABLE KEYS */; +INSERT INTO `mend` (`mid`,`sid`,`name`,`path`,`state`,`uptime`,`commend`,`loadnum`,`filesize`,`resume`) VALUES + (25,41,'JDK1.6','\\jdk1.6.txt',0,'2011-02-14 11:00:34',3,10,67,'ÎÞ'), + (26,41,'JDBCÇý¶¯°ü','\\JDBC.txt',1,'2011-02-14 11:16:59',3,4,1,'ÎÞ'), + (27,41,'JDBC_SQL','\\JDBC.sql.txt',1,'2011-02-14 11:18:35',3,3,1,'ÎÞ'), + (30,41,'mysqlÇý¶¯','\\mysql-connector-java-5.1.6-bin.jar',1,'2011-02-14 16:02:22',3,1,0,'Çý¶¯Àà'), + (31,42,'Vb','\\mysql-connector-java-5[1].1.6-bin.jar',1,'2011-02-17 14:25:43',3,0,1,'111'); +/*!40000 ALTER TABLE `mend` ENABLE KEYS */; + + +-- +-- Definition of table `new` +-- + +DROP TABLE IF EXISTS `new`; +CREATE TABLE `new` ( + `nid` int(11) NOT NULL auto_increment, + `uid` varchar(50) default NULL, + `title` varchar(200) default NULL, + `ntime` datetime default NULL, + `fromto` varchar(100) default NULL, + `content` text, + PRIMARY KEY (`nid`) +) ENGINE=MyISAM AUTO_INCREMENT=36 DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `new` +-- + +/*!40000 ALTER TABLE `new` DISABLE KEYS */; +INSERT INTO `new` (`nid`,`uid`,`title`,`ntime`,`fromto`,`content`) VALUES + (35,'mr','Ã÷ÈտƼ¼±à³Ì´Êµä¼´½«ÃæÊС£','2011-02-16 08:44:01','ÎÞ','Ã÷ÈտƼ¼±à³Ì´Êµä¼´½«ÃæÊС£'); +/*!40000 ALTER TABLE `new` ENABLE KEYS */; + + +-- +-- Definition of table `question` +-- + +DROP TABLE IF EXISTS `question`; +CREATE TABLE `question` ( + `qid` int(11) NOT NULL auto_increment, + `question` varchar(250) default NULL, + `answer` text, + PRIMARY KEY (`qid`) +) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `question` +-- + +/*!40000 ALTER TABLE `question` DISABLE KEYS */; +INSERT INTO `question` (`qid`,`question`,`answer`) VALUES + (20,'ÈçºÎ¹ºÂò±à³Ì´Êµä£¿','£¨1£©Óû§Ê×ÏÈÐèÒªÏêϸ²é¿´±à³Ì´ÊµäµÄÏà¹ØÐÅÏ¢£¬Ñ¡ÔñÊʺÏ×Ô¼ºµÄ±à³Ì´Êµä¼°°æ±¾\r\n£¨2£©Óû§Ñ¡ÔñÍê±à³Ì´Êµäºó£¬¿É½«¸Ã±à³Ì´Êµä·ÅÈ빺Îï³µÖУ¬Í¬Ê±Óû§¿ÉÒÔÐ޸ĹºÂò±à³Ì´ÊµäµÄÊýÁ¿»òÒƳý¹ºÎï³µÖеıà³Ì´Êµä\r\n£¨3£©Óû§È·ÈϹºÂòºó£¬ÐèÒªÏêϸÌîдÊÕ»õÈËÐÅÏ¢£¬ÒÔ±ãÓÚÎÒ¹«Ë¾¹¤×÷ÈËÔ±ÓëÄúÁªÏµ¼°ÓʼÄÉÌÆ·\r\n£¨4£©ÌîдÍêÊÕ»õÈËÐÅÏ¢ºó£¬Óû§ÐèҪѡÔñÖ§¸¶·½Ê½£¬²¢¼°Ê±Ö§¸¶,ÎÒ¹«Ë¾È·ÈÏÊÕ¿îºó£¬»áÁ¢¼´ÎªÄúÓʵݱà³Ì´Êµä'); +/*!40000 ALTER TABLE `question` ENABLE KEYS */; + + +-- +-- Definition of table `resolvent` +-- + +DROP TABLE IF EXISTS `resolvent`; +CREATE TABLE `resolvent` ( + `rid` int(11) NOT NULL auto_increment, + `sid` int(11) default NULL, + `uid` varchar(50) default NULL, + `sfid` int(11) default NULL, + `name` varchar(50) default NULL, + `uptime` datetime default NULL, + `iid` varchar(50) default NULL, + `content` text, + PRIMARY KEY (`rid`) +) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `resolvent` +-- + +/*!40000 ALTER TABLE `resolvent` DISABLE KEYS */; +INSERT INTO `resolvent` (`rid`,`sid`,`uid`,`sfid`,`name`,`uptime`,`iid`,`content`) VALUES + (29,41,'mr',64,'¹ØÓÚʹÓÃÆóÒµEQµÄ½â¾ö·½°¸','2011-02-18 11:28:40','_2676648875979061543','°²×°ÆóÒµEQ'); +/*!40000 ALTER TABLE `resolvent` ENABLE KEYS */; + + +-- +-- Definition of table `soft` +-- + +DROP TABLE IF EXISTS `soft`; +CREATE TABLE `soft` ( + `sfid` int(11) NOT NULL auto_increment, + `name` varchar(100) default NULL, + `edition` varchar(50) default NULL, + `price` float default NULL, + `uptime` datetime default NULL, + `uid` varchar(50) default NULL, + `iid` varchar(50) default NULL, + `sid` int(11) default NULL, + `environment` varchar(50) default NULL, + `filesize` int(11) default NULL, + `commend` int(11) default NULL, + `loadnum` int(11) default NULL, + `regular` tinyint(1) default NULL, + `introduce` text, + `path` varchar(50) default NULL, + `resume` varchar(200) default NULL, + PRIMARY KEY (`sfid`) +) ENGINE=MyISAM AUTO_INCREMENT=66 DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `soft` +-- + +/*!40000 ALTER TABLE `soft` DISABLE KEYS */; +INSERT INTO `soft` (`sfid`,`name`,`edition`,`price`,`uptime`,`uid`,`iid`,`sid`,`environment`,`filesize`,`commend`,`loadnum`,`regular`,`introduce`,`path`,`resume`) VALUES + (64,'ÆóÒµEQ','3.2',1200,'2011-02-14 09:03:59','mr','',41,'windows/linux',1,4,11,0,'·½±ãÔ±¹¤¼äµÄ¹µÍ¨£¡','\\eq.rar',''), + (65,'Ö»ÎÄ','44',444,'2011-02-14 14:15:01','mr','',42,'windows',11,3,12,0,'kk','\\DOS´°¿ÚϵÄÐÅÏ¢.txt',''); +/*!40000 ALTER TABLE `soft` ENABLE KEYS */; + + +-- +-- Definition of table `ssort` +-- + +DROP TABLE IF EXISTS `ssort`; +CREATE TABLE `ssort` ( + `sid` int(11) NOT NULL auto_increment, + `name` varchar(50) default NULL, + `resume` varchar(100) default NULL, + PRIMARY KEY (`sid`) +) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `ssort` +-- + +/*!40000 ALTER TABLE `ssort` DISABLE KEYS */; +INSERT INTO `ssort` (`sid`,`name`,`resume`) VALUES + (41,'Java','Óëƽ̨ÎÞ¹Ø'), + (42,'Visual Basic','·½±ã¿ì½Ý'); +/*!40000 ALTER TABLE `ssort` ENABLE KEYS */; + + +-- +-- Definition of table `user` +-- + +DROP TABLE IF EXISTS `user`; +CREATE TABLE `user` ( + `uid` varchar(50) NOT NULL default '', + `password` varchar(50) default NULL, + `name` varchar(50) default NULL, + `regqu` varchar(50) default NULL, + `reganswer` varchar(50) default NULL, + `iid` varchar(50) NOT NULL default '', + `sex` tinyint(1) default NULL, + `age` int(11) default NULL, + `tel` varchar(50) default NULL, + `email` varchar(50) default NULL, + `qq` varchar(50) default NULL, + `regtime` datetime default NULL, + `address` varchar(200) default NULL, + `http` varchar(50) default NULL, + `status` int(11) default NULL, + `state` int(11) default NULL, + `resume` varchar(250) default NULL, + PRIMARY KEY (`uid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `user` +-- + +/*!40000 ALTER TABLE `user` DISABLE KEYS */; +INSERT INTO `user` (`uid`,`password`,`name`,`regqu`,`reganswer`,`iid`,`sex`,`age`,`tel`,`email`,`qq`,`regtime`,`address`,`http`,`status`,`state`,`resume`) VALUES + ('mr','mrsoft','Ã÷ÈտƼ¼','mr','Ã÷ÈÕÈí¼þ','08.gif',1,10,'0431-84972266','mingrisoft@mingrisoft.com','','2011-02-16 15:54:07','³¤´ºÊÐ','http://www.mingribook.com',1,0,''), + ('wgh','111','wguohui','1','1','08.gif',0,28,'','wgh717@sohu.com','','2011-02-16 16:24:35','³¤´ºÊÐ','',0,0,''), + ('abc','123','ÐÕÃû','aa','a','',1,12,'','mingrisoft@mingrisoft.com','','2011-02-16 16:46:21','','',1,0,''), + ('zzzzz','zzz','°¡Ê¢´ó','zz','zz','',1,12,'','mingrisoft@mingrisoft.com ','','2011-02-19 16:31:24','','',0,0,''); +/*!40000 ALTER TABLE `user` ENABLE KEYS */; + + + + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/14/WebRoot/download.jsp b/14/WebRoot/download.jsp new file mode 100644 index 0000000..937a2e5 --- /dev/null +++ b/14/WebRoot/download.jsp @@ -0,0 +1,36 @@ +<%@ page contentType="text/html; charset=GBK" language="java" import="com.jspsmart.upload.*" import="com.core.*" import="com.model.*"%> +<% + int mid=ParamUtils.getIntParameter(request,"mid"); + int sfid=ParamUtils.getIntParameter(request,"sfid"); + BasetableFactory bf=BasetableFactory.getInstance(); + String name,path; + String filename=""; + if(sfid<=0&&mid>0){ + Mend m=bf.SearchMend("WHERE mid="+mid); + name=m.getName(); + filename=m.getPath().substring(1); + path="upload"+m.getPath(); + m.setLoadnum(m.getLoadnum()+1); + }else{ + Soft s=bf.SearchSoft("WHERE sfid="+sfid); + name=s.getName(); + filename=s.getPath().substring(1); + + path="upload"+s.getPath(); + s.setLoadnum(s.getLoadnum()+1); + } + java.io.File f=new java.io.File(application.getRealPath(path)); + if(!f.exists()){ + session.setAttribute("error","\u6587\u4EF6\u4E0D\u5B58\u5728"); + response.sendRedirect("error.jsp"); + }else{ + response.reset(); + out.clear(); + out=pageContext.pushBody(); + mySmartUpload.initialize(pageContext); + System.out.println(path+"]path "+name); + mySmartUpload.setContentDisposition(null); + System.out.println("FILENAME:"+filename); + filename=new String(filename.getBytes("GBK"), "ISO-8859-1"); + mySmartUpload.downloadFile(path,null,filename);//һΪļ·ڶΪͣ3ΪضԻʾʾļ + }%> \ No newline at end of file diff --git a/14/WebRoot/error.jsp b/14/WebRoot/error.jsp new file mode 100644 index 0000000..c904612 --- /dev/null +++ b/14/WebRoot/error.jsp @@ -0,0 +1,33 @@ +<%@ page contentType="text/html; charset=GBK" %> + + +û¼ + + + + + + + + + + + + + + + + + + + + +

    error

    + <% String error=session.getAttribute("error").toString(); + if(error!=null){ + out.print(error); + }else{ + out.print("δ֪󣡣"); + }%>
    ҳ  رմ
    + + diff --git a/14/WebRoot/errorw.jsp b/14/WebRoot/errorw.jsp new file mode 100644 index 0000000..7e39a7e --- /dev/null +++ b/14/WebRoot/errorw.jsp @@ -0,0 +1,27 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + +û¼ + + + + + + + + + + + + + + +

    error

    + <% String error=session.getAttribute("error").toString(); + if(error!=null){ + out.print(error); + }else{ + out.print("δ֪󣡣"); + }%>
    ҳ  رմ
    + + diff --git a/14/WebRoot/guestboard.jsp b/14/WebRoot/guestboard.jsp new file mode 100644 index 0000000..9a6e37c --- /dev/null +++ b/14/WebRoot/guestboard.jsp @@ -0,0 +1,67 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.*" %> +<%@ page import="com.model.Guestboard" %> + + + +տƼ + + + + + + + + + + + + + + + + + + +
      + + + + <%int gid=ParamUtils.getIntParameter(request,"gid"); +BasetableFactory bf=BasetableFactory.getInstance();Guestboard a=bf.SearchGuestboard("WHERE gid="+gid); +if(a.getGid()<=0){%> + + + <%}else{%> + + + + + + + + + + + + + + + + + + + + + + + + <%}%> + + + +
    Ϣ
    ǰΪ
    Ա<%=a.getTitle()%>
    ʱ<%=a.getGtime()%>
      <%=a.getGuest()%>
        <%=a.getContent()%>
    ظ    <%=a.getRecontent()%>
    ظʱ <%=a.getRtime()%>
     
    + + diff --git a/14/WebRoot/head.jsp b/14/WebRoot/head.jsp new file mode 100644 index 0000000..c9c20fa --- /dev/null +++ b/14/WebRoot/head.jsp @@ -0,0 +1,41 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.*" %> +<%@ page import="com.model.Head" %> + + +head + + + +
    + + + + + <% + BasetableFactory bf=BasetableFactory.getInstance(); + int submit_page=ParamUtils.getIntParameter(request,"page"); + Collection coll=bf.ListHead(submit_page," WHERE state="+FinalConstants.STATE_HEAD); + if(coll==null||coll.size()<=0){ +%> + + + + + <%}else{Iterator it=coll.iterator(); + int i=0;while(it.hasNext()){Head head=(Head)it.next(); i++;%> + + <%if(i==4){ i=0; out.print(""); }} + if(i!=0) for(int j=0;j<(4-i);j++){ out.print(""); } + if(i!=4) out.println("");}%> + + + +
    ѡͷ
    ûͷ

    + +

     
    <%=HtmlUtils.table(bf.getRow("ico WHERE state="+FinalConstants.STATE_HEAD),submit_page,"head.jsp")%>
    + + +
    + + + + + + + + + + + + +
       + + + + + + + +
    + + + + diff --git a/14/WebRoot/info_new.jsp b/14/WebRoot/info_new.jsp new file mode 100644 index 0000000..219e579 --- /dev/null +++ b/14/WebRoot/info_new.jsp @@ -0,0 +1,48 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.*" %> +<%@ page import="com.model.New" %> + + + +տƼ + + + + + + + + <%int nid=ParamUtils.getIntParameter(request,"nid"); +New n=BasetableFactory.getInstance().SearchNew("WHERE nid="+nid);%> + + + + + + + + + + + +
      + + + + + + + + + + + + + + + +
    <%=n.getTitle()%>
    <%=n.getContent()%>
    ժԡ<%=n.getFromto()%>
    ʱ  <%=n.getNtime()%>
     
    + + diff --git a/14/WebRoot/js/onclock.JS b/14/WebRoot/js/onclock.JS new file mode 100644 index 0000000..0f11ced --- /dev/null +++ b/14/WebRoot/js/onclock.JS @@ -0,0 +1,19 @@ +function clockon(bgclock){ + var now=new Date(); + var year=now.getYear(); + var month=now.getMonth(); + var date=now.getDate(); + var day=now.getDay(); + var week; + month=month+1; + if(month<10) month="0"+month; + if(date<10) date="0"+date; + var arr_week=new Array("","һ","ڶ","","","",""); + week=arr_week[day]; + var time=""; + time=year+""+month+""+date+" "+week; + if(document.all){ + bgclock.innerHTML="  "+time + } + var timer=setTimeout("clockon(bgclock)",200); +} diff --git a/14/WebRoot/js/validate.js b/14/WebRoot/js/validate.js new file mode 100644 index 0000000..db395a0 --- /dev/null +++ b/14/WebRoot/js/validate.js @@ -0,0 +1,208 @@ +// + diff --git a/14/WebRoot/left.jsp b/14/WebRoot/left.jsp new file mode 100644 index 0000000..94cfc52 --- /dev/null +++ b/14/WebRoot/left.jsp @@ -0,0 +1,95 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.BasetableFactory" %> +<%@ page import="com.model.*" %> + +<%BasetableFactory bf=BasetableFactory.getInstance();%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
    + <%Collection coll=bf.ListAffiche("ORDER BY atime desc"); +if(coll==null||coll.size()<0||coll.isEmpty()){%> + + + + <%}else{ + Iterator it=coll.iterator(); + while(it.hasNext()){ + Affiche l=(Affiche)it.next(); +%> + + + + <%}}%> +
    ûй
      <%=l.getTitle()%>
     
     
    + <%Collection coll2=bf.ListSoft(0,"ORDER BY loadnum DESC"); +if(coll2==null||coll2.size()<0){%> + + + + <%}else{ Iterator it=coll2.iterator(); + while(it.hasNext()){ Soft l=(Soft)it.next();%> + + + + <%}}%> +
    ûƷ
      <%=l.getName()%>
     
     
    + <%Collection coll3=bf.ListMend(0,"ORDER BY loadnum DESC");if(coll3==null||coll3.size()<0){%> + + + + <%}else{ Iterator it=coll3.iterator(); + while(it.hasNext()){ Mend l=(Mend)it.next();%> + + + + <%}}%> +
    ûй/
      <%=l.getName()%>
     
     
    + <%Collection coll4=bf.ListLink(0,"ORDER BY ltime desc"); + if(coll4==null||coll4.size()<0){%> + + + + <%}else{ + Iterator it=coll4.iterator(); + while(it.hasNext()){ + Link l=(Link)it.next();%> + + + + <%}}%> +
    û
      <%=l.getName()%>
    diff --git a/14/WebRoot/left_softsort.jsp b/14/WebRoot/left_softsort.jsp new file mode 100644 index 0000000..96b9616 --- /dev/null +++ b/14/WebRoot/left_softsort.jsp @@ -0,0 +1,34 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.*" %> +<%@ page import="com.model.Ssort" %> + + + + + + + + + + + +
    +<%Collection coll=BasetableFactory.getInstance().ListSsort(""); +if(coll==null||coll.size()<0){%> + + + +<%}else{ + Iterator it=coll.iterator(); + while(it.hasNext()){ + Ssort l=(Ssort)it.next();%> + + + + <%} +}%> +
    ûвƷб
    +    + <%=l.getName()%>
    diff --git a/14/WebRoot/left_tools.jsp b/14/WebRoot/left_tools.jsp new file mode 100644 index 0000000..31c3d1f --- /dev/null +++ b/14/WebRoot/left_tools.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.*" %> +<%@ page import="com.model.Mend"%> +<%@ page import="com.model.Ssort"%> + + + + + + + + + + + +
    + <%String action=ParamUtils.getRequestString(request,"action"); +String sql="";if("tool".equals(action)){ + sql="WHERE sid IN(SELECT sid FROM mend WHERE state="+FinalConstants.STATE_TOOL+")"; +}else if("mend".equals(action)){ sql="WHERE sid IN(SELECT sid FROM mend WHERE state="+FinalConstants.STATE_MEND+")"; +}else{ return;} +Collection coll=BasetableFactory.getInstance().ListSsort(sql); +if(coll==null||coll.size()<0){%> + + + + <% +}else{ Iterator it=coll.iterator(); + while(it.hasNext()){ Ssort l=(Ssort)it.next();%> + + + <%}}%> +
    ûвƷб
     <%=l.getName()%>
    diff --git a/14/WebRoot/list_guestboard.jsp b/14/WebRoot/list_guestboard.jsp new file mode 100644 index 0000000..b48c072 --- /dev/null +++ b/14/WebRoot/list_guestboard.jsp @@ -0,0 +1,56 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.*" %> +<%@ page import="com.model.Guestboard" %> + + + +âƼ + + + + + + + + + + + + + + + + + + +

    + Ҫ +
    + ҹ˾עΪҹ˾ûԣ + + + + + + <% +int submit_page=ParamUtils.getIntParameter(request,"page"); + BasetableFactory bf=BasetableFactory.getInstance(); +Collection coll=bf.ListGuestboard(submit_page,"ORDER BY gid");if(coll==null||coll.size()<=0){%> + + + + <%}else{Iterator it=coll.iterator(); + while(it.hasNext()){Guestboard a=(Guestboard)it.next();%> + + + + + <%}}%> + + + +
    ԱǷظ
    ǰԱΪ
    <%=a.getTitle()%><%=a.getGflag()==0?"":""%>
    <%=HtmlUtils.table(bf.getRow("guestboard ORDER BY gid"),submit_page,"list_guestboard.jsp")%>
     
    + + diff --git a/14/WebRoot/list_new.jsp b/14/WebRoot/list_new.jsp new file mode 100644 index 0000000..e459960 --- /dev/null +++ b/14/WebRoot/list_new.jsp @@ -0,0 +1,55 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.New" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> + + + +տƼ + + + + + + + + + + + + + + + + + + + +
      +
    + + + + + + + + + + <%BasetableFactory bf=BasetableFactory.getInstance(); +Collection coll=bf.ListNew("ORDER BY ntime desc"); +if(coll==null||coll.size()<=0){%> + + + + <%}else{ Iterator it=coll.iterator(); + while(it.hasNext()){New n=(New)it.next();%> + + + + + <%}}%> +
    Ϣ
    űʱժ
    û
    <%=n.getTitle()%><%=n.getNtime()%><%=ParamUtils.nullToString(n.getFromto(),"")%>
     
    + + diff --git a/14/WebRoot/list_softsort.jsp b/14/WebRoot/list_softsort.jsp new file mode 100644 index 0000000..a83d6b6 --- /dev/null +++ b/14/WebRoot/list_softsort.jsp @@ -0,0 +1,106 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Soft" %> +<%@ page import="com.core.*" %> +<%@ page import="java.util.*" %> + + + +âƼ + + + + + + + + + + + + + + + + +
      + + +
    + + + + + <% +BasetableFactory bf=BasetableFactory.getInstance(); +String sql=ParamUtils.getRequestString(request,"sid"); +if(sql!=null&&!"".equals(sql)) sql="WHERE sid="+sql; + Collection coll=bf.ListSoft(sql); + if(coll==null||coll.size()<0||coll.isEmpty()){%> + + + <%}else{ + Iterator it=coll.iterator(); + while(it.hasNext()){ Soft s=(Soft)it.next();%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<%}}%> +
    ƷϢ
    ûӸIJƷ
    Ʒ<%=s.getName()%> + <%String path=bf.SearchHead("WHERE iid='"+StringUtils.toUnicode(s.getIid()+"'")).getPath(); + if(path==null){out.print("ͼƬ"); + }else{out.print("");}%>
    Ʒ汾<%=s.getEdition()%>
    л<%=s.getEnvironment()%>
    Ʒ۸<%=s.getPrice()%>(Ԫ)
    Ƽָ<% for(int i=0;i");}%>
    汾˵<%=s.getRegular()==1?"ʽ":"ð"%> +     <%=s.getIntroduce()%>
    Ʒ<%=bf.SearchSsort("where sid="+s.getSid()).getName()%>
    ļС<%=s.getFilesize()%>MB
    <%=s.getLoadnum()%>
    ϴʱ<%=s.getUptime()%>
    ˵    <%=s.getResume()%>
    +
    +
    + +
    + + diff --git a/14/WebRoot/new.jsp b/14/WebRoot/new.jsp new file mode 100644 index 0000000..e7be48c --- /dev/null +++ b/14/WebRoot/new.jsp @@ -0,0 +1,49 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.BasetableFactory" %> +<%@ page import="com.model.New" %> + + + + + + + + + + + + + + + + + +
      + + + + <%BasetableFactory bf=BasetableFactory.getInstance();Collection coll=bf.ListNew(1000,"ORDER BY ntime DESC"); +if(coll==null||coll.size()<=0){%> + + + + <%}else{ + Iterator it=coll.iterator(); + int i=0; + while(it.hasNext()){ + New n=(New)it.next(); +%> + + + + + <%}}%> + + + +
    û
      <%=n.getTitle()%>
     
    + + + \ No newline at end of file diff --git a/14/WebRoot/produce.jsp b/14/WebRoot/produce.jsp new file mode 100644 index 0000000..e0277fd --- /dev/null +++ b/14/WebRoot/produce.jsp @@ -0,0 +1,74 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.BasetableFactory" %> +<%@ page import="com.model.Head" %> +<%@ page import="com.model.Soft" %> + + + + + + + + + + + + + + +
      + + + +
    + + <% +BasetableFactory bf=BasetableFactory.getInstance(); +Collection coll=bf.ListSoft(1000,"ORDER BY uptime DESC"); +if(coll==null||coll.size()<=0){%> + + + + <% + +}else{ + Iterator it=coll.iterator(); + while(it.hasNext()){ + Soft s=(Soft)it.next(); +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + <%}%> +<%}%> +
    ûӲƷ
    ƣ <%=s.getName()%><%String path=bf.SearchHead("WHERE iid='"+s.getIid()+"'").getPath();if(path==null){out.print("ͼƬ");}else{out.print("");}%>
    ţ <%=s.getEdition()%>
    ƽ̨ <%=s.getEnvironment()%>
         <%=s.getPrice()%>
     <%=bf.SearchSsort("WHERE sid="+s.getSid()).getName()%>
    Ʒܣ    <%=s.getIntroduce()%>
    +
    +
     
     
    + + + \ No newline at end of file diff --git a/14/WebRoot/question.jsp b/14/WebRoot/question.jsp new file mode 100644 index 0000000..416b64e --- /dev/null +++ b/14/WebRoot/question.jsp @@ -0,0 +1,55 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.*" %> +<%@ page import="com.model.User" %> +<%@ page import="com.model.Question" %> + + + +տƼ + + + + + + + + + + + + + + + + + + +
    +
    + + + + + <% + StringUtils su=new StringUtils(); + BasetableFactory bf=BasetableFactory.getInstance(); +Collection coll=bf.ListQuestion("ORDER BY qid"); +if(coll==null||coll.size()<=0){%> + + + + <% + }else{ Iterator it=coll.iterator(); + while(it.hasNext()){Question a=(Question)it.next();%> + + + + + + <%}%> +<%}%> +
    ǰΪ
    Q<%=a.getQuestion()%>
    A<%=su.escapeHTMLTags(a.getAnswer())%>
     
    + + diff --git a/14/WebRoot/resolvent.jsp b/14/WebRoot/resolvent.jsp new file mode 100644 index 0000000..a2f8849 --- /dev/null +++ b/14/WebRoot/resolvent.jsp @@ -0,0 +1,71 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.BasetableFactory" %> +<%@ page import="com.core.ParamUtils" %> +<%@ page import="com.model.*" %> + + + +տƼ + + + + + + + + + + + + + + + + +
    + + <%int rid=ParamUtils.getIntParameter(request,"rid"); +BasetableFactory bf=BasetableFactory.getInstance(); +Resolvent r=bf.SearchResolvent("WHERE rid="+rid); +if(r.getRid()<=0){ session.setAttribute("error","ʧ"); + response.sendRedirect("error.jsp");}else{%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%}%> +
    <%=r.getName()%>
    <%=bf.SearchSsort("WHERE sid="+r.getSid()).getName()%>
    ʵӦ<%=bf.SearchSoft("WHERE sfid="+r.getSfid()).getName()%>
    <%=r.getContent()%>
    <%String path=bf.SearchHead("WHERE iid='"+r.getIid()+"'").getPath();if(path==null){out.print("ͼƬ");}else{out.print("");}%>
    <%=((User)bf.SearchUser("WHERE uid='"+r.getUid()+"'")).getName()%>
    ʱ<%=r.getUptime()%>
     
     
    + + diff --git a/14/WebRoot/tools.jsp b/14/WebRoot/tools.jsp new file mode 100644 index 0000000..f266f9b --- /dev/null +++ b/14/WebRoot/tools.jsp @@ -0,0 +1,84 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.*" %> +<%@ page import="com.model.Mend" %><% +BasetableFactory bf=BasetableFactory.getInstance(); +String action=ParamUtils.getRequestString(request,"action"); +String nid=ParamUtils.getRequestString(request,"sid");if("".equals(action)) return;%> + + + +տƼ + + + + + + + + + + + + + + + +
      + + + + <%if("tool".equals(action)){ + if(!"".equals(nid)){ + nid="WHERE state="+FinalConstants.STATE_TOOL+" AND sid='"+nid+"'"; + }else{ nid="WHERE state="+FinalConstants.STATE_TOOL; + }}else if("mend".equals(action)){ + if(!"".equals(nid)){ + nid="WHERE state="+FinalConstants.STATE_MEND+" AND sid='"+nid+"'"; + }else{ nid="WHERE state="+FinalConstants.STATE_MEND; + }}Collection coll=bf.ListMend(nid); +if(coll==null||coll.size()<=0||coll.isEmpty()){%> + + + <% +}else{ Iterator it=coll.iterator(); + while(it.hasNext()){ Mend n=(Mend)it.next();%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%}}%> +
    ϸϢ
    ûй
    <%=n.getName()%>
    <%=bf.SearchSsort("where sid="+n.getSid()).getName()%>
    <%=n.getState()==FinalConstants.STATE_MEND?"":""%>
    Ƽָ<% for(int i=0;i");}%>
    С<%=n.getFilesize()%>
    ϴʱ<%=n.getUptime()%>
    ش<%=n.getLoadnum()%>
        <%=n.getResume()%>
    + + diff --git a/14/WebRoot/top.jsp b/14/WebRoot/top.jsp new file mode 100644 index 0000000..c8bae71 --- /dev/null +++ b/14/WebRoot/top.jsp @@ -0,0 +1,122 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Collection" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="com.core.BasetableFactory" %> +<%@ page import="com.model.*" %> + + + +<%BasetableFactory bf=BasetableFactory.getInstance();%> + + <%Collection cpdd=bf.ListSsort("");if(cpdd!=null&&cpdd.size()>0){ Iterator it=cpdd.iterator(); while(it.hasNext()){ Ssort s=(Ssort)it.next(); +%> + + + <%}}%> + + + <%Collection jjfa=bf.ListResolvent(""); +if(cpdd!=null&&jjfa.size()>0){ Iterator it=jjfa.iterator(); + while(it.hasNext()){ Resolvent s=(Resolvent)it.next();%> + + + <%}}%> + + + + + + + + + + + + + + + + + + + + + + +<% +User u=(User)session.getAttribute("user"); +if(u!=null &&u.getStatus()==1){ + out.println(""); +} +%> + + + + + + + + +
     âƼӭ + + + + + + + + + + +
    Ϊҳղرվϵ
    + + + + + + + + + + +
     
    + + + + + + + + + + + + + + +
    ҳƷش ֧ û Բ
     
    \ No newline at end of file diff --git a/14/WebRoot/user_logon.jsp b/14/WebRoot/user_logon.jsp new file mode 100644 index 0000000..a916e39 --- /dev/null +++ b/14/WebRoot/user_logon.jsp @@ -0,0 +1,49 @@ +<%@ page contentType="text/html; charset=GBK" %> +<% +response.setHeader("Cache-Control","no-cache"); +response.setHeader("Cache-Control","no-store"); +response.setDateHeader("Expires",0); +response.setHeader("Pragma","no-cache"); +%> + + +û¼ + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    û¼
    û
       룺
    + +   +
    +
    + + diff --git a/14/WebRoot/user_modify.jsp b/14/WebRoot/user_modify.jsp new file mode 100644 index 0000000..487ca42 --- /dev/null +++ b/14/WebRoot/user_modify.jsp @@ -0,0 +1,93 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.core.BasetableFactory" %> +<%@ page import="com.model.User" %> +<%@ page import="com.core.*" %> +<% +response.setHeader("Cache-Control","no-cache"); +response.setHeader("Cache-Control","no-store"); +response.setDateHeader("Expires",0); +response.setHeader("Pragma","no-cache"); +String action =request.getParameter("action").toString(); +String uid,password; +BasetableFactory bf=BasetableFactory.getInstance(); +session.removeAttribute("error"); +uid=ParamUtils.getRequestString(request,"uid"); +if(action==null||"".equals(action)||uid==null||"".equals(uid)){ + return; +}else if("reg".equals(action)){ + if("".equals(uid)||uid.length()<=0){ + session.setAttribute("error","ַ"); + response.sendRedirect("error.jsp"); + }else if(!"".equals(ParamUtils.nullToString(bf.SearchUser("where uid='"+uid+"'").getUid()))){ + session.setAttribute("error","û"); + response.sendRedirect("error.jsp"); + }else if(bf.CreateUser(request)){ //BasetableFactoryеķCreateUser + response.sendRedirect("user_logon.jsp"); + }else{ + session.setAttribute("error","עʧ"); + response.sendRedirect("error.jsp"); + } +}else if("logon".equals(action)){ + password=ParamUtils.getRequestString(request,"password"); + session.removeAttribute("user"); + User u=bf.SearchUser("where uid='"+uid+"' and password='"+password+"'"); + if(u.getUid()==null){ + session.setAttribute("error","û"); + response.sendRedirect("error.jsp"); + }else if(u.getState()==FinalConstants.STATE_FREEZE){ + session.setAttribute("error",""); + response.sendRedirect("error.jsp"); + }else if(uid!=null&&!"".equals(uid)&&u.getStatus()==FinalConstants.STATUS_ADMIN){ + session.setAttribute("user",u); + response.sendRedirect("admin/index.jsp"); + }else if((uid!=null&&!"".equals(uid)&&u.getStatus()==FinalConstants.STATUS_USER)){ + session.setAttribute("user",u); + response.sendRedirect("index.jsp"); + }else{ + session.setAttribute("error","û"); + response.sendRedirect("error.jsp"); + } +}else if("modify".equals(action)){ + String reganswer=ParamUtils.getRequestString(request,"reganswer"); + String regqu=ParamUtils.getRequestString(request,"regqu"); + if(!"".equals(uid)&&"".equals(regqu)){ + User u=bf.SearchUser("WHERE uid='"+uid+"'"); + request.setAttribute("user",u); + RequestDispatcher rd=request.getRequestDispatcher("user_return.jsp"); + rd.forward(request,response); + }else if(reganswer!=null&&!"".equals(reganswer)&®qu!=null&&!"".equals(regqu)){ + User u=bf.SearchUser("WHERE reganswer='"+reganswer+"' AND uid='"+uid+"' AND regqu='"+regqu+"'"); + if(u!=null&&u.getUid()!=null){ + request.setAttribute("re",u); + RequestDispatcher rd=request.getRequestDispatcher("user_return.jsp"); + rd.forward(request,response); + }else{ + session.setAttribute("error","һʧ"); + response.sendRedirect("error.jsp"); + } + } +}else if("updates".equals(action)){ + User u=bf.SearchUser("WHERE uid='"+uid+"'"); + if(u==null||"".equals(u.getUid())){ + session.setAttribute("error","û޸ʧ"); + response.sendRedirect("error.jsp"); + }else{ + u.setPassword(ParamUtils.getRequestString(request,"password")); + u.setName(ParamUtils.getRequestString(request,"name")); + u.setRegqu(ParamUtils.getRequestString(request,"regqu")); + u.setReganswer(ParamUtils.getRequestString(request,"reganswer")); + u.setAge(ParamUtils.getIntParameter(request,"age",24)); + u.setSex(ParamUtils.getIntParameter(request,"sex",0)); + u.setTel(ParamUtils.getRequestString(request,"tel")); + u.setEmail(ParamUtils.getRequestString(request,"email")); + u.setQq(ParamUtils.getRequestString(request,"qq")); + u.setAddress(ParamUtils.getRequestString(request,"address")); + u.setHttp(ParamUtils.getRequestString(request,"http")); + u.setResume(ParamUtils.getRequestString(request,"resume")); + u.setIid(ParamUtils.getRequestString(request,"iid")); + response.sendRedirect("user_logon.jsp"); + } +}else{ + return; +} +%> diff --git a/14/WebRoot/user_reg.jsp b/14/WebRoot/user_reg.jsp new file mode 100644 index 0000000..e392e75 --- /dev/null +++ b/14/WebRoot/user_reg.jsp @@ -0,0 +1,129 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page language="java" import="java.sql.*" %> +<%@ page import="com.core.ParamUtils" %> +<% +response.setHeader("Cache-Control","no-cache"); +response.setHeader("Cache-Control","no-store"); +response.setDateHeader("Expires",0); +response.setHeader("Pragma","no-cache"); +%> + + +user_reg + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ûע
    û + *ע⣺ +
      + һ*Ϊ +
    +
      + ûֻĸ»ߺɡַΪֻ֣ɡ +
    +
      + Emailдȷʽ
      + 磺mingrisoft@mingrisoft.com +
    +
      + ġͷеͼƬѡҪͷ + +
    + *
    ȷ + *
    ʵ + *
    ȡʾ + *
    ȡش + *
    Ա + + + Ů
    + *
    Email + *
    QQ
    ˵ַ
    ҳ
    ˼
    ͷ +
    +   +
    +
    + + diff --git a/14/WebRoot/user_return.jsp b/14/WebRoot/user_return.jsp new file mode 100644 index 0000000..18491b3 --- /dev/null +++ b/14/WebRoot/user_return.jsp @@ -0,0 +1,83 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.model.User" %> + + +һ + + + + + + + + + + + + + + +
    + + + + <%User re=(User)request.getAttribute("re"); +if(re==null||re.getUid()==null){ +User u=(User)request.getAttribute("user"); +if(u==null||u.getUid()==null){%> + + + + + + <%}else{%> + + + + + + + + + + + + <%}%> + + + + <%}else{%> + + + + + + + + + + + + + + <%}%> +
    һ
      
    ʾ<%=u.getRegqu()%>
    شʾ
    +   +
    뼰ʱ޸
    û[<%=re.getUid()%>]
      룺[<%=re.getPassword()%>]
     
    +
    + + diff --git a/14/WebRoot/user_update.jsp b/14/WebRoot/user_update.jsp new file mode 100644 index 0000000..c5a87f6 --- /dev/null +++ b/14/WebRoot/user_update.jsp @@ -0,0 +1,126 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="com.core.*" %> +<%@ page import="com.model.User" %> +<% +User u=(User)session.getAttribute("user"); +if(u==null){ response.sendRedirect("user_logon.jsp");}else{%> + + +û޸ + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    û޸Ϣ
    û<%=u.getUid()%>ע⣺ +
      + һ*Ϊ +
    +
      + ֻɡ +
    +
      + Emailдȷʽ
      + 磺mingrisoft@mingrisoft.com +
    +
      + ġͷеͼƬѡҪͷ + +
    ޸ + *
    ȷ + *
    ʵ + *
    ȡʾ + *
    ȡش + *
    Ա> + + > + Ů
    + *
    Email + *
    QQ
    ˵ַ
    ҳ
    ˼
    ͷ alt="޸ͷ" name="ico" width=64 height=64> +
    +
    + + +<%}%> diff --git a/14/src/com/BasetableFactoryProxy.java b/14/src/com/BasetableFactoryProxy.java new file mode 100644 index 0000000..dff4430 --- /dev/null +++ b/14/src/com/BasetableFactoryProxy.java @@ -0,0 +1,252 @@ +package com; + +import java.util.Collection; +import javax.servlet.http.HttpServletRequest; +import com.model.*; +import com.core.BasetableFactory; +import com.jspsmart.upload.Request; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ +public class BasetableFactoryProxy extends BasetableFactory { + private BasetableFactory factory; + public BasetableFactoryProxy(BasetableFactory factory) { + this.factory = factory; + } + + public int getRow(String sql) { + return factory.getRow(sql); + } + + public boolean CreateUser(HttpServletRequest request) { + System.out.print("BasetableFactoryProxy.java:"+request+""); + return factory.CreateUser(request); + } + + public User SearchUser(String sql) { + return factory.SearchUser(sql); + } + + public Collection ListHead(int page, String sql) { + return factory.ListHead(page, sql); + } + + public Collection ListUser(int page, String sql) { + return factory.ListUser(page, sql); + } + + public Head SearchHead(String sql) { + return factory.SearchHead(sql); + } + + public boolean CreateHead(String iid, String name,int state) { + return factory.CreateHead(iid, name, state); + } + + public Collection ListAffiche(int page, String sql) { + return factory.ListAffiche(page, sql); + } + + public Affiche SearchAffiche(String sql) { + return factory.SearchAffiche(sql); + } + + public boolean CreateAffiche(HttpServletRequest request) { + return factory.CreateAffiche(request); + } + + public boolean DeleteAffiche(String sql) { + return factory.DeleteAffiche(sql); + } + + public Collection ListNew(int page, String sql) { + return factory.ListNew(page, sql); + } + + public New SearchNew(String sql) { + return factory.SearchNew(sql); + } + + public boolean CreateNew(HttpServletRequest request) { + return factory.CreateNew(request); + } + + public boolean DeleteNew(String sql) { + return factory.DeleteNew(sql); + } + + public Collection ListLink(int page, String sql) { + return factory.ListLink(page, sql); + } + + public Link SearchLink(String sql) { + return factory.SearchLink(sql); + } + + public boolean CreateLink(HttpServletRequest request) { + return factory.CreateLink(request); + } + + public boolean DeleteLink(String sql) { + return factory.DeleteLink(sql); + } + + public Collection ListSsort(int page, String sql) { + return factory.ListSsort(page, sql); + } + + public Collection ListSsort(String sql) { + return factory.ListSsort(sql); + } + + public Ssort SearchSsort(String sql) { + return factory.SearchSsort(sql); + } + + public boolean CreateSsort(HttpServletRequest request) { + return factory.CreateSsort(request); + } + + public boolean DeleteSsort(String sql) { + return factory.DeleteSsort(sql); + } + + public Collection ListSoft(int page, String sql) { + return factory.ListSoft(page,sql); + } + + public Soft SearchSoft(String sql) { + return factory.SearchSoft(sql); + } + + public boolean CreateSoft(Request request,String path) { + return factory.CreateSoft(request,path); + } + + public boolean DeleteSoft(HttpServletRequest request,String sql) { + return factory.DeleteSoft(request,sql); + } + + public Collection ListResolvent(String sql) { + return factory.ListResolvent(sql); + } + + public Resolvent SearchResolvent(String sql) { + return factory.SearchResolvent(sql); + } + + public boolean CreateResolvent(Request request,String iid) { + return factory.CreateResolvent(request,iid); + } + + public boolean DeleteResolvent(String sql) { + return factory.DeleteResolvent(sql); + } + + public Collection ListSoft(String sql) { + return factory.ListSoft(sql); + } + + public Collection ListResolvent(int page, String sql) { + return factory.ListResolvent(page,sql); + } + + public Collection ListQuestion(int page, String sql) { + return factory.ListQuestion(page,sql); + } + + public Question SearchQuestion(String sql) { + return factory.SearchQuestion(sql); + } + + public boolean CreateQuestion(HttpServletRequest request) { + return factory.CreateQuestion(request); + } + + public boolean DeleteQuestion(String sql) { + return factory.DeleteQuestion(sql); + } + + public Collection ListNew(String sql) { + return factory.ListNew(sql); + } + + public Collection ListQuestion(String sql) { + return factory.ListQuestion(sql); + } + + public Collection ListGuestboard(int page, String sql) { + return factory.ListGuestboard(page,sql); + } + + public Collection ListGuestboard(String sql) { + return factory.ListGuestboard(sql); + } + + public Guestboard SearchGuestboard(String sql) { + return factory.SearchGuestboard(sql); + } + + public boolean CreateGuestboard(HttpServletRequest request) { + return factory.CreateGuestboard(request); + } + + public boolean DeleteGuestboard(String sql) { + return factory.DeleteGuestboard(sql); + } + + public Collection ListMend(int page, String sql) { + return factory.ListMend(page,sql); + } + + public Collection ListMend(String sql) { + return factory.ListMend(sql); + } + + public Mend SearchMend(String sql) { + return factory.SearchMend(sql); + } + + public boolean CreateMend(Request request,String path) { + return factory.CreateMend(request,path); + } + + public boolean DeleteMend(HttpServletRequest request,String sql) { + return factory.DeleteMend(request,sql); + } + + public boolean DeleteHead(HttpServletRequest request, String sql) { + return factory.DeleteHead(request,sql); + } + +// public Collection ListFsort(int page, String sql) { +// return factory.ListFsort(page,sql); +// } +// +// public Collection ListFsort(String sql) { +// return factory.ListFsort(sql); +// } +// +// public Fsort SearchFsort(String sql) { +// return factory.SearchFsort(sql); +// } +// +// public boolean CreateFsort(HttpServletRequest request) { +// return factory.CreateFsort(request); +// } +// +// public boolean DeleteFsort(String sql) { +// return factory.DeleteFsort(sql); +// } + + + public Collection ListAffiche(String sql) { + return factory.ListAffiche(sql); + } +} diff --git a/14/src/com/connDB.properties b/14/src/com/connDB.properties new file mode 100644 index 0000000..8a57c23 --- /dev/null +++ b/14/src/com/connDB.properties @@ -0,0 +1,5 @@ +#DB_CLASS_NAME( +DB_CLASS_NAME=com.mysql.jdbc.Driver + +#DB_URLҪݿĵַ +DB_URL=jdbc:mysql://127.0.0.1:3306/db_myEnterprise?user=root&password=111&useUnicode=true diff --git a/14/src/com/core/BasetableFactory.java b/14/src/com/core/BasetableFactory.java new file mode 100644 index 0000000..f44f3cb --- /dev/null +++ b/14/src/com/core/BasetableFactory.java @@ -0,0 +1,139 @@ +package com.core; + +import javax.servlet.http.HttpServletRequest; +import java.util.Collection; + +import com.BasetableFactoryProxy; +import com.jspsmart.upload.Request; +import com.model.*; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2008

    + *

    Company: MR

    + * @author BWM + * @version 2.0 + */ + +public abstract class BasetableFactory { + private static final String classname = "com.dao.DbBasetableFactory"; + private static BasetableFactory factory; + + public static BasetableFactory getInstance() { + if (factory == null) { + try { + Class c = Class.forName(classname); + factory = (BasetableFactory) c.newInstance(); + } catch (ClassNotFoundException ex) { + ex.printStackTrace(); + } catch (IllegalAccessException ex1) { + ex1.printStackTrace(); + } catch (InstantiationException ex1) { + ex1.printStackTrace(); + } + } + return new BasetableFactoryProxy(factory); + } + + public abstract int getRow(String sql); + + public abstract boolean CreateUser(HttpServletRequest request); + + public abstract User SearchUser(String sql); + + public abstract Collection ListUser(int page, String sql); + + public abstract Collection ListHead(int page, String sql); + + public abstract Head SearchHead(String sql); + + public abstract boolean CreateHead(String iid, String path, int state); + public abstract boolean DeleteHead(HttpServletRequest request,String sql); + + public abstract Collection ListAffiche(int page, String sql); + public abstract Collection ListAffiche(String sql); + + public abstract Affiche SearchAffiche(String sql); + + public abstract boolean CreateAffiche(HttpServletRequest request); + + public abstract boolean DeleteAffiche(String sql); + + public abstract Collection ListNew(int page, String sql); + + public abstract Collection ListNew(String sql); + + public abstract New SearchNew(String sql); + + public abstract boolean CreateNew(HttpServletRequest request); + + public abstract boolean DeleteNew(String sql); + + public abstract Collection ListLink(int page, String sql); + + public abstract Link SearchLink(String sql); + + public abstract boolean CreateLink(HttpServletRequest request); + + public abstract boolean DeleteLink(String sql); + + public abstract Collection ListSoft(int page, String sql); + + public abstract Collection ListSoft(String sql); + + public abstract Soft SearchSoft(String sql); +// + public abstract boolean CreateSoft(Request request, String path); + + public abstract boolean DeleteSoft(HttpServletRequest request,String sql); + + public abstract Collection ListSsort(int page, String sql); + + public abstract Collection ListSsort(String sql); + + public abstract Ssort SearchSsort(String sql); + + public abstract boolean CreateSsort(HttpServletRequest request); + + public abstract boolean DeleteSsort(String sql); + + public abstract Collection ListResolvent(String sql); + + public abstract Collection ListResolvent(int page, String sql); + + public abstract Resolvent SearchResolvent(String sql); + + public abstract boolean CreateResolvent(Request request, String iid); + + public abstract boolean DeleteResolvent(String sql); + + public abstract Collection ListQuestion(int page, String sql); + + public abstract Collection ListQuestion(String sql); + + public abstract Question SearchQuestion(String sql); + + public abstract boolean CreateQuestion(HttpServletRequest request); + + public abstract boolean DeleteQuestion(String sql); + public abstract Collection ListGuestboard(int page, String sql); + + public abstract Collection ListGuestboard(String sql); + + public abstract Guestboard SearchGuestboard(String sql); + + public abstract boolean CreateGuestboard(HttpServletRequest request); + + public abstract boolean DeleteGuestboard(String sql); + public abstract Collection ListMend(int page, String sql); + + public abstract Collection ListMend(String sql); + + public abstract Mend SearchMend(String sql); + + public abstract boolean CreateMend(Request request,String path); + + public abstract boolean DeleteMend(HttpServletRequest request,String sql); + +} diff --git a/14/src/com/core/Crazyadept.java b/14/src/com/core/Crazyadept.java new file mode 100644 index 0000000..91463e0 --- /dev/null +++ b/14/src/com/core/Crazyadept.java @@ -0,0 +1,39 @@ +package com.core; + +import javax.servlet.http.HttpSession; + +import com.model.User; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2008

    + *

    Company: MR

    + * @author BWM + * @version 2.0 + */ + +public class Crazyadept { + public Crazyadept() { + } + + public static boolean UserIsOK(HttpSession session, int status) { + User u = (User) session.getAttribute("user"); + if (u == null || u.getUid() == null || "".equals(u.getUid()) || + u.getStatus() != status || u.getState() == FinalConstants.STATE_FREEZE) { + return false; + } else { + return true; + } + } + + public static boolean UserIsOK(HttpSession session) { + User u = (User) session.getAttribute("user"); + if (u == null || u.getUid() == null || "".equals(u.getUid()) || + u.getState() == FinalConstants.STATE_FREEZE) { + return false; + } else { + return true; + } + } + } diff --git a/14/src/com/core/Database.java b/14/src/com/core/Database.java new file mode 100644 index 0000000..00609c8 --- /dev/null +++ b/14/src/com/core/Database.java @@ -0,0 +1,114 @@ +package com.core; + +import java.io.InputStream; +import java.sql.*; +import java.util.*; + +/** + *

    Title:

    + *

    Description: ݿ

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Database { + public static Connection conn = null; + public Statement stmt = null; + public ResultSet rs = null; + private static String propFileName = "/com/connDB.properties"; //ָԴļλ + private static Properties prop = new Properties(); + private static String dbClassName ="com.mysql.jdbc.Driver"; + private static String dbUrl = + "jdbc:mysql://127.0.0.1:3306/db_myEnterprise?user=root&password=111&useUnicode=true"; + + public Database() { + try { + InputStream in=getClass().getResourceAsStream(propFileName); + prop.load(in); //ͨPropertiesļ + dbClassName = prop.getProperty("DB_CLASS_NAME"); //ȡݿ + dbUrl = prop.getProperty("DB_URL", + "jdbc:mysql://127.0.0.1:3306/db_myEnterprise?user=root&password=111&useUnicode=true&characterEncoding=gbk"); + } + catch (Exception e) { + e.printStackTrace(); //쳣Ϣ + } + } + + public static Connection getConnection() { + try { + Class.forName(dbClassName).newInstance(); + conn = DriverManager.getConnection(dbUrl); + } + catch (Exception ee) { + ee.printStackTrace(); + } + if (conn == null) { + System.err.println( + ": DbConnectionManager.getConnection() ݿʧ.\r\n\r\n:" + + dbClassName + "\r\nλ:" + dbUrl); + } + return conn; + } + + public static int getRow(String sql) { + int i = 0; + conn = Database.getConnection(); + PreparedStatement ps = null; + ResultSet rs = null; + try { + ps = conn.prepareStatement("SELECT COUNT(*) FROM " + sql, + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + if (rs.next()) { + i = rs.getInt(1); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + i = 0; + } finally { + System.out.println("SELECT COUNT(*) FROM " + sql); + try { + rs.close(); + ps.close(); + } catch (SQLException e) {} + } + return i; + } + public static boolean Delete(String sql) { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(sql); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps + " Database.Delete() "+sql); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } +} diff --git a/14/src/com/core/FileUtils.java b/14/src/com/core/FileUtils.java new file mode 100644 index 0000000..f6bb6d0 --- /dev/null +++ b/14/src/com/core/FileUtils.java @@ -0,0 +1,36 @@ +package com.core; + +import javax.servlet.http.HttpServletRequest; +import java.io.File; + +/** + *

    Copyright: Copyright (c) 2008

    + *

    Company: MR

    + * @author wgh + * @version 2.0 + */ + +public class FileUtils { + public FileUtils() { + } + + public static boolean FileDel(HttpServletRequest request ,String path) { + if(path==null) return false; + path=request.getSession().getServletContext().getRealPath(path); + System.out.println(path+" ]path"); + File f = new File(path); + if (!f.exists()) { + return false; + } else { + if (f.delete()) { + return true; + } + } + return false; + } + + public static void main(String[] args) { + FileUtils fileUtils1 = new FileUtils(); + } + +} diff --git a/14/src/com/core/FinalConstants.java b/14/src/com/core/FinalConstants.java new file mode 100644 index 0000000..fe2f1b7 --- /dev/null +++ b/14/src/com/core/FinalConstants.java @@ -0,0 +1,103 @@ +package com.core; + +public final class FinalConstants { + + public static int STATUS_USER = 0; //ͨû + public static int STATUS_ADMIN = 1; //Ա + + public static int STATE_FREE = 0; //Ա + public static int STATE_FREEZE = 1; //Ա + + public static int STATE_NOREGULAR = 0; //ð + public static int STATE_REGULAR = 1; //ʽ + + public static int STATE_HEAD = 0; //ͷ + public static int STATE_SOFT = 1; // + public static int STATE_RESOLVENT = 2; // + + public static int STATE_TOOL = 0; // + public static int STATE_MEND = 1; // + + + //parameter + public static int STEP = 8; //ҳ + + //user + public static final String INSERT_USER = "INSERT INTO user (uid,password,name,regqu,reganswer,iid,sex,age,tel,email,qq,regtime,address,http,status,state,resume) VALUES(?,?,?,?,?,?,?,?,?,?,?,now(),?,?,?,?,?)"; + public static final String UPDATE_USER = "UPDATE (user) SET password=?,name=?,iid=?,sex=?,age=?,tel=?,email=?,qq=?,address=?,http=?,status=?,state=?,resume=? where uid=?"; + public static final String UPDATE_USER_M = "UPDATE (user) SET status=?,state=? where uid=?"; + public static final String SELECT_USER = "SELECT * FROM (user) "; + + //head + public static final String INSERT_HEAD = + "INSERT INTO ico (iid,path,atime,state) VALUES(?,?,now(),?)"; + public static final String SELECT_HEAD = "SELECT * FROM (ico) "; + public static final String DELETE_HEAD = "DELETE FROM ico "; + + //affiche + public static final String INSERT_AFFICHE = + "INSERT INTO affiche (uid,title,atime,content) VALUES(?,?,now(),?)"; + public static final String UPDATE_AFFICHE = + "UPDATE (affiche) SET title=?,content=? where aid=?"; + public static final String SELECT_AFFICHE = "SELECT * FROM (affiche) "; + public static final String DELETE_AFFICHE = "DELETE FROM affiche "; + + //new + public static final String INSERT_NEW = + "INSERT INTO new (uid,title,ntime,fromto,content) VALUES(?,?,now(),?,?)"; + public static final String SELECT_NEW = "SELECT * FROM (new) "; + public static final String DELETE_NEW = "DELETE FROM new "; + + //link + public static final String INSERT_LINK = + "INSERT INTO link (name,ltime,url) VALUES(?,now(),?)"; + public static final String UPDATE_LINK = "UPDATE (link) SET name=?,url=? where lid=?"; + public static final String SELECT_LINK = "SELECT * FROM (link) "; + public static final String DELETE_LINK = "DELETE FROM link "; + + //ssort + public static final String INSERT_SSORT = + "INSERT INTO ssort (name,resume) VALUES(?,?)"; + public static final String UPDATE_SSORT = + "UPDATE (ssort) SET name=?,resume=? where sid=?"; + public static final String SELECT_SSORT = "SELECT * FROM (ssort) "; + public static final String DELETE_SSORT = "DELETE FROM ssort "; + + //soft + public static final String INSERT_SOFT = "INSERT INTO soft (name,edition,price,uptime,uid,iid,sid,environment,filesize,commend,loadnum,regular,introduce,path,resume) VALUES(?,?,?,now(),?,?,?,?,?,?,?,?,?,?,?)"; + public static final String UPDATE_SOFT = "UPDATE (soft) SET name=?,edition=?,price=?,iid=?,sid=?,environment=?,filesize=?,commend=?,loadnum=?,regular=?,introduce=?,path=?,resume=? where sfid=?"; + public static final String UPDATE_SOFT_LOAD = "UPDATE (soft) SET loadnum=? where sfid=?"; + public static final String SELECT_SOFT = "SELECT * FROM (soft) "; + public static final String DELETE_SOFT = "DELETE FROM soft "; + + //resolvent + public static final String INSERT_RESOLVENT = + "INSERT INTO resolvent (sid,uid,sfid,name,uptime,iid,content) VALUES(?,?,?,?,now(),?,?)"; + public static final String UPDATE_RESOLVENT = + "UPDATE (resolvent) SET sid=?,sfid=?,name=?,content=? where rid=?"; + public static final String SELECT_RESOLVENT = "SELECT * FROM (resolvent) "; + public static final String DELETE_RESOLVENT = "DELETE FROM resolvent "; + + //question + public static final String INSERT_QUESTION = + "INSERT INTO question (question,answer) VALUES(?,?)"; + public static final String UPDATE_QUESTION = + "UPDATE (question) SET answer=?,question=? where qid=?"; + public static final String SELECT_QUESTION = "SELECT * FROM (question) "; + public static final String DELETE_QUESTION = "DELETE FROM question "; + + //guestboard + public static final String INSERT_GUESTBOARD = + "INSERT INTO guestboard (title,guest,gtime,content) VALUES(?,?,now(),?)"; + public static final String UPDATE_GUESTBOARD = + "UPDATE (guestboard) SET gflag=1,recontent=?,rtime=now() where gid=?"; + public static final String SELECT_GUESTBOARD = "SELECT * FROM (guestboard) "; + public static final String DELETE_GUESTBOARD = "DELETE FROM guestboard "; + + //mend + public static final String INSERT_MEND = "INSERT INTO mend (sid,name,path,state,uptime,commend,loadnum,filesize,resume) VALUES(?,?,?,?,now(),?,?,?,?)"; + public static final String UPDATE_MEND = "UPDATE (mend) SET sid=?,name=?,state=?,commend=?,loadnum=?,filesize=?,resume=? where mid=?"; + public static final String UPDATE_MEND_LOAD = "UPDATE (mend) SET loadnum=? where mid=?"; + public static final String SELECT_MEND = "SELECT * FROM (mend) "; + public static final String DELETE_MEND = "DELETE FROM mend "; +} diff --git a/14/src/com/core/HtmlUtils.java b/14/src/com/core/HtmlUtils.java new file mode 100644 index 0000000..667d5d4 --- /dev/null +++ b/14/src/com/core/HtmlUtils.java @@ -0,0 +1,57 @@ +package com.core; + +public class HtmlUtils { + + /** + * spage :ʾҳ npage :ʾҳ bpage :ʾǰһҳ lpage :ʾһҳ + * + * @param step + * : + * @param row + * :ܼ¼ + * @param page + * :ǰҳ + * @return + */ + public static String table(int step, int row, int page, String http, + String target) { + int spage = 0, npage = 0, t = 0, bpage = 0, lpage = 0; + t = row % step; + if (t == 0) { + spage = row / step; + } else { + spage = row / step + 1; + } + if (page <= 1) { + npage = 1; + bpage = 1; + lpage = 2; + } else if (page >= spage) { + npage = spage; + bpage = spage - 1; + lpage = spage; + } else { + npage = page; + bpage = page - 1; + lpage = page + 1; + } + String str = ""; + str += ""; + str += ""; + str += "
    " + row + "¼" + npage + + "/" + spage + "ҳ|<  <<  >>  >|
    "; + str += "
    "; + return str; + } + + public static String table(int row, int page, String http) { + return table(FinalConstants.STEP, row, page, http, "_self"); + } +} diff --git a/14/src/com/core/ParamUtils.java b/14/src/com/core/ParamUtils.java new file mode 100644 index 0000000..5a45328 --- /dev/null +++ b/14/src/com/core/ParamUtils.java @@ -0,0 +1,133 @@ +package com.core; + +import javax.servlet.http.HttpServletRequest; + +import com.jspsmart.upload.Request; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2008

    + *

    Company: MR

    + * @version 1.0 + */ + +public class ParamUtils { + + public static String getParameter(HttpServletRequest request, + String paramName) { + return getParameter(request, paramName, false); + } + //Կַд + public static String getParameter(HttpServletRequest request, + String paramName, String defaultStr) { + String temp = request.getParameter(paramName); + + if (temp != null) { + if (temp.equals("")) { + return defaultStr; + } else { + return nullToString(temp); + } + } else { + return defaultStr; + } + + } + + public static String getEscapeHTMLParameter(HttpServletRequest request, + String paramName) { + return nullToString(StringUtils.escapeHTMLTags(ParamUtils.getParameter( + request, paramName, true))); + } + public static String getParameter(HttpServletRequest request, + String paramName, boolean emptyStringsOK) { + String temp = request.getParameter(paramName); + if (temp != null) { + if (temp.equals("") && !emptyStringsOK) { + return ""; + } else { + return temp; + } + } else { + return ""; + } + } + + public static int getIntParameter(HttpServletRequest request, + String paramName, int defaultNum) { + String temp = request.getParameter(paramName); + if (temp != null && !temp.equals("")) { + int num = defaultNum; + try { + num = Integer.parseInt(temp); + } catch (Exception ignored) {} + return num; + } else { + return defaultNum; + } + } + + public static int getIntParameter(HttpServletRequest request, + String paramName) { + return getIntParameter(request, paramName, 0); + } + + public static String nullToString(String oldString) { + if (oldString == null) { + return ""; + } + return oldString; + } + public static String nullToString(String oldString,String defaultValue) { + oldString=nullToString(oldString); + if("".equals(oldString)){ + return defaultValue; + } + return oldString; + } +//޸ʹõķ + public static String getRequestString(HttpServletRequest request,String s){ + s=nullToString(s).trim(); + s=ParamUtils.getEscapeHTMLParameter(request, s); + s=StringUtils.toChinese(s); + s=StringUtils.toUnicode(s); + s=StringUtils.StringtoSql(s); + return s; + } +//ʹõķ + public static String getRequestString(Request request, String s) { + s=nullToString(s).trim(); + s=ParamUtils.getEscapeHTMLParameter(request, s); + //ת + // s=StringUtils.toChinese(s); + s=StringUtils.toUnicode(s); + s=StringUtils.StringtoSql(s); + return s; + } + + public static String getSqlString(String s){ + s=StringUtils.SqltoString(s); + s=StringUtils.toChinese(s); + s=nullToString(s).trim(); + return s; + } + + public static String getEscapeHTMLParameter(Request request, String s) { + return nullToString(StringUtils.escapeHTMLTags(request.getParameter(s))); + } + + public static int getIntParameter(Request request, String s) { + int defaultNum=0; + String temp = request.getParameter(s); + if (temp != null && !temp.equals("")) { + int num = defaultNum; + try { + num = Integer.parseInt(temp); + } catch (Exception ignored) {} + return num; + } else { + return defaultNum; + } + } +} diff --git a/14/src/com/core/StringUtils.java b/14/src/com/core/StringUtils.java new file mode 100644 index 0000000..ebd7ca1 --- /dev/null +++ b/14/src/com/core/StringUtils.java @@ -0,0 +1,150 @@ +package com.core; + +import java.util.Date; +import java.text.SimpleDateFormat; +import java.text.ParseException; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2008

    + *

    Company: MR

    + * @version 1.0 + */ +//ַGBK +public class StringUtils { + public static String toChinese(String strvalue) { + try { + if (strvalue == null) { + return ""; + } else { + strvalue = new String(strvalue.getBytes("ISO8859_1"), "GBK"); + return strvalue; + } + } catch (Exception e) { + return ""; + } + } + +//ַһαתֹSQLע + public static String StringtoSql(String str) { + str = nullToString(str, ""); + try { + str = str.trim().replace('\'', (char) 1); + } catch (Exception e) { + return ""; + } + return str; + } + +//ַжαתֹʱ쳣 + public static String SqltoString(String str) { + str = nullToString(str, ""); + try { + str = str.replace( (char) 1, '\'').trim(); + } catch (Exception e) { + return ""; + } + return str; + } + +//ַUnicode + public static String toUnicode(String strvalue) { + try { + if (strvalue == null) { + return null; + } else { + strvalue = new String(strvalue.getBytes("GBK"), "ISO8859_1"); + return strvalue; + } + } catch (Exception e) { + return ""; + } + } + +//жǷΪǰʱ + public static boolean compareNowTime(String date) { + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + Date d = null; + try { + d = format.parse(date); //һDateʵ + } catch (ParseException ex) { + } + if (System.currentTimeMillis() - 259200000 < d.getTime()) { + return true; + } + return false; + } + +//жûǷֻĸ + public static boolean isID(String str) { + if (str != null && str.length() > 0) { + if (str.charAt(0) < 57 && str.charAt(0) > 48) { + return false; + } + for (int i = 0; i < str.length(); i++) { + if (str.charAt(i) < 65 && str.charAt(i) > 57 || str.charAt(i) > 90 + && str.charAt(i) < 97 && str.charAt(i) != 95 || str.charAt(i) > 122 || + str.charAt(i) < 48) { + return false; + } + } + return true; + } + return false; + } + +//еHTMLַת + public static final String escapeHTMLTags(String input) { + if (input == null || input.length() == 0) { + return input; + } + StringBuffer buf = new StringBuffer(input.length()); + char ch = ' '; + for (int i = 0; i < input.length(); i++) { + ch = input.charAt(i); + if (ch == '<') { + buf.append("<"); + } else if (ch == '>') { + buf.append(">"); + } else { + buf.append(ch); + } + } + String str=buf.toString(); + str=str.replace(" "," "); + str=str.replace("\r\n","
    "); + return str; + } + +//ַеĿֵ + public static final String nullToString(String v, String toV) { + if (v == null) { + v = toV; + } + return v; + } + +// SQLĿֵд + public static final String SqlToLink(String str) { + str = StringUtils.nullToString(str, ""); + if ("".equals(str)) { + str = " LIKE '%' "; + } else { + str = (" LIKE '%" + str + "%' "); + } + return str; + } + +//ֵתΪַ + public static final String SqlToLink(int i) { + String str = ""; + try { + str = new Integer(i).toString(); + } catch (Exception e) {} + if (i == -1) { + str = ""; + } + return StringUtils.SqlToLink(str); + } +} diff --git a/14/src/com/dao/DbBasetableFactory.java b/14/src/com/dao/DbBasetableFactory.java new file mode 100644 index 0000000..7dc69c6 --- /dev/null +++ b/14/src/com/dao/DbBasetableFactory.java @@ -0,0 +1,246 @@ +package com.dao; + +import java.util.*; +import javax.servlet.http.HttpServletRequest; +import com.model.*; +import com.core.BasetableFactory; +import com.core.Database; +import com.core.FileUtils; +import com.core.FinalConstants; +import com.jspsmart.upload.Request; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2008

    + *

    Company: MR

    + * @version 1.0 + * 幤 + */ + +public class DbBasetableFactory extends BasetableFactory { + public DbBasetableFactory() {//췽 + } + //ȡ¼ + public int getRow(String sql) { + return Database.getRow(sql); + } +//û + public boolean CreateUser(HttpServletRequest request) { + return (new Dbuser(request)).Insert(); + } +//ȡûϢ + public User SearchUser(String sql) { + return new Dbuser(sql); + } +//ѯûϢб + public Collection ListUser(int page, String sql) { + return new Dbuser().Select(page, sql); + } +//ѯͷб + public Collection ListHead(int page, String sql) { + return new Dbhead().Select(page, sql); + } +//ȡͷϢ + public Head SearchHead(String sql) { + return new Dbhead(sql); + } +//ͷϢ + public boolean CreateHead(String iid, String path, int state) { + return new Dbhead(iid, path, state).Insert(); + } +//ѯϢб + public Collection ListAffiche(int page, String sql) { + return new Dbaffiche().Select(page, sql); + } + public Collection ListAffiche(String sql) { + return new Dbaffiche().Select(sql); + } +//ӹϢ + public boolean CreateAffiche(HttpServletRequest request) { + return new Dbaffiche(request).Insert(); + } +//ȡϢ + public Affiche SearchAffiche(String sql) { + return new Dbaffiche(sql); + } +//ɾϢ + public boolean DeleteAffiche(String sql) { + return Database.Delete(FinalConstants.DELETE_AFFICHE + sql); + } +//ѯб + public Collection ListNew(int page, String sql) { + return new Dbnew().Select(page, sql); + } +//ȡϢ + public New SearchNew(String sql) { + return new Dbnew(sql); + } + //Ϣ + public boolean CreateNew(HttpServletRequest request) { + return new Dbnew(request).Insert(); + } + //ɾϢ + public boolean DeleteNew(String sql) { + return Database.Delete(FinalConstants.DELETE_NEW + sql); + } + //ѯϢб + public Collection ListLink(int page, String sql) { + return new Dblink().Select(page, sql); + } + //ȡϢ + public Link SearchLink(String sql) { + return new Dblink(sql); + } + //Ϣ + public boolean CreateLink(HttpServletRequest request) { + return new Dblink(request).Insert(); + } + //ɾϢ + public boolean DeleteLink(String sql) { + return Database.Delete(FinalConstants.DELETE_LINK + sql); + } + //ѯϢб + public Collection ListSsort(int page, String sql) { + return new Dbssort().Select(page, sql); + } + //ȡϢ + public Ssort SearchSsort(String sql) { + return new Dbssort(sql); + } + //Ϣ + public boolean CreateSsort(HttpServletRequest request) { + return new Dbssort(request).Insert(); + } + //ɾϢ + public boolean DeleteSsort(String sql) { + return Database.Delete(FinalConstants.DELETE_SSORT + sql); + } + //ѯԴϢб + public Collection ListSoft(int page, String sql) { + return new Dbsoft().Select(page, sql); + } + //ȡԴϢб + public Soft SearchSoft(String sql) { + return new Dbsoft(sql); + } + //ԴϢб + public boolean CreateSoft(Request request, String path) { + return new Dbsoft(request, path).Insert(); + } + //ɾԴϢб + public boolean DeleteSoft(HttpServletRequest request,String sql) { + if (!FileUtils.FileDel(request, "upload\\"+SearchSoft(sql).getPath())) { + System.out.println("ļɾʧ"); //ɾϴļ + } + if (Database.Delete(FinalConstants.DELETE_SOFT + sql)) { + return true; + } + return false; + } + //ȡϢ + public Collection ListSsort(String sql) { + return new Dbssort().Select(sql); + } + //ȡϢ + public Resolvent SearchResolvent(String sql) { + return new Dbresolvent(sql); + } + //ӽϢ + public boolean CreateResolvent(Request request, String iid) { + return new Dbresolvent(request, iid).Insert(); + } + //ɾϢ + public boolean DeleteResolvent(String sql) { + return Database.Delete(FinalConstants.DELETE_RESOLVENT + sql); + } + //ѯԴϢб + public Collection ListSoft(String sql) { + return new Dbsoft().Select(sql); + } + //ѯϢб + public Collection ListResolvent(String sql) { + return new Dbresolvent().Select(sql); + } + //ѯϢбҳ + public Collection ListResolvent(int page, String sql) { + return new Dbresolvent().Select(page, sql); + } + //ѯбҳ + public Collection ListQuestion(int page, String sql) { + return new Dbquestion().Select(page, sql); + } + //ȡϢ + public Question SearchQuestion(String sql) { + return new Dbquestion(sql); + } + + public boolean CreateQuestion(HttpServletRequest request) { + return new Dbquestion(request).Insert(); + } + + public boolean DeleteQuestion(String sql) { + return Database.Delete(FinalConstants.DELETE_QUESTION + sql); + } + + public Collection ListNew(String sql) { + return new Dbnew().Select(sql); + } + + public Collection ListQuestion(String sql) { + return new Dbquestion().Select(sql); + } + + public Collection ListGuestboard(int page, String sql) { + return new Dbguestboard().Select(page, sql); + } + + public Collection ListGuestboard(String sql) { + return new Dbguestboard().Select(sql); + } + //ȡԲϢ + public Guestboard SearchGuestboard(String sql) { + return new Dbguestboard(sql); + } + + public boolean CreateGuestboard(HttpServletRequest request) { + return new Dbguestboard(request).Insert(); + } + + public boolean DeleteGuestboard(String sql) { + return Database.Delete(FinalConstants.DELETE_GUESTBOARD + sql); + } + + public Collection ListMend(int page, String sql) { + return new Dbmend().Select(page, sql); + } + + public Collection ListMend(String sql) { + return new Dbmend().Select(sql); + } + //ȡ߲Ϣ + public Mend SearchMend(String sql) { + return new Dbmend(sql); + } + + public boolean CreateMend(Request request, String path) { + return new Dbmend(request, path).Insert(); + } + + public boolean DeleteMend(HttpServletRequest request,String sql) { + if (!FileUtils.FileDel(request, "upload"+SearchMend(sql).getPath())) { + System.out.println("/ɾʧ"); + } + return Database.Delete(FinalConstants.DELETE_MEND + sql); + } + + public boolean DeleteHead(HttpServletRequest request, String sql) { + if (!FileUtils.FileDel(request, SearchHead(sql).getPath())) { + System.out.println("ͼƬɾʧ"); + } + if (Database.Delete(FinalConstants.DELETE_HEAD + sql)) { + return true; + } + return false; + } +} diff --git a/14/src/com/dao/Dbaffiche.java b/14/src/com/dao/Dbaffiche.java new file mode 100644 index 0000000..ba230d3 --- /dev/null +++ b/14/src/com/dao/Dbaffiche.java @@ -0,0 +1,282 @@ +package com.dao; + +import java.sql.*; +import java.util.*; +import javax.servlet.http.HttpServletRequest; +import com.core.*; +import com.model.Affiche; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Dbaffiche extends Affiche { + private Affiche a = new Affiche(); + public Dbaffiche() { + } + + public Dbaffiche(String sql) { + Connection con = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_AFFICHE + sql, + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + if (rs.next()) { + a.setAid(rs.getInt("aid")); + a.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + a.setTitle(ParamUtils.getSqlString(rs.getString("title"))); + a.setAtime(ParamUtils.getSqlString(rs.getString("atime"))); + a.setContent(ParamUtils.getSqlString(rs.getString("content"))); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbaffiche(String sql) " + a.getAid()); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + } + + public Dbaffiche(HttpServletRequest request) { + a.setUid(ParamUtils.getRequestString(request, "uid")); + a.setTitle(ParamUtils.getRequestString(request, "title")); + a.setContent(ParamUtils.getRequestString(request, "content")); + } + + public boolean Insert() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.INSERT_AFFICHE); + ps.setString(1, a.getUid()); + ps.setString(2, a.getTitle()); + ps.setString(3, a.getContent()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbaffiche.Insert()"); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + public Collection Select(String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_AFFICHE + sql); + rs = ps.executeQuery(); + while (rs.next()) { + Affiche affiche = new Affiche(); + affiche.setAid(rs.getInt("aid")); + affiche.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + affiche.setTitle(ParamUtils.getSqlString(rs.getString("title"))); + affiche.setAtime(ParamUtils.getSqlString(rs.getString("atime"))); + affiche.setContent(ParamUtils.getSqlString(rs.getString("content"))); + coll.add(affiche); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbaffiche.Select(String sql) "+FinalConstants.SELECT_AFFICHE + sql); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + //ҳ+SQL + public Collection Select(int page, String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + int tip = FinalConstants.STEP * (page - 1); + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_AFFICHE + sql); + rs = ps.executeQuery(); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= FinalConstants.STEP; i++) { + Affiche affiche = new Affiche(); + affiche.setAid(rs.getInt("aid")); + affiche.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + affiche.setTitle(ParamUtils.getSqlString(rs.getString("title"))); + affiche.setAtime(ParamUtils.getSqlString(rs.getString("atime"))); + affiche.setContent(ParamUtils.getSqlString(rs.getString("content"))); + coll.add(affiche); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbaffiche.Select(int page,String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + private boolean Update() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_AFFICHE); + ps.setString(1, a.getTitle()); + ps.setString(2, a.getContent()); + ps.setInt(3, a.getAid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbaffiche.Update() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + public int getAid() { + return a.getAid(); + } + + public void setAid(int aid) { + a.setAid(aid); + } + + public String getUid() { + return a.getUid(); + } + + public void setUid(String uid) { + a.setUid(uid); + } + + public String getTitle() { + return a.getTitle(); + } + + public void setTitle(String title) { + a.setTitle(title); + Update(); + } + + public String getAtime() { + return a.getAtime(); + } + + public void setAtime(String atime) { + a.setAtime(atime); + } + + public String getContent() { + return a.getContent(); + } + + public void setContent(String content) { + a.setContent(content); + Update(); + } + +} \ No newline at end of file diff --git a/14/src/com/dao/Dbguestboard.java b/14/src/com/dao/Dbguestboard.java new file mode 100644 index 0000000..33315b2 --- /dev/null +++ b/14/src/com/dao/Dbguestboard.java @@ -0,0 +1,316 @@ +package com.dao; + +import java.sql.*; +import java.util.*; +import javax.servlet.http.HttpServletRequest; +import com.core.*; +import com.model.Guestboard; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Dbguestboard extends Guestboard { + private Guestboard g = new Guestboard(); //ʵGuestboardһ + public Dbguestboard() { //췽 + } +//ͨSQLȡϢ + public Dbguestboard(String sql) { + Connection con = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_GUESTBOARD + sql, + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + if (rs.next()) { + g.setGid(rs.getInt("gid")); + g.setTitle(ParamUtils.getSqlString(rs.getString("title"))); + g.setGuest(ParamUtils.getSqlString(rs.getString("guest"))); + g.setGtime(ParamUtils.getSqlString(rs.getString("gtime"))); + g.setContent(ParamUtils.getSqlString(rs.getString("content"))); + g.setGflag(rs.getInt("gflag")); + g.setRtime(ParamUtils.getSqlString(rs.getString("rtime"))); + g.setRecontent(ParamUtils.getSqlString(rs.getString("recontent"))); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbguestboard(String sql) " + + FinalConstants.SELECT_GUESTBOARD + sql); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + } +//ӱлȡϢ + public Dbguestboard(HttpServletRequest request) { + g.setTitle(ParamUtils.getRequestString(request, "title")); + g.setGuest(ParamUtils.getRequestString(request, "guest")); + g.setContent(ParamUtils.getRequestString(request, "content")); + g.setGflag(ParamUtils.getIntParameter(request, "gflag")); + g.setRecontent(ParamUtils.getRequestString(request, "recontent")); + } +//Ϣ + public boolean Insert() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.INSERT_GUESTBOARD); + ps.setString(1, g.getTitle()); + ps.setString(2, g.getGuest()); + ps.setString(3, g.getContent()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbguestboard.Insert()"); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + //ͨSQLѯϢ + public Collection Select(String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_GUESTBOARD + sql); + rs = ps.executeQuery(); + while (rs.next()) { + Guestboard gb = new Guestboard(); + gb.setGid(rs.getInt("gid")); + gb.setTitle(ParamUtils.getSqlString(rs.getString("title"))); + gb.setGuest(ParamUtils.getSqlString(rs.getString("guest"))); + gb.setGtime(ParamUtils.getSqlString(rs.getString("gtime"))); + gb.setContent(ParamUtils.getSqlString(rs.getString("content"))); + gb.setGflag(rs.getInt("gflag")); + gb.setRtime(ParamUtils.getSqlString(rs.getString("rtime"))); + gb.setRecontent(ParamUtils.getSqlString(rs.getString("recontent"))); + coll.add(gb); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbguestboard.Select(String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + //ҳ+SQLѯϢ + public Collection Select(int page, String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + int tip = FinalConstants.STEP * (page - 1); + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_GUESTBOARD + sql); + rs = ps.executeQuery(); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= FinalConstants.STEP; i++) { + Guestboard gb = new Guestboard(); + gb.setGid(rs.getInt("gid")); + gb.setTitle(ParamUtils.getSqlString(rs.getString("title"))); + gb.setGuest(ParamUtils.getSqlString(rs.getString("guest"))); + gb.setGtime(ParamUtils.getSqlString(rs.getString("gtime"))); + gb.setContent(ParamUtils.getSqlString(rs.getString("content"))); + gb.setGflag(rs.getInt("gflag")); + gb.setRtime(ParamUtils.getSqlString(rs.getString("rtime"))); + gb.setRecontent(ParamUtils.getSqlString(rs.getString("recontent"))); + coll.add(gb); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbguestboard.Select(int page,String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } +//ӻظϢ + private boolean Update() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_GUESTBOARD); + ps.setString(1, g.getRecontent()); + ps.setInt(2, g.getGid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbguestboard.Update() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } +//ID + public void setGid(int gid) { + g.setGid(gid); + } +//ȡID + public int getGid() { + return g.getGid(); + } + + public String getTitle() { + return g.getTitle(); + } + + public void setTitle(String title) { + g.setTitle(title); + } + + public String getGuest() { + return g.getGuest(); + } + + public void setGuest(String guest) { + g.setGuest(guest); + } + + public String getGtime() { + return g.getGtime(); + } + + public void setGtime(String gtime) { + g.setGtime(gtime); + } + + public String getContent() { + return g.getContent(); + } + + public void setContent(String content) { + g.setContent(content); + } +//ȡǷظ + public int getGflag() { + return g.getGflag(); + } +//Ƿظ + public void setGflag(int gflag) { + g.setGflag(gflag); + Update(); //»ظֶ + } +//ȡظʱ + public String getRtime() { + return g.getRtime(); + } +//ûظʱ + public void setRtime(String rtime) { + g.setRtime(rtime); //˴Update();䣬»ظʱĹϵͳԶɣڸмnow() + } +//ȡظ + public String getRecontent() { + return g.getRecontent(); + } +//ûظ + public void setRecontent(String recontent) { + g.setRecontent(recontent); + Update(); //ظϢ + } +} diff --git a/14/src/com/dao/Dbhead.java b/14/src/com/dao/Dbhead.java new file mode 100644 index 0000000..f491b90 --- /dev/null +++ b/14/src/com/dao/Dbhead.java @@ -0,0 +1,224 @@ +package com.dao; + +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.sql.ResultSet; +import java.sql.Connection; +import java.util.Collection; +import java.util.ArrayList; +import com.jspsmart.upload.Request; +import com.model.Head; + +import com.core.Database; +import com.core.FinalConstants; +import com.core.ParamUtils; +import com.core.StringUtils; +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Dbhead extends Head{ + private Head h=new Head(); + public Dbhead() { + } + public Dbhead(String iid,String path,int state) { + h.setIid(ParamUtils.getSqlString(iid)); + h.setPath(path); + h.setState(state); + } + public Dbhead(String sql) { + Connection con = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_HEAD+sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + System.out.println(FinalConstants.SELECT_HEAD+sql+"]aa"); + if (rs.next()) { + System.out.println(FinalConstants.SELECT_HEAD+sql+"]aa"); + h.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + h.setPath(ParamUtils.getSqlString(rs.getString("path"))); + h.setAtime(ParamUtils.getSqlString(rs.getString("atime"))); + h.setState(rs.getInt("state")); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps+" Dbhead "+FinalConstants.SELECT_HEAD+sql); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + } + public boolean Insert() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.INSERT_HEAD); + ps.setString(1, h.getIid()); + ps.setString(2, StringUtils.toUnicode(h.getPath())); + ps.setInt(3, h.getState()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps+" Dbhead.Insert() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + public Collection Select(String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_HEAD + sql); + rs = ps.executeQuery(); + while(rs.next()) { + Head head=new Head(); + head.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + head.setPath(ParamUtils.getSqlString(rs.getString("path"))); + head.setAtime(ParamUtils.getSqlString(rs.getString("atime"))); + head.setState(rs.getInt("state")); + coll.add(head); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps+" Dbhead.Select(String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + public Collection Select(int page, String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + int tip = FinalConstants.STEP * (page - 1); + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_HEAD + sql); + rs = ps.executeQuery(); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= FinalConstants.STEP; i++) { + Head head=new Head(); + head.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + head.setPath(ParamUtils.getSqlString(rs.getString("path"))); + System.out.println(head.getPath()+"]"); + head.setAtime(ParamUtils.getSqlString(rs.getString("atime"))); + head.setState(rs.getInt("state")); + coll.add(head); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()+" Dbhead.Select(int page,String sql) "); + } finally { + System.out.println(ps+" Dbhead.Select(int page,String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + public String getIid() { + return h.getIid(); + } + public void setIid(String iid) { + h.setIid(iid); + } + public String getPath() { + return h.getPath(); + } + public void setPath(String path) { + h.setPath(path); + } + public String getAtime() { + return h.getAtime(); + } + public void setAtime(String atime) { + h.setAtime(atime); + } + public int getState() { + return h.getState(); + } + public void setState(int state) { + h.setState(state); + } +} \ No newline at end of file diff --git a/14/src/com/dao/Dblink.java b/14/src/com/dao/Dblink.java new file mode 100644 index 0000000..2995da2 --- /dev/null +++ b/14/src/com/dao/Dblink.java @@ -0,0 +1,271 @@ +package com.dao; + +import java.sql.*; +import java.util.*; +import javax.servlet.http.HttpServletRequest; +import com.core.Database; +import com.core.FinalConstants; +import com.core.ParamUtils; +import com.model.Link; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Dblink extends Link { + private Link l = new Link(); + public Dblink() { + } + + public Dblink(String sql) { + Connection con = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_LINK + sql, + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + if (rs.next()) { + l.setLid(rs.getInt("lid")); + l.setName(ParamUtils.getSqlString(rs.getString("name"))); + l.setLtime(ParamUtils.getSqlString(rs.getString("ltime"))); + l.setUrl(ParamUtils.getSqlString(rs.getString("url"))); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dblink(String sql) " + l.getLid()); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + } + + public Dblink(HttpServletRequest request) { + l.setName(ParamUtils.getRequestString(request, "name")); + l.setUrl(ParamUtils.getRequestString(request, "url")); + } + + public boolean Insert() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.INSERT_LINK); + ps.setString(1, l.getName()); + ps.setString(2, l.getUrl()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dblink.Insert()"); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + public Collection Select(String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_LINK + sql); + rs = ps.executeQuery(); + while (rs.next()) { + Link link = new Link(); + link.setLid(rs.getInt("lid")); + link.setName(ParamUtils.getSqlString(rs.getString("name"))); + link.setLtime(ParamUtils.getSqlString(rs.getString("ltime"))); + link.setUrl(ParamUtils.getSqlString(rs.getString("url"))); + coll.add(link); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dblink.Select(String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + //ҳ+SQL + public Collection Select(int page, String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + int tip = FinalConstants.STEP * (page - 1); + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_LINK + sql); + rs = ps.executeQuery(); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= FinalConstants.STEP; i++) { + Link link = new Link(); + link.setLid(rs.getInt("lid")); + link.setName(ParamUtils.getSqlString(rs.getString("name"))); + link.setLtime(ParamUtils.getSqlString(rs.getString("ltime"))); + link.setUrl(ParamUtils.getSqlString(rs.getString("url"))); + coll.add(link); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dblink.Select(int page,String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + private boolean Update() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_LINK); + ps.setString(1, l.getName()); + ps.setString(2, l.getUrl()); + ps.setInt(3, l.getLid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps + " Dblink.Update() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + public int getLid() { + return l.getLid(); + } + + public void setLid(int lid) { + l.setLid(lid); + } + + public String getName() { + return l.getName(); + } + + public void setName(String name) { + l.setName(name); + Update(); + } + + public String getLtime() { + return l.getLtime(); + } + + public void setLtime(String ltime) { + l.setLtime(ltime); + } + + public String getUrl() { + return l.getUrl(); + } + + public void setUrl(String url) { + l.setUrl(url); + Update(); + } + +} \ No newline at end of file diff --git a/14/src/com/dao/Dbmend.java b/14/src/com/dao/Dbmend.java new file mode 100644 index 0000000..487561f --- /dev/null +++ b/14/src/com/dao/Dbmend.java @@ -0,0 +1,396 @@ +package com.dao; + +import java.sql.*; +import java.util.*; +import com.core.Database; +import com.core.FinalConstants; +import com.core.ParamUtils; +import com.core.StringUtils; +import com.jspsmart.upload.Request; +import com.model.Mend; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Dbmend extends Mend { + public Dbmend() { + } + + public Dbmend(String sql) { + Connection con = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_MEND + sql, + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + if (rs.next()) { + m.setMid(rs.getInt("mid")); + m.setPath(ParamUtils.getSqlString(rs.getString("path"))); + m.setSid(rs.getInt("sid")); + m.setName(ParamUtils.getSqlString(rs.getString("name"))); + m.setState(rs.getInt("state")); + m.setUptime(ParamUtils.getSqlString(rs.getString("uptime"))); + m.setCommend(rs.getInt("commend")); + m.setLoadnum(rs.getInt("loadnum")); + m.setFilesize(rs.getInt("filesize")); + m.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbmend(String sql) " + m.getMid()); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + } + + public Dbmend(Request request,String mid) { + m.setPath(mid); + m.setSid(ParamUtils.getIntParameter(request, "sid")); + m.setName(ParamUtils.getRequestString(request, "name")); + m.setUptime(ParamUtils.getRequestString(request, "uptime")); + m.setCommend(ParamUtils.getIntParameter(request, "commend")); + m.setLoadnum(ParamUtils.getIntParameter(request, "loanum")); + m.setState(ParamUtils.getIntParameter(request, "state")); + m.setFilesize(ParamUtils.getIntParameter(request, "filesize")); + m.setResume(ParamUtils.getRequestString(request, "resume")); + } + + private Mend m = new Mend(); + public boolean Insert() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.INSERT_MEND); + ps.setInt(1, m.getSid()); + ps.setString(2,m.getName()); + ps.setString(3,StringUtils.toUnicode( m.getPath())); //ϴĵ + ps.setInt(4, m.getState()); + ps.setInt(5, m.getCommend()); + ps.setInt(6, m.getLoadnum()); + ps.setInt(7, m.getFilesize()); + ps.setString(8, m.getResume()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbmend.Insert()"); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + public Collection Select(String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_MEND + sql); + rs = ps.executeQuery(); + while (rs.next()) { + Mend link = new Mend(); + link.setMid(rs.getInt("mid")); + link.setSid(rs.getInt("sid")); + link.setPath(rs.getString("path")); + link.setName(ParamUtils.getSqlString(rs.getString("name"))); + link.setState(rs.getInt("state")); + link.setUptime(ParamUtils.getSqlString(rs.getString("uptime"))); + link.setCommend(rs.getInt("commend")); + link.setLoadnum(rs.getInt("loadnum")); + link.setFilesize(rs.getInt("filesize")); + link.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + coll.add(link); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbmend.Select(String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + //ҳ+SQL + public Collection Select(int page, String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + int tip = FinalConstants.STEP * (page - 1); + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_MEND + sql); + rs = ps.executeQuery(); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= FinalConstants.STEP; i++) { + Mend link = new Mend(); + link.setMid(rs.getInt("mid")); + link.setSid(rs.getInt("sid")); + link.setPath(rs.getString("path")); + link.setName(ParamUtils.getSqlString(rs.getString("name"))); + link.setState(rs.getInt("state")); + link.setUptime(ParamUtils.getSqlString(rs.getString("uptime"))); + link.setCommend(rs.getInt("commend")); + link.setLoadnum(rs.getInt("loadnum")); + link.setFilesize(rs.getInt("filesize")); + link.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + coll.add(link); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbmend.Select(int page,String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + private boolean Update() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_MEND); + ps.setInt(1, m.getSid()); + ps.setString(2, m.getName()); + ps.setInt(3, m.getState()); + ps.setInt(4, m.getCommend()); + ps.setInt(5, m.getLoadnum()); + ps.setInt(6, m.getFilesize()); + ps.setString(7, m.getResume()); + ps.setInt(8, m.getMid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbmend.Update() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + //ļʱӦõĸشķ + private boolean Update_load() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_MEND_LOAD); + ps.setInt(1, m.getLoadnum()); + ps.setInt(2, m.getMid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbmend.Update_load() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + public int getMid() { + return m.getMid(); + } + + public void setMid(int mid) { + m.setMid(mid); + } + public String getPath() { + return m.getPath(); + } + + public void setMid(String mid) { + m.setPath(mid); + } + + public int getSid() { + return m.getSid(); + } + + public void setSid(int sid) { + m.setSid(sid); + this.Update(); + } + + public String getName() { + return m.getName(); + } + + public void setName(String name) { + m.setName(name); + this.Update(); + } + + public int getState() { + return m.getState(); + } + + public void setState(int state) { + m.setState(state); + this.Update(); + } + + public String getUptime() { + return m.getUptime(); + } + + public void setUptime(String uptime) { + m.setUptime(uptime); + } + + public int getCommend() { + return m.getCommend(); + } + + public void setCommend(int commend) { + m.setCommend(commend); + this.Update(); + } + + public int getLoadnum() { + return m.getLoadnum(); + } + + public void setLoadnum(int loadnum) { + m.setLoadnum(loadnum); + this.Update_load(); + } + + public int getFilesize() { + return m.getFilesize(); + } + + public void setFilesize(int filesize) { + m.setFilesize(filesize); + this.Update(); + } + + public String getResume() { + return m.getResume(); + } + + public void setResume(String resume) { + m.setResume(resume); + this.Update(); + } + +} \ No newline at end of file diff --git a/14/src/com/dao/Dbnew.java b/14/src/com/dao/Dbnew.java new file mode 100644 index 0000000..8c7c262 --- /dev/null +++ b/14/src/com/dao/Dbnew.java @@ -0,0 +1,240 @@ +package com.dao; + +import java.sql.*; +import java.util.*; +import javax.servlet.http.HttpServletRequest; +import com.core.Database; +import com.core.FinalConstants; +import com.core.ParamUtils; +import com.model.New; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Dbnew extends New { + private New n=new New(); + public Dbnew() { + } + public Dbnew(String sql) { + Connection con = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_NEW + sql, + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + if (rs.next()) { + n.setNid(rs.getInt("nid")); + n.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + n.setTitle(ParamUtils.getSqlString(rs.getString("title"))); + n.setNtime(ParamUtils.getSqlString(rs.getString("ntime"))); + n.setFromto(ParamUtils.getSqlString(rs.getString("fromto"))); + n.setContent(ParamUtils.getSqlString(rs.getString("content"))); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbnew(String sql) " + n.getNid()); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + } + public Dbnew(HttpServletRequest request) { + n.setUid(ParamUtils.getRequestString(request, "uid")); + n.setTitle(ParamUtils.getRequestString(request, "title")); + n.setFromto(ParamUtils.getRequestString(request, "fromto")); + n.setContent(ParamUtils.getRequestString(request, "content")); + } + public boolean Insert() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.INSERT_NEW); + ps.setString(1, n.getUid()); + ps.setString(2, n.getTitle()); + ps.setString(3, n.getFromto()); + ps.setString(4, n.getContent()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbnew.Insert()"); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + public Collection Select(String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_NEW + sql); + rs = ps.executeQuery(); + while (rs.next()) { + New nw= new New(); + nw.setNid(rs.getInt("nid")); + nw.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + nw.setTitle(ParamUtils.getSqlString(rs.getString("title"))); + nw.setNtime(ParamUtils.getSqlString(rs.getString("ntime"))); + nw.setFromto(ParamUtils.getSqlString(rs.getString("fromto"))); + nw.setContent(ParamUtils.getSqlString(rs.getString("content"))); + coll.add(nw); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbnew.Select(String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + //ҳ+SQL + public Collection Select(int page, String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + int tip = FinalConstants.STEP * (page - 1); + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_NEW + sql); + rs = ps.executeQuery(); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= FinalConstants.STEP; i++) { + New nw= new New(); + nw.setNid(rs.getInt("nid")); + nw.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + nw.setTitle(ParamUtils.getSqlString(rs.getString("title"))); + nw.setNtime(ParamUtils.getSqlString(rs.getString("ntime"))); + nw.setFromto(ParamUtils.getSqlString(rs.getString("fromto"))); + nw.setContent(ParamUtils.getSqlString(rs.getString("content"))); + coll.add(nw); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbaffiche.Select(int page,String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + public int getNid() { + return n.getNid(); + } + public void setNid(int nid) { + n.setNid(nid); + } + public String getUid() { + return n.getUid(); + } + public void setUid(String uid) { + n.setUid(uid); + } + public String getNtime() { + return n.getNtime(); + } + public void setNtime(String ntime) { + n.setNtime(ntime); + } + public String getFromto() { + return n.getFromto(); + } + public void setFromto(String fromto) { + n.setFromto(fromto); + } + public String getContent() { + return n.getContent(); + } + public void setContent(String content) { + n.setContent(content); + } + public String getTitle() { + return n.getTitle(); + } + public void setTitle(String title) { + n.setTitle(title); + } +} \ No newline at end of file diff --git a/14/src/com/dao/Dbquestion.java b/14/src/com/dao/Dbquestion.java new file mode 100644 index 0000000..3d0be0d --- /dev/null +++ b/14/src/com/dao/Dbquestion.java @@ -0,0 +1,258 @@ +package com.dao; + +import java.sql.*; +import java.util.*; +import javax.servlet.http.HttpServletRequest; +import com.core.Database; +import com.core.FinalConstants; +import com.core.ParamUtils; +import com.model.Question; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Dbquestion extends Question { + private Question q = new Question(); + public Dbquestion() { + } + + public Dbquestion(String sql) { + Connection con = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_QUESTION + sql, + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + if (rs.next()) { + q.setQid(rs.getInt("lid")); + q.setAnswer(ParamUtils.getSqlString(rs.getString("answer"))); + q.setQuestion(ParamUtils.getSqlString(rs.getString("question"))); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbquestion(String sql) " + q.getQid()); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + } + + public Dbquestion(HttpServletRequest request) { + q.setAnswer(ParamUtils.getRequestString(request, "answer")); + q.setQuestion(ParamUtils.getRequestString(request, "question")); + } + + public boolean Insert() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.INSERT_QUESTION); + ps.setString(1, q.getQuestion()); + ps.setString(2, q.getAnswer()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbquestion.Insert()"); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + public Collection Select(String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_QUESTION + sql); + rs = ps.executeQuery(); + while (rs.next()) { + Question qu=new Question(); + qu.setQid(rs.getInt("qid")); + qu.setAnswer(ParamUtils.getSqlString(rs.getString("answer"))); + qu.setQuestion(ParamUtils.getSqlString(rs.getString("question"))); + coll.add(qu); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbquestion.Select(String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + //ҳ+SQL + public Collection Select(int page, String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + int tip = FinalConstants.STEP * (page - 1); + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_QUESTION+ sql); + rs = ps.executeQuery(); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= FinalConstants.STEP; i++) { + Question qu=new Question(); + qu.setQid(rs.getInt("qid")); + qu.setAnswer(ParamUtils.getSqlString(rs.getString("answer"))); + qu.setQuestion(ParamUtils.getSqlString(rs.getString("question"))); + coll.add(qu); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbquestion.Select(int page,String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + private boolean Update() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_RESOLVENT); + ps.setString(1, q.getAnswer()); + ps.setString(2, q.getQuestion()); + ps.setInt(3, q.getQid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbaffiche.Update() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + public int getQid() { + return q.getQid(); + } + + public void setQid(int qid) { + q.setQid(qid); + } + + public String getQuestion() { + return q.getQuestion(); + } + + public void setQuestion(String question) { + q.setQuestion(question); + Update(); + } + + public String getAnswer() { + return q.getAnswer(); + } + + public void setAnswer(String answer) { + q.setAnswer(answer); + Update(); + } +} \ No newline at end of file diff --git a/14/src/com/dao/Dbresolvent.java b/14/src/com/dao/Dbresolvent.java new file mode 100644 index 0000000..5491996 --- /dev/null +++ b/14/src/com/dao/Dbresolvent.java @@ -0,0 +1,327 @@ +package com.dao; + +import java.sql.*; +import java.util.*; +import com.core.Database; +import com.core.FinalConstants; +import com.core.ParamUtils; +import com.jspsmart.upload.Request; +import com.model.Resolvent; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Dbresolvent extends Resolvent { + private Resolvent r = new Resolvent(); + public Dbresolvent() { + } + + public Dbresolvent(Request request, String iid) { + r.setSid(ParamUtils.getIntParameter(request, "sid")); + r.setUid(ParamUtils.getRequestString(request, "uid")); + r.setSfid(ParamUtils.getIntParameter(request, "sfid")); + r.setName(ParamUtils.getRequestString(request, "name")); + r.setIid(ParamUtils.nullToString(iid)); + r.setContent(ParamUtils.getRequestString(request, "content")); + } + + public Dbresolvent(String sql) { + Connection con = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_RESOLVENT + sql, + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + if (rs.next()) { + r.setRid(rs.getInt("rid")); + r.setSid(rs.getInt("sid")); + r.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + r.setSfid(rs.getInt("sfid")); + r.setName(ParamUtils.getSqlString(rs.getString("name"))); + r.setUptime(ParamUtils.getSqlString(rs.getString("uptime"))); + r.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + r.setContent(ParamUtils.getSqlString(rs.getString("content"))); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbresolvent(String sql) " + FinalConstants.SELECT_RESOLVENT + sql); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + } + + public boolean Insert() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.INSERT_RESOLVENT); + ps.setInt(1, r.getSid()); + ps.setString(2, r.getUid()); + ps.setInt(3, r.getSfid()); + ps.setString(4, r.getName()); + ps.setString(5, r.getIid()); + ps.setString(6, r.getContent()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbresolvent.Insert()"); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + public Collection Select(String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_RESOLVENT + sql); + rs = ps.executeQuery(); + while (rs.next()) { + Resolvent res = new Resolvent(); + res.setRid(rs.getInt("rid")); + res.setSid(rs.getInt("sid")); + res.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + res.setSfid(rs.getInt("sfid")); + res.setName(ParamUtils.getSqlString(rs.getString("name"))); + res.setUptime(ParamUtils.getSqlString(rs.getString("uptime"))); + res.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + res.setContent(ParamUtils.getSqlString(rs.getString("content"))); + coll.add(res); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbresolvent.Select(String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + //ҳ+SQL + public Collection Select(int page, String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + int tip = FinalConstants.STEP * (page - 1); + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_RESOLVENT + sql); + rs = ps.executeQuery(); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= FinalConstants.STEP; i++) { + Resolvent res = new Resolvent(); + res.setRid(rs.getInt("rid")); + res.setSid(rs.getInt("sid")); + res.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + res.setSfid(rs.getInt("sfid")); + res.setName(ParamUtils.getSqlString(rs.getString("name"))); + res.setUptime(ParamUtils.getSqlString(rs.getString("uptime"))); + res.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + res.setContent(ParamUtils.getSqlString(rs.getString("content"))); + coll.add(res); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbresolvent.Select(int page,String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + private boolean Update() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_RESOLVENT); + ps.setInt(1, r.getSid()); + ps.setInt(2, r.getSfid()); + ps.setString(3, r.getName()); + ps.setString(4, r.getContent()); + ps.setInt(5, r.getRid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbresolvent.Update() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + public int getRid() { + return r.getRid(); + } + + public void setRid(int rid) { + r.setRid(rid); + } + + public int getSid() { + return r.getSid(); + } + + public void setSid(int sid) { + r.setSid(sid); + Update(); + } + + public int getSfid() { + return r.getSfid(); + } + + public void setSfid(int sfid) { + r.setSfid(sfid); + Update(); + } + + public String getUid() { + return r.getUid(); + } + + public void setUid(String uid) { + r.setUid(uid); + } + + public String getName() { + return r.getName(); + } + + public void setName(String name) { + r.setName(name); + Update(); + } + + public String getUptime() { + return r.getUptime(); + } + + public void setUptime(String uptime) { + r.setUptime(uptime); + } + + public String getIid() { + return r.getIid(); + } + + public void setIid(String iid) { + r.setIid(iid); + } + + public String getContent() { + return r.getContent(); + } + + public void setContent(String content) { + r.setContent(content); + Update(); + } + +} \ No newline at end of file diff --git a/14/src/com/dao/Dbsoft.java b/14/src/com/dao/Dbsoft.java new file mode 100644 index 0000000..e12bb88 --- /dev/null +++ b/14/src/com/dao/Dbsoft.java @@ -0,0 +1,484 @@ +package com.dao; + +import java.sql.*; +import java.util.*; +import com.model.Soft; +import com.core.*; +import com.jspsmart.upload.Request; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2008

    + *

    Company: MR

    + * @author wgh + * @version 2.0 + */ + +public class Dbsoft extends Soft { + private Soft s = new Soft(); + public Dbsoft() { + } + + public Dbsoft(String sql) { + Connection con = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_SOFT + sql, + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + if (rs.next()) { + s.setSfid(rs.getInt("sfid")); + s.setName(ParamUtils.getSqlString(rs.getString("name"))); + s.setEdition(ParamUtils.getSqlString(rs.getString("edition"))); + s.setPrice(rs.getFloat("price")); + s.setUptime(ParamUtils.getSqlString(rs.getString("uptime"))); + s.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + s.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + s.setSid(rs.getInt("sid")); + s.setEnvironment(ParamUtils.getSqlString(rs.getString("environment"))); + s.setFilesize(rs.getInt("filesize")); + s.setCommend(rs.getInt("commend")); + s.setLoadnum(rs.getInt("loadnum")); + s.setRegular(rs.getInt("regular")); + s.setIntroduce(ParamUtils.getSqlString(rs.getString("introduce"))); + s.setPath(ParamUtils.getSqlString(rs.getString("path"))); + s.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbsoft(String sql) " +FinalConstants.SELECT_SOFT + sql); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + } + + public Dbsoft(Request request,String path) { + s.setName(ParamUtils.getRequestString(request, "name")); + s.setEdition(ParamUtils.getRequestString(request, "edition")); + s.setPrice(new Float(ParamUtils.getRequestString(request,"price")).floatValue()); + s.setUptime(ParamUtils.getRequestString(request,"uptime")); + s.setUid(ParamUtils.getRequestString(request,"uid")); + s.setIid(ParamUtils.getRequestString(request,"iid")); + s.setSid(ParamUtils.getIntParameter(request,"sid")); + s.setEnvironment(ParamUtils.getRequestString(request,"environment")); + s.setFilesize(ParamUtils.getIntParameter(request,"filesize")); + s.setCommend(ParamUtils.getIntParameter(request,"commend")); + s.setLoadnum(ParamUtils.getIntParameter(request,"loadnum")); + s.setRegular(ParamUtils.getIntParameter(request,"regular")); + s.setIntroduce(ParamUtils.getRequestString(request,"introduce")); + s.setPath(ParamUtils.nullToString(path)); + s.setResume(ParamUtils.getRequestString(request,"resume")); + } + + public boolean Insert() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.INSERT_SOFT); + ps.setString(1, s.getName()); + ps.setString(2, s.getEdition()); + ps.setFloat(3, s.getPrice()); + ps.setString(4, s.getUid()); + ps.setString(5, s.getIid()); + ps.setInt(6, s.getSid()); + ps.setString(7, s.getEnvironment()); + ps.setInt(8, s.getFilesize()); + ps.setInt(9, s.getCommend()); + ps.setInt(10, s.getLoadnum()); + ps.setInt(11, s.getRegular()); + ps.setString(12, s.getIntroduce()); + ps.setString(13, s.getPath()); + ps.setString(14, s.getResume()); + //System.out.print("getname:ֵ"+StringUtils.StringtoSql(s.getName())); + System.out.print("getname:ֵ"+(s.getName())); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbsoft.Insert()"); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + public Collection Select(String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_SOFT + sql); + rs = ps.executeQuery(); + while (rs.next()) { + Soft link = new Soft(); + link.setSfid(rs.getInt("sfid")); + link.setName(ParamUtils.getSqlString(rs.getString("name"))); + link.setEdition(ParamUtils.getSqlString(rs.getString("edition"))); + link.setPrice(rs.getFloat("price")); + link.setUptime(ParamUtils.getSqlString(rs.getString("uptime"))); + link.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + link.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + link.setSid(rs.getInt("sid")); + link.setEnvironment(ParamUtils.getSqlString(rs.getString("environment"))); + link.setFilesize(rs.getInt("filesize")); + link.setCommend(rs.getInt("commend")); + link.setLoadnum(rs.getInt("loadnum")); + link.setRegular(rs.getInt("regular")); + link.setIntroduce(ParamUtils.getSqlString(rs.getString("introduce"))); + link.setPath(ParamUtils.getSqlString(rs.getString("path"))); + link.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + coll.add(link); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbsoft.Select(String sql) "+FinalConstants.SELECT_SOFT + sql); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + //ҳ+SQL + public Collection Select(int page, String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + int tip = FinalConstants.STEP * (page - 1); + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_SOFT + sql); + rs = ps.executeQuery(); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= FinalConstants.STEP; i++) { + Soft link = new Soft(); + link.setSfid(rs.getInt("sfid")); + link.setName(ParamUtils.getSqlString(rs.getString("name"))); + link.setEdition(ParamUtils.getSqlString(rs.getString("edition"))); + link.setPrice(rs.getFloat("price")); + link.setUptime(ParamUtils.getSqlString(rs.getString("uptime"))); + link.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + link.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + link.setSid(rs.getInt("sid")); + link.setEnvironment(ParamUtils.getSqlString(rs.getString("environment"))); + link.setFilesize(rs.getInt("filesize")); + link.setCommend(rs.getInt("commend")); + link.setLoadnum(rs.getInt("loadnum")); + link.setRegular(rs.getInt("regular")); + link.setIntroduce(ParamUtils.getSqlString(rs.getString("introduce"))); + link.setPath(ParamUtils.getSqlString(rs.getString("path"))); + link.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + coll.add(link); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbsoft.Select(int page,String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + private boolean Update() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_SOFT); + ps.setString(1, s.getName()); + ps.setString(2, s.getEdition()); + ps.setFloat(3, s.getPrice()); + ps.setString(4, s.getIid()); + ps.setInt(5, s.getSid()); + ps.setString(6, s.getEnvironment()); + ps.setInt(7, s.getFilesize()); + ps.setInt(8, s.getCommend()); + ps.setInt(9, s.getLoadnum()); + ps.setInt(10, s.getRegular()); + ps.setString(11, s.getIntroduce()); + ps.setString(12, StringUtils.toUnicode(s.getPath())); + ps.setString(13, s.getResume()); + ps.setInt(14, s.getSfid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbsoft.Update() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + private boolean Update_load() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_SOFT_LOAD); + ps.setInt(1, s.getLoadnum()); + ps.setInt(2, s.getSfid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbsoft.Update() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + public int getSfid() { + return s.getSfid(); + } + + public void setSfid(int sfid) { + s.setSfid(sfid); + } + + public String getName() { + return s.getName(); + } + + public void setName(String name) { + s.setName(name); + Update(); + } + + public String getEdition() { + return s.getEdition(); + } + + public void setEdition(String edition) { + s.setEdition(edition); + Update(); + } + + public float getPrice() { + return s.getPrice(); + } + + public void setPrice(float price) { + s.setPrice(price); + Update(); + } + + public String getUptime() { + return s.getUptime(); + } + + public void setUptime(String uptime) { + s.setUptime(uptime); + } + + public String getUid() { + return s.getUid(); + } + + public void setUid(String uid) { + s.setUid(uid); + Update(); + } + + public String getIid() { + return s.getIid(); + } + + public void setIid(String iid) { + s.setIid(iid); + Update(); + } + + public int getSid() { + return s.getSid(); + } + + public void setSid(int sid) { + s.setSid(sid); + Update(); + } + + public String getEnvironment() { + return s.getEnvironment(); + } + + public void setEnvironment(String environment) { + s.setEnvironment(environment); + Update(); + } + + public int getFilesize() { + return s.getFilesize(); + } + + public void setFilesize(int filesize) { + s.setFilesize(filesize); + Update(); + } + + public int getCommend() { + return s.getCommend(); + } + + public void setCommend(int commend) { + s.setCommend(commend); + Update(); + } + + public int getLoadnum() { + return s.getLoadnum(); + } + + public void setLoadnum(int loadnum) { + s.setLoadnum(loadnum); + Update_load(); + } + + public int getRegular() { + return s.getRegular(); + } + + public void setRegular(int regular) { + s.setRegular(regular); + Update(); + } + + public String getIntroduce() { + return s.getIntroduce(); + } + + public void setIntroduce(String introduce) { + s.setIntroduce(introduce); + Update(); + } + + public String getPath() { + return s.getPath(); + } + + public void setPath(String path) { + s.setPath(path); + Update(); + } + + public String getResume() { + return s.getResume(); + } + + public void setResume(String resume) { + s.setResume(resume); + Update(); + } +} diff --git a/14/src/com/dao/Dbssort.java b/14/src/com/dao/Dbssort.java new file mode 100644 index 0000000..00c0709 --- /dev/null +++ b/14/src/com/dao/Dbssort.java @@ -0,0 +1,250 @@ +package com.dao; + +import java.sql.*; +import java.util.*; +import javax.servlet.http.HttpServletRequest; +import com.core.Database; +import com.core.FinalConstants; +import com.core.ParamUtils; +import com.model.Ssort; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2008

    + *

    Company: MR

    + * @version 1.0 + */ + +public class Dbssort extends Ssort { + private Ssort s=new Ssort(); + public Dbssort() { + } + public Dbssort(String sql) { + Connection con = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_SSORT + sql, + ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + if (rs.next()) { + s.setSid(rs.getInt("sid")); + s.setName(ParamUtils.getSqlString(rs.getString("name"))); + s.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbssort(String sql) " + s.getSid()); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + } + + public Dbssort(HttpServletRequest request) { + s.setName(ParamUtils.getRequestString(request, "name")); + s.setResume(ParamUtils.getRequestString(request, "resume")); + } + public boolean Insert() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.INSERT_SSORT); + ps.setString(1, s.getName()); + ps.setString(2, s.getResume()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbssort.Insert()"); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + public Collection Select(String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_SSORT + sql); + rs = ps.executeQuery(); + while (rs.next()) { + Ssort link = new Ssort(); + link.setSid(rs.getInt("sid")); + link.setName(ParamUtils.getSqlString(rs.getString("name"))); + link.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + coll.add(link); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbssort.Select(String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + //ҳ+SQL + public Collection Select(int page, String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + int tip = FinalConstants.STEP * (page - 1); + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_SSORT + sql); + rs = ps.executeQuery(); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= FinalConstants.STEP; i++) { + Ssort link = new Ssort(); + link.setSid(rs.getInt("sid")); + link.setName(ParamUtils.getSqlString(rs.getString("name"))); + link.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + coll.add(link); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps + " Dbssort.Select(int page,String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + private boolean Update() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_SSORT); + ps.setString(1, s.getName()); + ps.setString(2, s.getResume()); + ps.setInt(3, s.getSid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps + " Dbaffiche.Update() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + public int getSid() { + return s.getSid(); + } + public void setSid(int sid) { + s.setSid(sid); + } + public String getName() { + return s.getName(); + } + public void setName(String name) { + s.setName(name); + Update(); + } + public String getResume() { + return s.getResume(); + } + public void setResume(String resume) { + s.setResume(resume); + Update(); + } +} \ No newline at end of file diff --git a/14/src/com/dao/Dbuser.java b/14/src/com/dao/Dbuser.java new file mode 100644 index 0000000..b6f3a30 --- /dev/null +++ b/14/src/com/dao/Dbuser.java @@ -0,0 +1,497 @@ +package com.dao; + +import java.sql.*; +import java.util.Collection; +import java.util.ArrayList; +import javax.servlet.http.HttpServletRequest; +import com.core.Database; +import com.core.FinalConstants; +import com.core.ParamUtils; +import com.model.User; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Dbuser extends User { + private User u = new User(); + //ʹʼselect + public Dbuser(){} + //ʹݿʼupdate + public Dbuser(String sql) { + Connection con = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_USER+sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); + rs = ps.executeQuery(); + if (rs.next()) { + u.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + u.setPassword(ParamUtils.getSqlString(rs.getString("password"))); + u.setName(ParamUtils.getSqlString(rs.getString("name"))); + u.setRegqu(ParamUtils.getSqlString(rs.getString("regqu"))); + u.setReganswer(ParamUtils.getSqlString(rs.getString("reganswer"))); + u.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + u.setSex(rs.getInt("sex")); + u.setAge(rs.getInt("age")); + u.setTel(ParamUtils.getSqlString(rs.getString("tel"))); + u.setEmail(ParamUtils.getSqlString(rs.getString("email"))); + u.setQq(ParamUtils.getSqlString(rs.getString("qq"))); + u.setRegtime(ParamUtils.getSqlString(rs.getString("regtime"))); + u.setAddress(ParamUtils.getSqlString(rs.getString("address"))); + u.setHttp(ParamUtils.getSqlString(rs.getString("http"))); + u.setStatus(rs.getInt("status")); + u.setState(rs.getInt("state")); + u.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + } + } catch (SQLException e) { + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps+" Dbuser(String sql) "+u.getUid()); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + } + //ʹڽʼinsert + public Dbuser(HttpServletRequest request) { + u.setUid(ParamUtils.getRequestString(request, "uid")); + u.setPassword(ParamUtils.getRequestString(request, "password")); + u.setName(ParamUtils.getRequestString(request, "name")); + u.setRegqu(ParamUtils.getRequestString(request, "regqu")); + u.setReganswer(ParamUtils.getRequestString(request, "reganswer")); + u.setSex(ParamUtils.getIntParameter(request, "sex")); + u.setAge(ParamUtils.getIntParameter(request, "age")); + u.setIid(ParamUtils.getRequestString(request, "iid")); + u.setTel(ParamUtils.getRequestString(request, "tel")); + u.setEmail(ParamUtils.getRequestString(request, "email")); + u.setQq(ParamUtils.getRequestString(request, "qq")); + u.setAddress(ParamUtils.getRequestString(request, "address")); + u.setHttp(ParamUtils.getRequestString(request, "http")); + u.setStatus(ParamUtils.getIntParameter(request, "status")); + u.setState(ParamUtils.getIntParameter(request, "state")); + u.setResume(ParamUtils.getRequestString(request, "resume")); + } + + //עʱϵͳʱ + public boolean Insert() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.INSERT_USER); + System.out.println("Dbuser.java:"+FinalConstants.INSERT_USER+""); + ps.setString(1, u.getUid()); + ps.setString(2, u.getPassword()); + ps.setString(3, u.getName()); + ps.setString(4, u.getRegqu()); + ps.setString(5, u.getReganswer()); + ps.setString(6, u.getIid()); + ps.setInt(7, u.getSex()); + ps.setInt(8, u.getAge()); + ps.setString(9, u.getTel()); + ps.setString(10, u.getEmail()); + ps.setString(11, u.getQq()); + ps.setString(12, u.getAddress()); + ps.setString(13, u.getHttp()); + ps.setInt(14, u.getStatus()); + ps.setInt(15, u.getState()); + ps.setString(16, u.getResume()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + System.out.println(e.getMessage()); + e.printStackTrace(); + } finally { + System.out.println(ps+" Dbuser.Insert()"); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + + private boolean Update() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_USER); + ps.setString(1, u.getPassword()); + ps.setString(2, u.getName()); + ps.setString(3, u.getIid()); + ps.setInt(4, u.getSex()); + ps.setInt(5, u.getAge()); + ps.setString(6, u.getTel()); + ps.setString(7, u.getEmail()); + ps.setString(8, u.getQq()); + ps.setString(9, u.getAddress()); + ps.setString(10, u.getHttp()); + ps.setInt(11, u.getStatus()); + ps.setInt(12, u.getState()); + ps.setString(13, u.getResume()); + ps.setString(14, u.getUid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps+" Dbuser.Update() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + private boolean Update_m() { + boolean b = false; + Connection con = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.UPDATE_USER_M); + ps.setInt(1, u.getStatus()); + ps.setInt(2, u.getState()); + ps.setString(3, u.getUid()); + if (ps.executeUpdate() > 0) { + b = true; + } else { + b = false; + } + } catch (SQLException e) { + b = false; + e.printStackTrace(); + } finally { + System.out.println(ps+" Dbuser.Update_m() "); + try { + if (ps != null) { + ps.close(); + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + } + } catch (SQLException e) { + con = null; + } + } + return b; + } + public Collection Select(String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_HEAD + sql); + System.out.print("SQLHead_wgh"+FinalConstants.SELECT_USER + sql); + rs = ps.executeQuery(); + while(rs.next()) { + User user = new User(); + user.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + user.setPassword(ParamUtils.getSqlString(rs.getString("password"))); + user.setName(ParamUtils.getSqlString(rs.getString("name"))); + user.setRegqu(ParamUtils.getSqlString(rs.getString("regqu"))); + user.setReganswer(ParamUtils.getSqlString(rs.getString("reganswer"))); + user.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + user.setSex(rs.getInt("sex")); + user.setAge(rs.getInt("age")); + user.setTel(ParamUtils.getSqlString(rs.getString("tel"))); + user.setEmail(ParamUtils.getSqlString(rs.getString("email"))); + user.setQq(ParamUtils.getSqlString(rs.getString("qq"))); + user.setRegtime(ParamUtils.getSqlString(rs.getString("regtime"))); + user.setAddress(ParamUtils.getSqlString(rs.getString("address"))); + user.setHttp(ParamUtils.getSqlString(rs.getString("http"))); + user.setStatus(rs.getInt("status")); + user.setState(rs.getInt("state")); + user.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + coll.add(user); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps+" Dbuser.Select(String sql) "); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + //ҳ+SQL + public Collection Select(int page, String sql) { + Collection coll = new ArrayList(); + Connection con = null; + ResultSet rs = null; + PreparedStatement ps = null; + int tip = FinalConstants.STEP * (page - 1); + try { + con = Database.getConnection(); + ps = con.prepareStatement(FinalConstants.SELECT_USER + sql); + System.out.print("SQL_wgh"+FinalConstants.SELECT_USER + sql); + rs = ps.executeQuery(); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= FinalConstants.STEP; i++) { + User user = new User(); + user.setUid(ParamUtils.getSqlString(rs.getString("uid"))); + user.setPassword(ParamUtils.getSqlString(rs.getString("password"))); + user.setName(ParamUtils.getSqlString(rs.getString("name"))); + user.setRegqu(ParamUtils.getSqlString(rs.getString("regqu"))); + user.setReganswer(ParamUtils.getSqlString(rs.getString("reganswer"))); + user.setIid(ParamUtils.getSqlString(rs.getString("iid"))); + user.setSex(rs.getInt("sex")); + user.setAge(rs.getInt("age")); + user.setTel(ParamUtils.getSqlString(rs.getString("tel"))); + user.setEmail(ParamUtils.getSqlString(rs.getString("email"))); + user.setQq(ParamUtils.getSqlString(rs.getString("qq"))); + user.setRegtime(ParamUtils.getSqlString(rs.getString("regtime"))); + user.setAddress(ParamUtils.getSqlString(rs.getString("address"))); + user.setHttp(ParamUtils.getSqlString(rs.getString("http"))); + user.setStatus(rs.getInt("status")); + user.setState(rs.getInt("state")); + user.setResume(ParamUtils.getSqlString(rs.getString("resume"))); + coll.add(user); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + System.out.println(ps+" Dbuser.Select(int page,String sql) "+FinalConstants.SELECT_USER + sql); + try { + if (ps != null) { + ps.close(); + ps = null; + } + } catch (SQLException e) { + ps = null; + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (SQLException e) { + con = null; + } + } + return coll; + } + + public String getPassword() { + return u.getPassword(); + } + + public void setPassword(String password) { + u.setPassword(password); + Update(); + } + + public String getName() { + return u.getName(); + } + + public void setName(String name) { + u.setName(name); + Update(); + } + + public String getRegqu() { + return u.getRegqu(); + } + + public void setRegqu(String regqu) { + u.setRegqu(regqu); + Update(); + } + + public String getReganswer() { + return u.getReganswer(); + } + + public void setReganswer(String reganswer) { + u.setReganswer(reganswer); + Update(); + } + + public int getSex() { + return u.getSex(); + } + + public void setSex(int sex) { + u.setSex(sex); + Update(); + } + + public int getAge() { + return u.getAge(); + } + + public void setAge(int age) { + u.setAge(age); + Update(); + } + + public String getTel() { + return u.getTel(); + } + + public void setTel(String tel) { + u.setTel(tel); + Update(); + } + + public String getEmail() { + return u.getEmail(); + } + + public void setEmail(String email) { + u.setEmail(email); + Update(); + } + + public String getQq() { + return u.getQq(); + } + + public void setQq(String qq) { + u.setQq(qq); + Update(); + } + + public String getRegtime() { + return u.getRegtime(); + } + + public String getAddress() { + return u.getAddress(); + } + + public void setAddress(String address) { + u.setAddress(address); + Update(); + } + + public String getHttp() { + return u.getHttp(); + } + + public void setHttp(String http) { + u.setHttp(http); + Update(); + } + + public String getResume() { + return u.getResume(); + } + + public void setResume(String resume) { + u.setResume(resume); + Update(); + } + + public int getStatus() { + return u.getStatus(); + } + + public void setStatus(int status) { + u.setStatus(status); + Update_m(); + } + + public int getState() { + return u.getState(); + } + + public void setState(int state) { + u.setState(state); + Update_m(); + } + public String getIid() { + return u.getIid(); + } + public void setIid(String iid) { + u.setIid(iid); + Update(); + } + public String getUid() { + return u.getUid(); + } + public void setUid(String Uid) { + u.setUid(Uid); + } + +} diff --git a/14/src/com/dao/Line.java b/14/src/com/dao/Line.java new file mode 100644 index 0000000..094120b --- /dev/null +++ b/14/src/com/dao/Line.java @@ -0,0 +1,64 @@ +package com.dao; + +import java.util.Collection; +import java.util.Iterator; + +import com.model.Mend; +import com.model.Soft; + +/** + *

    Title: mingrisoft

    + *

    Description: տƼŻվ

    + *

    Copyright: Copyright (c) 2005

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Line { + + public int[] softToArray(){ + int[] soft=null; + Collection softcoll=new Dbsoft().Select(""); + if(softcoll==null||softcoll.size()<=0||softcoll.isEmpty()){ + return null; + }else{ + soft=new int [softcoll.size()]; + Iterator it=softcoll.iterator(); + for(int i=0;iTitle:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 +* Ʒ----wghעɾ + */ + +public class Affiche { + private int aid; + private String uid; + private String title; + private String atime; + private String content; + + public Affiche() { + } + public int getAid() { + return aid; + } + public void setAid(int aid) { + this.aid = aid; + } + public String getUid() { + return uid; + } + + public void setUid(String uid) { + this.uid = uid; + } + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public String getAtime() { + return atime; + } + public void setAtime(String atime) { + this.atime = atime; + } + public String getContent() { + return content; + } + public void setContent(String content) { + this.content = content; + } + +} diff --git a/14/src/com/model/Fsort.java b/14/src/com/model/Fsort.java new file mode 100644 index 0000000..dd68cb6 --- /dev/null +++ b/14/src/com/model/Fsort.java @@ -0,0 +1,65 @@ +package com.model; + +/** + *

    Title: mingrisoft

    + *

    Description: տƼŻվ

    + *

    Copyright: Copyright (c) 2005

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Fsort { + private int fsid; + private String name; + private String ftime; + private String uid; + private String resume; + private int state; + private int free; + public Fsort() { + } + public int getFsid() { + return fsid; + } + public void setFsid(int fsid) { + this.fsid = fsid; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getFtime() { + return ftime; + } + public void setFtime(String ftime) { + this.ftime = ftime; + } + public String getUid() { + return uid; + } + public void setUid(String uid) { + this.uid = uid; + } + public String getResume() { + return resume; + } + public void setResume(String resume) { + this.resume = resume; + } + public int getState() { + return state; + } + public void setState(int state) { + this.state = state; + } + public int getFree() { + return free; + } + public void setFree(int free) { + this.free = free; + } + +} \ No newline at end of file diff --git a/14/src/com/model/Guestboard.java b/14/src/com/model/Guestboard.java new file mode 100644 index 0000000..5af5159 --- /dev/null +++ b/14/src/com/model/Guestboard.java @@ -0,0 +1,71 @@ +package com.model; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2008

    + *

    Company: MR

    + * @author wgh + * @version 2.0 + */ + +public class Guestboard { + private int gid; //ID + private String title; //Ա + private String guest; // + private String gtime; //ʱ + private String content; // + private int gflag; //ǷѾظֵ1ʾѾظ0Ϊδظ + private String rtime; //ظʱ + private String recontent; //ظ + public Guestboard() { //췽 + } + public int getGid() { //ȡID + return gid; + } + public void setGid(int gid) { //ID + this.gid = gid; + } + public String getTitle() { //ȡԱ + return title; + } + public void setTitle(String title) { //Ա + this.title = title; + } + public String getGuest() { //ȡ + return guest; + } + public void setGuest(String guest) { // + this.guest = guest; + } + public String getGtime() { //ȡʱ + return gtime; + } + public void setGtime(String gtime) { //ʱ + this.gtime = gtime; + } + public String getContent() { //ȡ + return content; + } + public void setContent(String content) { // + this.content = content; + } + public int getGflag() { //ȡǷظ + return gflag; + } + public void setGflag(int gflag) { //Ƿظ + this.gflag = gflag; + } + public String getRtime() {//ȡظʱ + return rtime; + } + public void setRtime(String rtime) {//ûظʱ + this.rtime = rtime; + } + public String getRecontent() { //ȡظ + return recontent; + } + public void setRecontent(String recontent) { //ûظ + this.recontent = recontent; + } +} diff --git a/14/src/com/model/Head.java b/14/src/com/model/Head.java new file mode 100644 index 0000000..f95b20f --- /dev/null +++ b/14/src/com/model/Head.java @@ -0,0 +1,44 @@ +package com.model; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Head { + + private String iid; + private String path; + private String atime; + private int state; + public Head() { + } + public String getIid() { + return iid; + } + public void setIid(String iid) { + this.iid = iid; + } + public String getPath() { + return path; + } + public void setPath(String path) { + this.path = path; + } + public String getAtime() { + return atime; + } + public void setAtime(String atime) { + this.atime = atime; + } + public int getState() { + return state; + } + public void setState(int state) { + this.state = state; + } +} \ No newline at end of file diff --git a/14/src/com/model/Link.java b/14/src/com/model/Link.java new file mode 100644 index 0000000..693c361 --- /dev/null +++ b/14/src/com/model/Link.java @@ -0,0 +1,44 @@ +package com.model; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Link { + private int lid; + private String name; + private String ltime; + private String url; + public Link() { + } + public int getLid() { + return lid; + } + public void setLid(int lid) { + this.lid = lid; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getLtime() { + return ltime; + } + public void setLtime(String ltime) { + this.ltime = ltime; + } + public String getUrl() { + return url; + } + public void setUrl(String url) { + this.url = url; + } + +} \ No newline at end of file diff --git a/14/src/com/model/Mend.java b/14/src/com/model/Mend.java new file mode 100644 index 0000000..87d8ef4 --- /dev/null +++ b/14/src/com/model/Mend.java @@ -0,0 +1,86 @@ +package com.model; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Mend { + private int sid; + private String name; + private int state; + private String uptime; + private int commend; + private int loadnum; + private int filesize; + private String resume; + private String path; + private int mid; + public Mend() { + } + public int getMid() { + return mid; + } + public void setMid(int mid) { + this.mid = mid; + } + public int getSid() { + return sid; + } + public void setSid(int sid) { + this.sid = sid; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public int getState() { + return state; + } + public void setState(int state) { + this.state = state; + } + public String getUptime() { + return uptime; + } + public void setUptime(String uptime) { + this.uptime = uptime; + } + public int getCommend() { + return commend; + } + public void setCommend(int commend) { + this.commend = commend; + } + public int getLoadnum() { + return loadnum; + } + public void setLoadnum(int loadnum) { + this.loadnum = loadnum; + } + public int getFilesize() { + return filesize; + } + public void setFilesize(int filesize) { + this.filesize = filesize; + } + public String getResume() { + return resume; + } + public void setResume(String resume) { + this.resume = resume; + } + public String getPath() { + return path; + } + public void setPath(String path) { + this.path = path; + } + +} \ No newline at end of file diff --git a/14/src/com/model/New.java b/14/src/com/model/New.java new file mode 100644 index 0000000..af35380 --- /dev/null +++ b/14/src/com/model/New.java @@ -0,0 +1,58 @@ +package com.model; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class New { + private int nid; + private String uid; + private String ntime; + private String fromto; + private String content; + private String title; + public New() { + } + public int getNid() { + return nid; + } + public void setNid(int nid) { + this.nid = nid; + } + public String getUid() { + return uid; + } + public void setUid(String uid) { + this.uid = uid; + } + public String getNtime() { + return ntime; + } + public void setNtime(String ntime) { + this.ntime = ntime; + } + public String getFromto() { + return fromto; + } + public void setFromto(String fromto) { + this.fromto = fromto; + } + public String getContent() { + return content; + } + public void setContent(String content) { + this.content = content; + } + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + +} \ No newline at end of file diff --git a/14/src/com/model/Question.java b/14/src/com/model/Question.java new file mode 100644 index 0000000..ec24255 --- /dev/null +++ b/14/src/com/model/Question.java @@ -0,0 +1,37 @@ +package com.model; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Question { + private int qid; + private String question; + private String answer; + public Question() { + } + public int getQid() { + return qid; + } + public void setQid(int qid) { + this.qid = qid; + } + public String getQuestion() { + return question; + } + public void setQuestion(String question) { + this.question = question; + } + public String getAnswer() { + return answer; + } + public void setAnswer(String answer) { + this.answer = answer; + } + +} \ No newline at end of file diff --git a/14/src/com/model/Resolvent.java b/14/src/com/model/Resolvent.java new file mode 100644 index 0000000..3e96a65 --- /dev/null +++ b/14/src/com/model/Resolvent.java @@ -0,0 +1,72 @@ +package com.model; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Resolvent { + private int rid; + private int sid; + private int sfid; + private String uid; + private String name; + private String uptime; + private String iid; + private String content; + public Resolvent() { + } + public int getRid() { + return rid; + } + public void setRid(int rid) { + this.rid = rid; + } + public int getSid() { + return sid; + } + public void setSid(int sid) { + this.sid = sid; + } + public int getSfid() { + return sfid; + } + public void setSfid(int sfid) { + this.sfid = sfid; + } + public String getUid() { + return uid; + } + public void setUid(String uid) { + this.uid = uid; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getUptime() { + return uptime; + } + public void setUptime(String uptime) { + this.uptime = uptime; + } + public String getIid() { + return iid; + } + public void setIid(String iid) { + this.iid = iid; + } + public String getContent() { + return content; + } + public void setContent(String content) { + this.content = content; + } + +} \ No newline at end of file diff --git a/14/src/com/model/Soft.java b/14/src/com/model/Soft.java new file mode 100644 index 0000000..515ca65 --- /dev/null +++ b/14/src/com/model/Soft.java @@ -0,0 +1,128 @@ +package com.model; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Soft { + private int sfid; + private String name=""; + private String edition; + private float price; + private String uptime; + private String uid; + private String iid; + private int sid; + private String environment; + private int filesize; + private int commend; + private int loadnum; + private int regular; + private String introduce; + private String path; + private String resume; + public Soft() { + } + public int getSfid() { + return sfid; + } + public void setSfid(int sfid) { + this.sfid = sfid; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getEdition() { + return edition; + } + public void setEdition(String edition) { + this.edition = edition; + } + public float getPrice() { + return price; + } + public void setPrice(float price) { + this.price = price; + } + public String getUptime() { + return uptime; + } + public void setUptime(String uptime) { + this.uptime = uptime; + } + public String getUid() { + return uid; + } + public void setUid(String uid) { + this.uid = uid; + } + public String getIid() { + return iid; + } + public void setIid(String iid) { + this.iid = iid; + } + public int getSid() { + return sid; + } + public void setSid(int sid) { + this.sid = sid; + } + public String getEnvironment() { + return environment; + } + public void setEnvironment(String environment) { + this.environment = environment; + } + public int getFilesize() { + return filesize; + } + public void setFilesize(int filesize) { + this.filesize = filesize; + } + public int getCommend() { + return commend; + } + public void setCommend(int commend) { + this.commend = commend; + } + public int getLoadnum() { + return loadnum; + } + public void setLoadnum(int loadnum) { + this.loadnum = loadnum; + } + public int getRegular() { + return regular; + } + public void setRegular(int regular) { + this.regular = regular; + } + public String getIntroduce() { + return introduce; + } + public void setIntroduce(String introduce) { + this.introduce = introduce; + } + public String getPath() { + return path; + } + public void setPath(String path) { + this.path = path; + } + public String getResume() { + return resume; + } + public void setResume(String resume) { + this.resume = resume; + } + +} \ No newline at end of file diff --git a/14/src/com/model/Ssort.java b/14/src/com/model/Ssort.java new file mode 100644 index 0000000..4827cf3 --- /dev/null +++ b/14/src/com/model/Ssort.java @@ -0,0 +1,37 @@ +package com.model; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Ssort { + private int sid; + private String name=""; + private String resume; + public Ssort() { + } + public int getSid() { + return sid; + } + public void setSid(int sid) { + this.sid = sid; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getResume() { + return resume; + } + public void setResume(String resume) { + this.resume = resume; + } + +} \ No newline at end of file diff --git a/14/src/com/model/User.java b/14/src/com/model/User.java new file mode 100644 index 0000000..304f407 --- /dev/null +++ b/14/src/com/model/User.java @@ -0,0 +1,134 @@ +package com.model; + +import javax.servlet.http.HttpServletRequest; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @version 1.0 + */ + +public class User { + private String uid; + private String password; + private String name="ο"; + private String regqu; + private String reganswer; + private int sex; + private int age; + private String tel; + private String email; + private String qq; + private String regtime="1982-6-16 9:00:00"; + private String address; + private String http; + private int status; + private int state; + private String resume; + private String iid; + public String getUid() { + return uid; + } + public void setUid(String uid) { + this.uid = uid; + } + public String getPassword() { + return password; + } + public void setPassword(String password) { + this.password = password; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getRegqu() { + return regqu; + } + public void setRegqu(String regqu) { + this.regqu = regqu; + } + public String getReganswer() { + return reganswer; + } + public void setReganswer(String reganswer) { + this.reganswer = reganswer; + } + public int getSex() { + return sex; + } + public void setSex(int sex) { + this.sex = sex; + } + public int getAge() { + return age; + } + public void setAge(int age) { + this.age = age; + } + public String getTel() { + return tel; + } + public void setTel(String tel) { + this.tel = tel; + } + public String getEmail() { + return email; + } + public void setEmail(String email) { + this.email = email; + } + public String getQq() { + return qq; + } + public void setQq(String qq) { + this.qq = qq; + } + public String getRegtime() { + return regtime; + } + public void setRegtime(String regtime) { + this.regtime = regtime; + } + public String getAddress() { + return address; + } + public void setAddress(String address) { + this.address = address; + } + public String getHttp() { + return http; + } + public void setHttp(String http) { + this.http = http; + } + public int getStatus() { + return status; + } + public void setStatus(int status) { + this.status = status; + } + public int getState() { + return state; + } + public void setState(int state) { + this.state = state; + } + public String getResume() { + return resume; + } + public void setResume(String resume) { + this.resume = resume; + } + public String getIid() { + return iid; + } + public void setIid(String iid) { + this.iid = iid; + } + +} \ No newline at end of file diff --git "a/14/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/14/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..915bf8a Binary files /dev/null and "b/14/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/15/.classpath b/15/.classpath new file mode 100644 index 0000000..fbd4091 --- /dev/null +++ b/15/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/15/.mymetadata b/15/.mymetadata new file mode 100644 index 0000000..6c99a06 --- /dev/null +++ b/15/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/15/.project b/15/.project new file mode 100644 index 0000000..23b6c03 --- /dev/null +++ b/15/.project @@ -0,0 +1,50 @@ + + + 15 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/15/.settings/.jsdtscope b/15/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/15/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/15/.settings/org.eclipse.jdt.core.prefs b/15/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..f612b0e --- /dev/null +++ b/15/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Thu Feb 17 14:25:04 CST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/15/.settings/org.eclipse.wst.jsdt.ui.superType.container b/15/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/15/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/15/.settings/org.eclipse.wst.jsdt.ui.superType.name b/15/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/15/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/15/WebRoot/META-INF/MANIFEST.MF b/15/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/15/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/15/WebRoot/WEB-INF/classes/com/dao/ArtReviewDao.class b/15/WebRoot/WEB-INF/classes/com/dao/ArtReviewDao.class new file mode 100644 index 0000000..cdd59db Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/dao/ArtReviewDao.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/dao/ArticleDao.class b/15/WebRoot/WEB-INF/classes/com/dao/ArticleDao.class new file mode 100644 index 0000000..1546da1 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/dao/ArticleDao.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/dao/ElectDao.class b/15/WebRoot/WEB-INF/classes/com/dao/ElectDao.class new file mode 100644 index 0000000..8e2fc11 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/dao/ElectDao.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/dao/FriendDao.class b/15/WebRoot/WEB-INF/classes/com/dao/FriendDao.class new file mode 100644 index 0000000..f36b5d7 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/dao/FriendDao.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/dao/LinkDao.class b/15/WebRoot/WEB-INF/classes/com/dao/LinkDao.class new file mode 100644 index 0000000..29ae77b Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/dao/LinkDao.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/dao/MediaDao.class b/15/WebRoot/WEB-INF/classes/com/dao/MediaDao.class new file mode 100644 index 0000000..815af0a Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/dao/MediaDao.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/dao/MediaRevDao.class b/15/WebRoot/WEB-INF/classes/com/dao/MediaRevDao.class new file mode 100644 index 0000000..252ca2c Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/dao/MediaRevDao.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/dao/PhotoDao.class b/15/WebRoot/WEB-INF/classes/com/dao/PhotoDao.class new file mode 100644 index 0000000..ecb33d7 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/dao/PhotoDao.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/dao/SuperDao.class b/15/WebRoot/WEB-INF/classes/com/dao/SuperDao.class new file mode 100644 index 0000000..9ef4380 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/dao/SuperDao.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/dao/UserDao.class b/15/WebRoot/WEB-INF/classes/com/dao/UserDao.class new file mode 100644 index 0000000..ad75551 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/dao/UserDao.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/dao/WordDao.class b/15/WebRoot/WEB-INF/classes/com/dao/WordDao.class new file mode 100644 index 0000000..76af728 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/dao/WordDao.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/filter/AllFilter.class b/15/WebRoot/WEB-INF/classes/com/filter/AllFilter.class new file mode 100644 index 0000000..16bba70 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/filter/AllFilter.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/filter/NeedLogonFilter.class b/15/WebRoot/WEB-INF/classes/com/filter/NeedLogonFilter.class new file mode 100644 index 0000000..d54cb64 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/filter/NeedLogonFilter.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/ArtReviewServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/ArtReviewServlet.class new file mode 100644 index 0000000..c7cf78d Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/ArtReviewServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/ArticleServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/ArticleServlet.class new file mode 100644 index 0000000..26427ae Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/ArticleServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/BlogServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/BlogServlet.class new file mode 100644 index 0000000..83bee43 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/BlogServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/ElectServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/ElectServlet.class new file mode 100644 index 0000000..8eba446 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/ElectServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/FriendServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/FriendServlet.class new file mode 100644 index 0000000..a2d6c8f Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/FriendServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/IndexServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/IndexServlet.class new file mode 100644 index 0000000..e142f40 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/IndexServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/LinkServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/LinkServlet.class new file mode 100644 index 0000000..52463f7 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/LinkServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/LogOff.class b/15/WebRoot/WEB-INF/classes/com/servlet/LogOff.class new file mode 100644 index 0000000..3d61c38 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/LogOff.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/MediaRevServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/MediaRevServlet.class new file mode 100644 index 0000000..3150a22 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/MediaRevServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/MediaServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/MediaServlet.class new file mode 100644 index 0000000..65f24cf Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/MediaServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/MyLogon.class b/15/WebRoot/WEB-INF/classes/com/servlet/MyLogon.class new file mode 100644 index 0000000..8db82ea Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/MyLogon.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/PhotoServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/PhotoServlet.class new file mode 100644 index 0000000..898d466 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/PhotoServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/UserLogon.class b/15/WebRoot/WEB-INF/classes/com/servlet/UserLogon.class new file mode 100644 index 0000000..55943ce Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/UserLogon.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/UserServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/UserServlet.class new file mode 100644 index 0000000..14af057 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/UserServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/servlet/WordServlet.class b/15/WebRoot/WEB-INF/classes/com/servlet/WordServlet.class new file mode 100644 index 0000000..8665063 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/servlet/WordServlet.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/toolsBean/Change.class b/15/WebRoot/WEB-INF/classes/com/toolsBean/Change.class new file mode 100644 index 0000000..25befd7 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/toolsBean/Change.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/toolsBean/CreatePage.class b/15/WebRoot/WEB-INF/classes/com/toolsBean/CreatePage.class new file mode 100644 index 0000000..dfc7e03 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/toolsBean/CreatePage.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/toolsBean/DB.class b/15/WebRoot/WEB-INF/classes/com/toolsBean/DB.class new file mode 100644 index 0000000..adf7cc8 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/toolsBean/DB.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/valueBean/ArtReviewSingle.class b/15/WebRoot/WEB-INF/classes/com/valueBean/ArtReviewSingle.class new file mode 100644 index 0000000..ed0aafa Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/valueBean/ArtReviewSingle.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/valueBean/ArticleSingle.class b/15/WebRoot/WEB-INF/classes/com/valueBean/ArticleSingle.class new file mode 100644 index 0000000..2a3d19b Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/valueBean/ArticleSingle.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/valueBean/ElectSingle.class b/15/WebRoot/WEB-INF/classes/com/valueBean/ElectSingle.class new file mode 100644 index 0000000..5126ed5 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/valueBean/ElectSingle.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/valueBean/LinkSingle.class b/15/WebRoot/WEB-INF/classes/com/valueBean/LinkSingle.class new file mode 100644 index 0000000..02c67ca Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/valueBean/LinkSingle.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/valueBean/MediaRevSingle.class b/15/WebRoot/WEB-INF/classes/com/valueBean/MediaRevSingle.class new file mode 100644 index 0000000..d596a2a Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/valueBean/MediaRevSingle.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/valueBean/MediaSingle.class b/15/WebRoot/WEB-INF/classes/com/valueBean/MediaSingle.class new file mode 100644 index 0000000..dac6b23 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/valueBean/MediaSingle.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/valueBean/PhotoSingle.class b/15/WebRoot/WEB-INF/classes/com/valueBean/PhotoSingle.class new file mode 100644 index 0000000..5991fe4 Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/valueBean/PhotoSingle.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/valueBean/UserSingle.class b/15/WebRoot/WEB-INF/classes/com/valueBean/UserSingle.class new file mode 100644 index 0000000..683a5fa Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/valueBean/UserSingle.class differ diff --git a/15/WebRoot/WEB-INF/classes/com/valueBean/WordSingle.class b/15/WebRoot/WEB-INF/classes/com/valueBean/WordSingle.class new file mode 100644 index 0000000..aa3513b Binary files /dev/null and b/15/WebRoot/WEB-INF/classes/com/valueBean/WordSingle.class differ diff --git a/15/WebRoot/WEB-INF/lib/jspSmartUpload.jar b/15/WebRoot/WEB-INF/lib/jspSmartUpload.jar new file mode 100644 index 0000000..e297164 Binary files /dev/null and b/15/WebRoot/WEB-INF/lib/jspSmartUpload.jar differ diff --git a/15/WebRoot/WEB-INF/lib/jstl.jar b/15/WebRoot/WEB-INF/lib/jstl.jar new file mode 100644 index 0000000..11ffb52 Binary files /dev/null and b/15/WebRoot/WEB-INF/lib/jstl.jar differ diff --git a/15/WebRoot/WEB-INF/lib/sqljdbc.jar b/15/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/15/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/15/WebRoot/WEB-INF/web.xml b/15/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..e0a24e0 --- /dev/null +++ b/15/WebRoot/WEB-INF/web.xml @@ -0,0 +1,368 @@ + + + + 404 + /error.jsp + + + + 30 + + + + indexTemp + /view/IndexTemp.jsp + + + + adminTemp + /pages/admin/AdminTemp.jsp + + + + messagePage + /pages/messages.jsp + + + + + + visitorLogon + com.servlet.UserLogon + + visitorLogonPage + /pages/userLogon.jsp + + + + visitorLogon + /visitor/logon + + + + myLogon + com.servlet.MyLogon + + myLogonPage + /pages/myLogon.jsp + + + + myLogon + /my/logon + + + + logoff + com.servlet.LogOff + + logoffPage + /goIndex + + + + logoff + /logoff + + + + userReg + com.servlet.UserServlet + + input + /pages/regBlog.jsp + + + + userReg + /userReg + + + + goIndex + com.servlet.IndexServlet + + showWelcome + /welcome.jsp + + + + goIndex + /goIndex + + + + myBlog + com.servlet.BlogServlet + + + myBlog + /my/admin/goMyBlog + + + + goBlog + com.servlet.BlogServlet + + defaultPage + /view/default.jsp + + + + goBlog + /my/goBlog + + + + myArticle + com.servlet.ArticleServlet + + listShowPage + /pages/article/listShow.jsp + + + singleShowPage + /pages/article/singleShow.jsp + + + adminListPage + /pages/admin/article/listShow.jsp + + + adminSinglePage + /pages/admin/article/singleShow.jsp + + + modifyShowPage + /pages/admin/article/modifyShow.jsp + + + insertShowPage + /pages/admin/article/insertShow.jsp + + + + myArticle + /my/guest/article + + + myArticle + /my/admin/article + + + + myArtReview + com.servlet.ArtReviewServlet + + artrListPage + /pages/article/artReview.jsp + + + adminArtrListPage + /pages/admin/article/artReview.jsp + + + + myArtReview + /my/guest/artReview + + + myArtReview + /my/admin/artReview + + + + myPhoto + com.servlet.PhotoServlet + + listShowPage + /pages/photo/listShow.jsp + + + singleShowPage + /pages/photo/singleShow.jsp + + + adminListPage + /pages/admin/photo/listShow.jsp + + + adminSinglePage + /pages/admin/photo/singleShow.jsp + + + upLoadPage + /pages/admin/photo/upLoad.jsp + + + + myPhoto + /my/guest/photo + + + myPhoto + /my/admin/photo + + + + myMedia + com.servlet.MediaServlet + + ffmpegPath + c:\\ffmpeg.exe + + + listShowPage + /pages/media/listShow.jsp + + + playPage + /pages/media/mediaPlay.jsp + + + adminListPage + /pages/admin/media/listShow.jsp + + + adminPlayPage + /pages/admin/media/mediaPlay.jsp + + + upLoadPage + /pages/admin/media/upLoad.jsp + + + + myMedia + /my/guest/media + + + myMedia + /my/admin/media + + + + myMediaRev + com.servlet.MediaRevServlet + + mediaRlistPage + /pages/media/mediaRev.jsp + + + adminMediaRListPage + /pages/admin/media/mediaRev.jsp + + + + myMediaRev + /my/guest/mediaRev + + + myMediaRev + /my/admin/mediaRev + + + + myFriend + com.servlet.FriendServlet + + listShowPage + /pages/friend/listShow.jsp + + + adminListPage + /pages/admin/friend/listShow.jsp + + + adminSinglePage + /pages/admin/friend/singleShow.jsp + + + + myFriend + /my/guest/friend + + + myFriend + /my/admin/friend + + + + myWord + com.servlet.WordServlet + + leaveWordPage + /pages/word/leaveWord.jsp + + + listShowPage + /pages/word/listShow.jsp + + + + myWord + /my/guest/word + + + myWord + /my/admin/word + + + + myElect + com.servlet.ElectServlet + + adminListPage + /pages/admin/elect/listShow.jsp + + + insertPage + /pages/admin/elect/insertShow.jsp + + + + myElect + /my/admin/elect + + + + myLink + com.servlet.LinkServlet + + adminListPage + /pages/admin/link/listShow.jsp + + + insertPage + /pages/admin/link/insertShow.jsp + + + + myLink + /my/admin/link + + + + + + all + com.filter.AllFilter + + + all + /my/* + + + + needLogon + com.filter.NeedLogonFilter + + + needLogon + /my/admin/* + + diff --git a/15/WebRoot/css/style.css b/15/WebRoot/css/style.css new file mode 100644 index 0000000..93f05fd --- /dev/null +++ b/15/WebRoot/css/style.css @@ -0,0 +1,44 @@ + + \ No newline at end of file diff --git a/15/WebRoot/database/db_mediaBlog_Data.MDF b/15/WebRoot/database/db_mediaBlog_Data.MDF new file mode 100644 index 0000000..230364e Binary files /dev/null and b/15/WebRoot/database/db_mediaBlog_Data.MDF differ diff --git a/15/WebRoot/database/db_mediaBlog_Log.LDF b/15/WebRoot/database/db_mediaBlog_Log.LDF new file mode 100644 index 0000000..e7cae31 Binary files /dev/null and b/15/WebRoot/database/db_mediaBlog_Log.LDF differ diff --git a/15/WebRoot/error.jsp b/15/WebRoot/error.jsp new file mode 100644 index 0000000..683cd3f --- /dev/null +++ b/15/WebRoot/error.jsp @@ -0,0 +1,2 @@ +<%@ page contentType="text/html;charset=gb2312" isErrorPage="true"%> +ûҵӦҳ \ No newline at end of file diff --git a/15/WebRoot/images/adminB.jpg b/15/WebRoot/images/adminB.jpg new file mode 100644 index 0000000..fc8aa1f Binary files /dev/null and b/15/WebRoot/images/adminB.jpg differ diff --git a/15/WebRoot/images/adminIco.jpg b/15/WebRoot/images/adminIco.jpg new file mode 100644 index 0000000..f2b1d15 Binary files /dev/null and b/15/WebRoot/images/adminIco.jpg differ diff --git a/15/WebRoot/images/adminIndexB.jpg b/15/WebRoot/images/adminIndexB.jpg new file mode 100644 index 0000000..d0df758 Binary files /dev/null and b/15/WebRoot/images/adminIndexB.jpg differ diff --git a/15/WebRoot/images/adminT.jpg b/15/WebRoot/images/adminT.jpg new file mode 100644 index 0000000..d414286 Binary files /dev/null and b/15/WebRoot/images/adminT.jpg differ diff --git a/15/WebRoot/images/admin_main.jpg b/15/WebRoot/images/admin_main.jpg new file mode 100644 index 0000000..5889bea Binary files /dev/null and b/15/WebRoot/images/admin_main.jpg differ diff --git a/15/WebRoot/images/admin_top.jpg b/15/WebRoot/images/admin_top.jpg new file mode 100644 index 0000000..4ca05d8 Binary files /dev/null and b/15/WebRoot/images/admin_top.jpg differ diff --git a/15/WebRoot/images/allBack.jpg b/15/WebRoot/images/allBack.jpg new file mode 100644 index 0000000..20e1ecd Binary files /dev/null and b/15/WebRoot/images/allBack.jpg differ diff --git a/15/WebRoot/images/articleB.jpg b/15/WebRoot/images/articleB.jpg new file mode 100644 index 0000000..df47948 Binary files /dev/null and b/15/WebRoot/images/articleB.jpg differ diff --git a/15/WebRoot/images/articleT.jpg b/15/WebRoot/images/articleT.jpg new file mode 100644 index 0000000..42ec523 Binary files /dev/null and b/15/WebRoot/images/articleT.jpg differ diff --git a/15/WebRoot/images/back.jpg b/15/WebRoot/images/back.jpg new file mode 100644 index 0000000..f7be917 Binary files /dev/null and b/15/WebRoot/images/back.jpg differ diff --git a/15/WebRoot/images/defaultB.jpg b/15/WebRoot/images/defaultB.jpg new file mode 100644 index 0000000..3436db7 Binary files /dev/null and b/15/WebRoot/images/defaultB.jpg differ diff --git a/15/WebRoot/images/end.jpg b/15/WebRoot/images/end.jpg new file mode 100644 index 0000000..443f66a Binary files /dev/null and b/15/WebRoot/images/end.jpg differ diff --git a/15/WebRoot/images/exitB.jpg b/15/WebRoot/images/exitB.jpg new file mode 100644 index 0000000..0d2c241 Binary files /dev/null and b/15/WebRoot/images/exitB.jpg differ diff --git a/15/WebRoot/images/friendT.jpg b/15/WebRoot/images/friendT.jpg new file mode 100644 index 0000000..dc6c9c4 Binary files /dev/null and b/15/WebRoot/images/friendT.jpg differ diff --git a/15/WebRoot/images/ico/Thumbs.db b/15/WebRoot/images/ico/Thumbs.db new file mode 100644 index 0000000..c3e069c Binary files /dev/null and b/15/WebRoot/images/ico/Thumbs.db differ diff --git a/15/WebRoot/images/ico/myNull.jpg b/15/WebRoot/images/ico/myNull.jpg new file mode 100644 index 0000000..2aa395f Binary files /dev/null and b/15/WebRoot/images/ico/myNull.jpg differ diff --git a/15/WebRoot/images/indexB.jpg b/15/WebRoot/images/indexB.jpg new file mode 100644 index 0000000..c3845aa Binary files /dev/null and b/15/WebRoot/images/indexB.jpg differ diff --git a/15/WebRoot/images/line.jpg b/15/WebRoot/images/line.jpg new file mode 100644 index 0000000..484cfb5 Binary files /dev/null and b/15/WebRoot/images/line.jpg differ diff --git a/15/WebRoot/images/linkT.jpg b/15/WebRoot/images/linkT.jpg new file mode 100644 index 0000000..2e79a02 Binary files /dev/null and b/15/WebRoot/images/linkT.jpg differ diff --git a/15/WebRoot/images/logonB.jpg b/15/WebRoot/images/logonB.jpg new file mode 100644 index 0000000..c08acbc Binary files /dev/null and b/15/WebRoot/images/logonB.jpg differ diff --git a/15/WebRoot/images/logonBack.jpg b/15/WebRoot/images/logonBack.jpg new file mode 100644 index 0000000..8ba8cb9 Binary files /dev/null and b/15/WebRoot/images/logonBack.jpg differ diff --git a/15/WebRoot/images/mainT.jpg b/15/WebRoot/images/mainT.jpg new file mode 100644 index 0000000..6a7b90c Binary files /dev/null and b/15/WebRoot/images/mainT.jpg differ diff --git a/15/WebRoot/images/mainT1.jpg b/15/WebRoot/images/mainT1.jpg new file mode 100644 index 0000000..b0a9eb4 Binary files /dev/null and b/15/WebRoot/images/mainT1.jpg differ diff --git a/15/WebRoot/images/media/Thumbs.db b/15/WebRoot/images/media/Thumbs.db new file mode 100644 index 0000000..b8bd0d7 Binary files /dev/null and b/15/WebRoot/images/media/Thumbs.db differ diff --git a/15/WebRoot/images/media/null.jpg b/15/WebRoot/images/media/null.jpg new file mode 100644 index 0000000..9e0a784 Binary files /dev/null and b/15/WebRoot/images/media/null.jpg differ diff --git a/15/WebRoot/images/mediaB.jpg b/15/WebRoot/images/mediaB.jpg new file mode 100644 index 0000000..79b944a Binary files /dev/null and b/15/WebRoot/images/mediaB.jpg differ diff --git a/15/WebRoot/images/menuT.jpg b/15/WebRoot/images/menuT.jpg new file mode 100644 index 0000000..72f77b4 Binary files /dev/null and b/15/WebRoot/images/menuT.jpg differ diff --git a/15/WebRoot/images/menuTB.jpg b/15/WebRoot/images/menuTB.jpg new file mode 100644 index 0000000..9105fe0 Binary files /dev/null and b/15/WebRoot/images/menuTB.jpg differ diff --git a/15/WebRoot/images/moreB.jpg b/15/WebRoot/images/moreB.jpg new file mode 100644 index 0000000..919a5e1 Binary files /dev/null and b/15/WebRoot/images/moreB.jpg differ diff --git a/15/WebRoot/images/myBack.jpg b/15/WebRoot/images/myBack.jpg new file mode 100644 index 0000000..fcd5754 Binary files /dev/null and b/15/WebRoot/images/myBack.jpg differ diff --git a/15/WebRoot/images/myBlog.jpg b/15/WebRoot/images/myBlog.jpg new file mode 100644 index 0000000..49b3803 Binary files /dev/null and b/15/WebRoot/images/myBlog.jpg differ diff --git a/15/WebRoot/images/myIco1.jpg b/15/WebRoot/images/myIco1.jpg new file mode 100644 index 0000000..6675ee3 Binary files /dev/null and b/15/WebRoot/images/myIco1.jpg differ diff --git a/15/WebRoot/images/myIco2.jpg b/15/WebRoot/images/myIco2.jpg new file mode 100644 index 0000000..3893ce0 Binary files /dev/null and b/15/WebRoot/images/myIco2.jpg differ diff --git a/15/WebRoot/images/myT.jpg b/15/WebRoot/images/myT.jpg new file mode 100644 index 0000000..6f2b82b Binary files /dev/null and b/15/WebRoot/images/myT.jpg differ diff --git a/15/WebRoot/images/photo/Thumbs.db b/15/WebRoot/images/photo/Thumbs.db new file mode 100644 index 0000000..d354146 Binary files /dev/null and b/15/WebRoot/images/photo/Thumbs.db differ diff --git a/15/WebRoot/images/photo/null.jpg b/15/WebRoot/images/photo/null.jpg new file mode 100644 index 0000000..6d38569 Binary files /dev/null and b/15/WebRoot/images/photo/null.jpg differ diff --git a/15/WebRoot/images/photoB.jpg b/15/WebRoot/images/photoB.jpg new file mode 100644 index 0000000..bc6ee8c Binary files /dev/null and b/15/WebRoot/images/photoB.jpg differ diff --git a/15/WebRoot/images/regBlog.jpg b/15/WebRoot/images/regBlog.jpg new file mode 100644 index 0000000..8f9cd39 Binary files /dev/null and b/15/WebRoot/images/regBlog.jpg differ diff --git a/15/WebRoot/images/resetB.jpg b/15/WebRoot/images/resetB.jpg new file mode 100644 index 0000000..2213f8f Binary files /dev/null and b/15/WebRoot/images/resetB.jpg differ diff --git a/15/WebRoot/images/titleL.jpg b/15/WebRoot/images/titleL.jpg new file mode 100644 index 0000000..6a95c2a Binary files /dev/null and b/15/WebRoot/images/titleL.jpg differ diff --git a/15/WebRoot/images/titleR.jpg b/15/WebRoot/images/titleR.jpg new file mode 100644 index 0000000..707725b Binary files /dev/null and b/15/WebRoot/images/titleR.jpg differ diff --git a/15/WebRoot/images/top.jpg b/15/WebRoot/images/top.jpg new file mode 100644 index 0000000..53b3ab3 Binary files /dev/null and b/15/WebRoot/images/top.jpg differ diff --git a/15/WebRoot/images/topT.jpg b/15/WebRoot/images/topT.jpg new file mode 100644 index 0000000..dfd02d6 Binary files /dev/null and b/15/WebRoot/images/topT.jpg differ diff --git a/15/WebRoot/images/wordB.jpg b/15/WebRoot/images/wordB.jpg new file mode 100644 index 0000000..41a61e2 Binary files /dev/null and b/15/WebRoot/images/wordB.jpg differ diff --git a/15/WebRoot/index.jsp b/15/WebRoot/index.jsp new file mode 100644 index 0000000..80c8a0e --- /dev/null +++ b/15/WebRoot/index.jsp @@ -0,0 +1,2 @@ +<%@ page contentType="text/html;charset=gb2312"%> + \ No newline at end of file diff --git a/15/WebRoot/js/inputCheck.js b/15/WebRoot/js/inputCheck.js new file mode 100644 index 0000000..5ab6aa0 --- /dev/null +++ b/15/WebRoot/js/inputCheck.js @@ -0,0 +1,14 @@ +var init; +function check(fieldName,UseName,RemName,len){ + if(fieldName.value.length>len){ + fieldName.value=init; + alert(" "+len+" ַ"); + return false; + } + else{ + init=fieldName.value; + UseName.value=eval(fieldName.value.length); + RemName.value=len-UseName.value; + return true; + } +} diff --git a/15/WebRoot/js/showTime.js b/15/WebRoot/js/showTime.js new file mode 100644 index 0000000..1279564 --- /dev/null +++ b/15/WebRoot/js/showTime.js @@ -0,0 +1,13 @@ +function showTime(showWhere){ + var now=new Date(); + var hour=now.getHours(); + var minu=now.getMinutes(); + var sec=now.getSeconds(); + + if(hour<10) hour="0"+hour; + if(minu<10) minu="0"+minu; + if(sec<10) sec="0"+sec; + + showWhere.value=hour+":"+minu+":"+sec; + setTimeout("showTime(time)",1000) +} diff --git a/15/WebRoot/pages/admin/AdminTemp.jsp b/15/WebRoot/pages/admin/AdminTemp.jsp new file mode 100644 index 0000000..2bfcd20 --- /dev/null +++ b/15/WebRoot/pages/admin/AdminTemp.jsp @@ -0,0 +1,27 @@ +<%@ page contentType="text/html; charset=gb2312"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; + String mainPage=(String)request.getAttribute("mainPage"); + if(mainPage==null||mainPage.equals("")) + mainPage="default.jsp"; +%> + + + ý岩-̨ + + + + +
    + + + + + + + +
    <%@ include file="top.jsp" %>
    <%@ include file="end.jsp" %>
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/admin/article/artReview.jsp b/15/WebRoot/pages/admin/article/artReview.jsp new file mode 100644 index 0000000..50b30b4 --- /dev/null +++ b/15/WebRoot/pages/admin/article/artReview.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + 后台-查看文章所有评论 + + + + +
    +
    + + + +
    ☆★☆ 该文章目前没有任何评论!☆★☆
    +
    + + + + + + + + + + + + + + + + + + +
    文章所有评论【共${cpage.allR}条】 +
    ${single.artRAuthor}${(cpage.currentP-1)*cpage.perR+(st.index+1)} 楼
    ${single.artRTime}
    ${single.artRContent}
    删除评论

    +
    +
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/admin/article/insertShow.jsp b/15/WebRoot/pages/admin/article/insertShow.jsp new file mode 100644 index 0000000..74c5775 --- /dev/null +++ b/15/WebRoot/pages/admin/article/insertShow.jsp @@ -0,0 +1,31 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + + +
    + + + + + + + + + + + + + + + +
    文章标题:
    文章内容: + + 写入: 个   + 剩余: 个  + +
    + + +
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/article/listShow.jsp b/15/WebRoot/pages/admin/article/listShow.jsp new file mode 100644 index 0000000..ab033a4 --- /dev/null +++ b/15/WebRoot/pages/admin/article/listShow.jsp @@ -0,0 +1,27 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    ☆★☆ 博主暂时没有发表任何文章!☆★☆
    + + + + + + + + + + + + + + + + +
    【我的文章 共${requestScope.createPage.allR}篇】
    ${single.artPubTime} + 【√修改】 + 【×删除】 +

    + +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/article/modifyShow.jsp b/15/WebRoot/pages/admin/article/modifyShow.jsp new file mode 100644 index 0000000..73710fb --- /dev/null +++ b/15/WebRoot/pages/admin/article/modifyShow.jsp @@ -0,0 +1,37 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + + +
  • 对不起,阅读文章失败!
  • + + +
    + + + + + + + + + + + + + + + + + +
    阅读:${single.artCount} 次 | 评论:${single.revCount} 条 | 发表于:${single.artPubTime} 
    文章标题:
    文章内容: + + 写入: 个   + 剩余: 个  + +
    + + +
    +
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/article/singleShow.jsp b/15/WebRoot/pages/admin/article/singleShow.jsp new file mode 100644 index 0000000..292785b --- /dev/null +++ b/15/WebRoot/pages/admin/article/singleShow.jsp @@ -0,0 +1,39 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
  • 对不起,阅读文章失败!
  • + + + + + + + + + + +
    阅读:${single.artCount} 次 | 评论:${single.revCount} 条 | 发表于:${single.artPubTime}
    + + 【修改文章】 + 【删除文章】 + 【查看评论】 +

    + + + + + + + + + + + + + + + + +
    最新评论
  • 该文章目前没有任何评论!
  • ${rsingle.artRAuthor}
    ${rsingle.artRTime}
    ${rsingle.artRContent}

    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/default.jsp b/15/WebRoot/pages/admin/default.jsp new file mode 100644 index 0000000..89f97e8 --- /dev/null +++ b/15/WebRoot/pages/admin/default.jsp @@ -0,0 +1,6 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + + +
    diff --git a/15/WebRoot/pages/admin/elect/insertShow.jsp b/15/WebRoot/pages/admin/elect/insertShow.jsp new file mode 100644 index 0000000..c04e860 --- /dev/null +++ b/15/WebRoot/pages/admin/elect/insertShow.jsp @@ -0,0 +1,21 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    + + + + + + + + + + + +
    文章标题:
    文章地址:
    + + +
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/elect/listShow.jsp b/15/WebRoot/pages/admin/elect/listShow.jsp new file mode 100644 index 0000000..663f16c --- /dev/null +++ b/15/WebRoot/pages/admin/elect/listShow.jsp @@ -0,0 +1,24 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +

    ☆★☆ 博主暂时没有推荐任何文章!☆★☆
    + + + + + + + + + + + + + + +
    【推荐文章】
    + ${single.electTime} + 【×删除】 +
    地址:${single.electSrc}

    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/end.jsp b/15/WebRoot/pages/admin/end.jsp new file mode 100644 index 0000000..3839bf0 --- /dev/null +++ b/15/WebRoot/pages/admin/end.jsp @@ -0,0 +1,4 @@ + + +
    + diff --git a/15/WebRoot/pages/admin/friend/listShow.jsp b/15/WebRoot/pages/admin/friend/listShow.jsp new file mode 100644 index 0000000..48775b4 --- /dev/null +++ b/15/WebRoot/pages/admin/friend/listShow.jsp @@ -0,0 +1,29 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    ☆★☆ 博主目前没有添加任何好友!☆★☆
    + + + + + + + + + + + + + + + + + + + + + + +
    我的所有好友
    好友姓名好友博客访问次数操作
     次【删除】
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/friend/singleShow.jsp b/15/WebRoot/pages/admin/friend/singleShow.jsp new file mode 100644 index 0000000..527b019 --- /dev/null +++ b/15/WebRoot/pages/admin/friend/singleShow.jsp @@ -0,0 +1,75 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + 鿴ϸ + + + + +
    +
    + + + +
    Բ𣬲鿴ʧܣ
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ϡ
  • 鿴ʧܣ
  • ͷ
    Ա
    OICQ
    E-mail
    ԣ
    ͣ
    ǩ
    ʱ䣺
    ʴ
    +
    +
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/admin/left.jsp b/15/WebRoot/pages/admin/left.jsp new file mode 100644 index 0000000..b7bc832 --- /dev/null +++ b/15/WebRoot/pages/admin/left.jsp @@ -0,0 +1,29 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + + + + + + + + + + + + + + + + + + + + + + + + + +
    文章管理
    浏览文章
    发表文章
    相册管理
    浏览相册
    上传图片
    影音管理
    浏览影音
    上传影音
    推荐文章
    浏览推荐文章
    添加推荐文章
    好友管理
    浏览好友
    友情链接
    浏览友情链接
    添加友情链接
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/link/insertShow.jsp b/15/WebRoot/pages/admin/link/insertShow.jsp new file mode 100644 index 0000000..5ca63e4 --- /dev/null +++ b/15/WebRoot/pages/admin/link/insertShow.jsp @@ -0,0 +1,21 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    + + + + + + + + + + + +
    链接标题:
    链接地址:
    + + +
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/link/listShow.jsp b/15/WebRoot/pages/admin/link/listShow.jsp new file mode 100644 index 0000000..1257ff0 --- /dev/null +++ b/15/WebRoot/pages/admin/link/listShow.jsp @@ -0,0 +1,24 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    ☆★☆ 博主暂时没有添加任何友情链接!☆★☆
    + + + + + + + + + + + + + + +
    【友情链接】
    + ${single.linkTime} + 【×删除】 +
    地址:${single.linkSrc}

    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/media/listShow.jsp b/15/WebRoot/pages/admin/media/listShow.jsp new file mode 100644 index 0000000..f5868d9 --- /dev/null +++ b/15/WebRoot/pages/admin/media/listShow.jsp @@ -0,0 +1,34 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    ☆★☆ 博主暂时没有上传任何视频!☆★☆
    + + + + + + + + + + + + + + +
    【我的影音 共 ${requestScope.createPage.allR} 个】
    + + +
    没有视频预览


    +
    + + + 观:${single.lookCount}
    + 评:${single.reviCount}
    + 题:${single.subMediaTitle}
    + 【删除影音】 +
    +

    + +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/media/mediaPlay.jsp b/15/WebRoot/pages/admin/media/mediaPlay.jsp new file mode 100644 index 0000000..457e205 --- /dev/null +++ b/15/WebRoot/pages/admin/media/mediaPlay.jsp @@ -0,0 +1,56 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + +
    ☆★☆ 对不起,播放视频失败!☆★☆
    + + + + + + + + + + + + + + + + +
    正在播放视频:
    + + + + + 【视频信息】
    + 观看:

    + 评论:

    + 上传时间:


    + 【查看评论】

    + 【删除视频】 +
    【返回】
    视频介绍:
    + + + + + + + + + + + + + + + + +
    最新评论
  • 该视频目前没有任何评论!
  • ${rsingle.mediaRAuthor}
    ${rsingle.mediaRTime}
    ${rsingle.mediaRContent}
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/media/mediaRev.jsp b/15/WebRoot/pages/admin/media/mediaRev.jsp new file mode 100644 index 0000000..e5b7922 --- /dev/null +++ b/15/WebRoot/pages/admin/media/mediaRev.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + 查看视频所有评论 + + + + +
    +
    + + + +
    ☆★☆ 该视频目前没有任何评论!☆★☆
    +
    + + + + + + + + + + + + + + + + + + + +
    视频所有评论 【共${cpage.allR}条】
    ${single.mediaRAuthor}${(cpage.currentP-1)*cpage.perR+(st.index+1)} 楼
    ${single.mediaRTime}
    ${single.mediaRContent}
    删除评论

    +
    +
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/admin/media/upLoad.jsp b/15/WebRoot/pages/admin/media/upLoad.jsp new file mode 100644 index 0000000..dc3c0e1 --- /dev/null +++ b/15/WebRoot/pages/admin/media/upLoad.jsp @@ -0,0 +1,27 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    + + + + + + + + + + + + + + + + + +
    选择视频:
    视频标题:
    视频描述:
    + + +
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/photo/listShow.jsp b/15/WebRoot/pages/admin/photo/listShow.jsp new file mode 100644 index 0000000..e511159 --- /dev/null +++ b/15/WebRoot/pages/admin/photo/listShow.jsp @@ -0,0 +1,32 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    ☆★☆ 博主暂时没有上传任何图片!☆★☆
    + + + + + + + + + + + + + + +
    【我的相册 共 ${requestScope.createPage.allR} 张】
    + + +
    没有图片预览 +
    + + + ${single.subPhotoInfo}
    + 【删除】 +
    +

    + +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/photo/singleShow.jsp b/15/WebRoot/pages/admin/photo/singleShow.jsp new file mode 100644 index 0000000..b9a032b --- /dev/null +++ b/15/WebRoot/pages/admin/photo/singleShow.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + +
    ☆★☆ 对不起,查看图片详细信息失败!☆★☆
    + + + + + + + + + + + +
    + + + 上传时间:


    + 【删除图片】 +
    【返回】

    图片介绍:
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/photo/upLoad.jsp b/15/WebRoot/pages/admin/photo/upLoad.jsp new file mode 100644 index 0000000..d4bf893 --- /dev/null +++ b/15/WebRoot/pages/admin/photo/upLoad.jsp @@ -0,0 +1,23 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    + + + + + + + + + + + + + +
    选择文件:
    文件描述:
    + + +
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/admin/top.jsp b/15/WebRoot/pages/admin/top.jsp new file mode 100644 index 0000000..df5a42f --- /dev/null +++ b/15/WebRoot/pages/admin/top.jsp @@ -0,0 +1,19 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> + + + + + + + + + +
    + +
    --- + ͡ +
    + + +
    \ No newline at end of file diff --git a/15/WebRoot/pages/article/artReview.jsp b/15/WebRoot/pages/article/artReview.jsp new file mode 100644 index 0000000..ef770f2 --- /dev/null +++ b/15/WebRoot/pages/article/artReview.jsp @@ -0,0 +1,41 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + 查看文章所有评论 + + + + +
    +
    + + + +
    ☆★☆ 该文章目前没有任何评论!☆★☆
    +
    + + + + + + + + + + + + + + + +
    文章所有评论【共${cpage.allR}条】
    ${single.artRAuthor}${(cpage.currentP-1)*cpage.perR+(st.index+1)} 楼
    ${single.artRTime}
    ${single.artRContent}

    +
    +
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/article/listShow.jsp b/15/WebRoot/pages/article/listShow.jsp new file mode 100644 index 0000000..201debb --- /dev/null +++ b/15/WebRoot/pages/article/listShow.jsp @@ -0,0 +1,24 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    ☆★☆ 博主暂时没有发表任何文章!☆★☆
    + + + + + + + + + + + + + + +
    【我的文章 共${requestScope.createPage.allR}篇】
    ${single.artPubTime} 
    阅读全文 + 阅读:${single.artCount} 次 | 评论:${single.revCount} +

    + +
    \ No newline at end of file diff --git a/15/WebRoot/pages/article/singleShow.jsp b/15/WebRoot/pages/article/singleShow.jsp new file mode 100644 index 0000000..d1f8c19 --- /dev/null +++ b/15/WebRoot/pages/article/singleShow.jsp @@ -0,0 +1,60 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + + +
    ☆★☆ 对不起,阅读文章失败!☆★☆
    + + + + + + + +
    阅读:${single.artCount} 次 | 评论:${single.revCount} 条 | 发表于:${single.artPubTime}
    文章结束
    + + + + + + + + + + + + + + + + +
    最新评论
  • 该文章目前没有任何评论!
  • ${rsingle.artRAuthor}
    ${rsingle.artRTime}
    ${rsingle.artRContent}
    + +
    + + + + + + + + + + + + + + +
    发表评论匿名发表:
    + + 写入: 个   + 剩余: 个 +            + 评论请先【登录】,您也可以选中 匿名发表 无需登录进行发表! + +
    + + +
    +
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/friend/listShow.jsp b/15/WebRoot/pages/friend/listShow.jsp new file mode 100644 index 0000000..a734cf1 --- /dev/null +++ b/15/WebRoot/pages/friend/listShow.jsp @@ -0,0 +1,42 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + 查看我的所有好友 + + + + +
    +
    + + + +
    ☆★☆ 博主目前没有添加任何好友!☆★☆
    +
    + + + + + + + + + + + + + + + + +
    我的所有好友
    姓名博客访问
    +
    +
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/getRegForm.jsp b/15/WebRoot/pages/getRegForm.jsp new file mode 100644 index 0000000..74ac1dd --- /dev/null +++ b/15/WebRoot/pages/getRegForm.jsp @@ -0,0 +1,11 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<% + response.addHeader("Pragma","No-cache"); + response.addHeader("Cache-Control","no-cache"); + response.addDateHeader("Expires",1); + request.setCharacterEncoding("gb2312"); +%> + + + + \ No newline at end of file diff --git a/15/WebRoot/pages/media/listShow.jsp b/15/WebRoot/pages/media/listShow.jsp new file mode 100644 index 0000000..76745b4 --- /dev/null +++ b/15/WebRoot/pages/media/listShow.jsp @@ -0,0 +1,31 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    ☆★☆ 博主暂时没有上传任何视频!☆★☆
    + + + + + + + + + + +
    【我的影音 共 ${requestScope.createPage.allR} 个】
    + + +
    没有视频预览

    +
    + + + + 观:${single.lookCount}
    + 评:${single.reviCount}
    + 题:${single.subMediaTitle} +
    +
    +
    + +
    \ No newline at end of file diff --git a/15/WebRoot/pages/media/mediaPlay.jsp b/15/WebRoot/pages/media/mediaPlay.jsp new file mode 100644 index 0000000..de7b0ab --- /dev/null +++ b/15/WebRoot/pages/media/mediaPlay.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + +
    ☆★☆ 对不起,播放视频失败!☆★☆
    + + + + + + + + + + + + + + + +
    正在播放视频:
    + + + + + 【视频信息】
    + 观看:

    + 评论:

    + 上传时间:
    +
    视频介绍:
    + + + + + + + + + + + + + + + + +
    最新评论
  • 该视频目前没有任何评论!
  • ${rsingle.mediaRAuthor}
    ${rsingle.mediaRTime}
    ${rsingle.mediaRContent}

    + +
    + + + + + + + + + + + + + + + +
    留言请先【登录】,您也可以选中 匿名留言 无需登录发表评论!
    发表评论匿名发表:
    + 评论内容:          + + 写入: 个   + 剩余: 个 + +
    + + +
    +
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/media/mediaRev.jsp b/15/WebRoot/pages/media/mediaRev.jsp new file mode 100644 index 0000000..1b537ce --- /dev/null +++ b/15/WebRoot/pages/media/mediaRev.jsp @@ -0,0 +1,41 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + 查看视频所有评论 + + + + +
    +
    + + + +
    ☆★☆ 该视频目前没有任何评论!☆★☆
    +
    + + + + + + + + + + + + + + + +
    视频所有评论 共【${cpage.allR}】条
    ${single.mediaRAuthor}${(cpage.currentP-1)*cpage.perR+(st.index+1)} 楼
    ${single.mediaRTime}
    ${single.mediaRContent}

    +
    +
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/media/videos/player.swf b/15/WebRoot/pages/media/videos/player.swf new file mode 100644 index 0000000..d813b4b Binary files /dev/null and b/15/WebRoot/pages/media/videos/player.swf differ diff --git a/15/WebRoot/pages/messages.jsp b/15/WebRoot/pages/messages.jsp new file mode 100644 index 0000000..9b88426 --- /dev/null +++ b/15/WebRoot/pages/messages.jsp @@ -0,0 +1,37 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> +<% + response.addHeader("Pragma","No-cache"); + response.addHeader("Cache-Control","no-cache"); + response.addDateHeader("Expires",1); + + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + Ϣʾ + + + + +
    +
    + + + + +
    + + +
  • ʧܣԱϵ
  • + ء +
    + + + +
    +
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/myInfo.jsp b/15/WebRoot/pages/myInfo.jsp new file mode 100644 index 0000000..a6ff3ac --- /dev/null +++ b/15/WebRoot/pages/myInfo.jsp @@ -0,0 +1,72 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> +<% + response.addHeader("Pragma","No-cache"); + response.addHeader("Cache-Control","no-cache"); + response.addDateHeader("Expires",1); + + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + +
    +
    + + + +
    Բ𣬲鿴ʧܣ
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ϡ
    ͷ
    Ա
    OICQ
    E-mail
    ԣ
    ͣ
    ǩ
    ʱ䣺
    ʴ
    +
    +
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/myLogon.jsp b/15/WebRoot/pages/myLogon.jsp new file mode 100644 index 0000000..711024e --- /dev/null +++ b/15/WebRoot/pages/myLogon.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + ¼ + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + +
    û
      룺
    + + +
    +
    + +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/page.jsp b/15/WebRoot/pages/page.jsp new file mode 100644 index 0000000..f42a0b0 --- /dev/null +++ b/15/WebRoot/pages/page.jsp @@ -0,0 +1,9 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> +
    + + + + + +
    +
    diff --git a/15/WebRoot/pages/photo/bigShow.jsp b/15/WebRoot/pages/photo/bigShow.jsp new file mode 100644 index 0000000..a60720d --- /dev/null +++ b/15/WebRoot/pages/photo/bigShow.jsp @@ -0,0 +1,7 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + +
    \ No newline at end of file diff --git a/15/WebRoot/pages/photo/listShow.jsp b/15/WebRoot/pages/photo/listShow.jsp new file mode 100644 index 0000000..186599f --- /dev/null +++ b/15/WebRoot/pages/photo/listShow.jsp @@ -0,0 +1,27 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + +
    ☆★☆ 博主暂时没有上传任何图片!☆★☆
    + + + + + + + + + + +
    【我的相册 共 ${requestScope.createPage.allR} 张】
    + + + 没有图片预览 + + + + ${single.subPhotoInfo} + +
    + +
    \ No newline at end of file diff --git a/15/WebRoot/pages/photo/singleShow.jsp b/15/WebRoot/pages/photo/singleShow.jsp new file mode 100644 index 0000000..c07a296 --- /dev/null +++ b/15/WebRoot/pages/photo/singleShow.jsp @@ -0,0 +1,19 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + +
    ☆★☆ 对不起,查看图片详细信息失败!☆★☆
    + + + + + + + + + + + +
    + + 上传时间:
    【返回】

    图片介绍:
    +
    \ No newline at end of file diff --git a/15/WebRoot/pages/regBlog.jsp b/15/WebRoot/pages/regBlog.jsp new file mode 100644 index 0000000..1fe86b6 --- /dev/null +++ b/15/WebRoot/pages/regBlog.jsp @@ -0,0 +1,90 @@ +<%@ page language="java" contentType="text/html; charset=GBK"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + עᲩ + + + + +
    +
    + + + + + + +
    дϡ
    +
    + + + + + + + + + + +
    ͷߴ磺237*140

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ȷ룺
    Ա + + Ů +
    OICQ
    E-mail
    ƣ
    ǩ
    ԣ
    + + +
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/userLogon.jsp b/15/WebRoot/pages/userLogon.jsp new file mode 100644 index 0000000..224d5e5 --- /dev/null +++ b/15/WebRoot/pages/userLogon.jsp @@ -0,0 +1,34 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + û¼ + + + + +
    + + + + + + + + + + + + +
    û
      룺
    + + + رձҳ +
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/pages/word/leaveWord.jsp b/15/WebRoot/pages/word/leaveWord.jsp new file mode 100644 index 0000000..6928d23 --- /dev/null +++ b/15/WebRoot/pages/word/leaveWord.jsp @@ -0,0 +1,51 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + + + + + +
    留言请先【登录】,您也可以选中 匿名留言 无需登录进行留言!
    + +
    + + + + + + + + + + + + + +
    【我要留言】匿名留言:
    + + 写入: 个   + 剩余: 个 + +
    + + +
    +
    + + + + + + + + + + + + + + + + +
    最新留言
  • 目前没有任何留言!
  • ${single.wordAuthor}
    ${single.wordTime}
    \ No newline at end of file diff --git a/15/WebRoot/pages/word/listShow.jsp b/15/WebRoot/pages/word/listShow.jsp new file mode 100644 index 0000000..a4c752d --- /dev/null +++ b/15/WebRoot/pages/word/listShow.jsp @@ -0,0 +1,38 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + 查看所有留言 + + + + +
    +
    + + + +
    ☆★☆ 目前没有任何留言!☆★☆
    +
    + + + + + + + + + + + + +
    查看所有留言【共${cpage.allR}条】
    ${single.wordAuthor}
    ${single.wordTime}

    +
    +
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/view/IndexTemp.jsp b/15/WebRoot/view/IndexTemp.jsp new file mode 100644 index 0000000..2ce397c --- /dev/null +++ b/15/WebRoot/view/IndexTemp.jsp @@ -0,0 +1,38 @@ +<%@ page contentType="text/html; charset=gb2312"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; + String mainPage=(String)request.getAttribute("mainPage"); + if(mainPage==null||mainPage.equals("")) + mainPage="default.jsp"; +%> + + + ý岩 + + + + + <%--
    + + + + + + + +
    <%@ include file="top.jsp" %>
    <%@ include file="end.jsp" %>
    +
    + --%>
    + + + + + + + +
    <%@ include file="top.jsp" %>
    <%@ include file="end.jsp" %>
    +
    + + \ No newline at end of file diff --git a/15/WebRoot/view/default.jsp b/15/WebRoot/view/default.jsp new file mode 100644 index 0000000..9dd2b95 --- /dev/null +++ b/15/WebRoot/view/default.jsp @@ -0,0 +1,93 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + + + + + + + + + + + + + + + + + + + + +
  • 暂时没有上传任何视频!
  • 【我的最新影音】
    + + +
    没有视频预览
    +
    + + + +
    ${mediaBean.subMediaTitle}
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    【我的最新文章】
  • 暂时没有发表任何文章!
  • 【我的最新文章】
    阅读全文阅读:${articleBean.artCount} 次 | 评论:${articleBean.revCount} | 发表于:${articleBean.artPubTime}

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    【我的相册】
  • 暂时没有上传图片!
  • 【我的相册】
    + + 没有图片预览 + + + ${photoBean.subPhotoInfo} +
    \ No newline at end of file diff --git a/15/WebRoot/view/end.jsp b/15/WebRoot/view/end.jsp new file mode 100644 index 0000000..15fdb38 --- /dev/null +++ b/15/WebRoot/view/end.jsp @@ -0,0 +1,4 @@ + + +
    + diff --git a/15/WebRoot/view/left.jsp b/15/WebRoot/view/left.jsp new file mode 100644 index 0000000..7e85f32 --- /dev/null +++ b/15/WebRoot/view/left.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> + + + + + + + + + +
    + 【加为好友】 + 【给我留言】 +
    + + + + + + + + + + + + + + + +
    ■活动地带
    ☆个人资料☆管理博客
    ☆我的文章☆我的相册
    ☆我的影音☆给我留言
    + + + + + + + + + + + + + +
  • 没有推荐文章!
  • + + + + + + + + + + + + + + + + + +
    ■好友博客更多
  • 博主目前没有添加任何好友!
  • + + + + + + + + + + + + + + +
  • 没有友情链接!
  • + + + + + + + + + + + + + + + +
    ■访问排行榜前10名 
    次 
    +
    \ No newline at end of file diff --git a/15/WebRoot/view/showTime.jsp b/15/WebRoot/view/showTime.jsp new file mode 100644 index 0000000..a826720 --- /dev/null +++ b/15/WebRoot/view/showTime.jsp @@ -0,0 +1,23 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ page import="java.util.Date" %> + +<% + //ȡڲ˵еʱ + String[] weekdays={"","","һ","","","","",""}; + String[] days=new String[42]; + for(int i=0;i<42;i++) + days[i]=""; + + Date currentDay = new Date(); + int year=1900+currentDay.getYear(); + int month=currentDay.getMonth(); + int today=currentDay.getDate(); + int weekday=currentDay.getDay()+1; + + String now=year+""+(month+1)+""+today+""+" "+weekdays[weekday]; +%> + + + <%=now %> + + \ No newline at end of file diff --git a/15/WebRoot/view/top.jsp b/15/WebRoot/view/top.jsp new file mode 100644 index 0000000..f03f00b --- /dev/null +++ b/15/WebRoot/view/top.jsp @@ -0,0 +1,33 @@ +<%@ page language="java" contentType="text/html; charset=gb2312"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> + + + + + + + + + + + + + + + + + + +
    + +
    --- + ͡ +
    + + + ߵ¼ + + + ӭ + + <%@ include file="showTime.jsp" %>

    \ No newline at end of file diff --git a/15/WebRoot/welcome.jsp b/15/WebRoot/welcome.jsp new file mode 100644 index 0000000..a1579ed --- /dev/null +++ b/15/WebRoot/welcome.jsp @@ -0,0 +1,49 @@ +<%@ page contentType="text/html;charset=gb2312"%> +<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + в + + + + +
    +
    + + + +
    Բ𣡸÷вκβͣ
    +
    + + + + + + + + + + + + + + + + + + + + +
    + + +

    ʱ
    ${single.userBlogName}${single.userName}${single.userCTTime}
    +
    +
    +
    + + \ No newline at end of file diff --git a/15/src/com/dao/ArtReviewDao.java b/15/src/com/dao/ArtReviewDao.java new file mode 100644 index 0000000..c1f4cb8 --- /dev/null +++ b/15/src/com/dao/ArtReviewDao.java @@ -0,0 +1,71 @@ +package com.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.toolsBean.Change; +import com.toolsBean.DB; +import com.valueBean.ArtReviewSingle; +public class ArtReviewDao extends SuperDao{ + public List getNewReviewList(int id) throws SQLException{ + int top=5; + Object[] params={id}; + String sql="SELECT TOP "+top+" * FROM tb_articleR WHERE artReview_rootId=? ORDER BY artReview_time DESC"; + List artrlist=getList(sql,params); + + return artrlist; + } + + public List getMoreReviewList(int id,String showPage,String goWhich) throws SQLException{ + String sqlall="select * from tb_articleR where artReview_rootId=?"; + Object[] params={id}; + + setPerR(5); + createPage(sqlall,params,showPage,goWhich); + + int currentP=getPage().getCurrentP(); + int top1=getPage().getPerR(); + int top2=(currentP-1)*top1; + String sql=""; + if(currentP<=1) + sql="SELECT TOP "+top1+" * FROM tb_articleR WHERE artReview_rootId=? ORDER BY artReview_time"; + else + sql="SELECT TOP "+top1+" * FROM tb_articleR i WHERE (artReview_rootId = ?) AND (artReview_time > (SELECT MAX(artReview_time) FROM (SELECT TOP "+top2+" * FROM tb_articleR WHERE artReview_rootId = i.artReview_rootId ORDER BY artReview_time) AS maxv)) ORDER BY artReview_time"; + + List artrlist=getList(sql,params); + return artrlist; + } + private List getList(String sql,Object[] params) throws SQLException{ + List list=null; + DB mydb=new DB(); + mydb.doPstm(sql, params); + ResultSet rs=mydb.getRs(); + if(rs!=null){ + list=new ArrayList(); + while(rs.next()){ + ArtReviewSingle single=new ArtReviewSingle(); + single.setId(rs.getInt(1)); + single.setArtRRootId(rs.getInt(2)); + single.setArtRAuthor(rs.getString(3)); + single.setArtRContent(rs.getString(4)); + single.setArtRTime(Change.dateTimeChange(rs.getTimestamp(5))); + list.add(single); + } + } + return list; + } + public void insert(Object[] params) throws SQLException{ + String sql="insert into tb_articleR values(?,?,?,?)"; + DB mydb=new DB(); + mydb.doPstm(sql, params); + } + public int delete(int id) throws SQLException{ + String sql="delete from tb_articleR where id=?"; + DB mydb=new DB(); + mydb.doPstm(sql, new Object[]{id}); + int i=mydb.getCount(); + return i; + } +} diff --git a/15/src/com/dao/ArticleDao.java b/15/src/com/dao/ArticleDao.java new file mode 100644 index 0000000..947dc39 --- /dev/null +++ b/15/src/com/dao/ArticleDao.java @@ -0,0 +1,144 @@ +package com.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.toolsBean.Change; +import com.toolsBean.DB; +import com.valueBean.ArticleSingle; + +public class ArticleDao extends SuperDao{ + /** + * @ܣȡڸҳʾ + */ + public List getDefaultArticle(int id) throws SQLException{ + String sql="select top 4 * from tb_article where art_whoId=? order by art_pubTime desc"; + Object[] params={id}; + List articlelist=getList(sql,params); + return articlelist; + } + /** + * @ܣȡǰҳʾ + */ + public List getListArticle(int id,String showPage,String goWhich) throws SQLException{ + String sqlall="select * from tb_article where art_whoId=?"; + Object[] params={id}; + + setPerR(5); + createPage(sqlall,params,showPage,goWhich); + + int currentP=getPage().getCurrentP(); + int top1=getPage().getPerR(); + int top2=(currentP-1)*top1; + String sql=""; + if(currentP<=1) + sql="SELECT TOP "+top1+" * FROM tb_article WHERE art_whoid=? ORDER BY art_pubtime DESC"; + else + sql="SELECT TOP "+top1+" * FROM tb_article i WHERE (art_whoId = ?) AND (art_pubTime < (SELECT MIN(art_pubTime) FROM (SELECT TOP "+top2+" * FROM tb_article WHERE art_whoId = i.art_whoId ORDER BY art_pubTime DESC) AS minv)) ORDER BY art_pubTime DESC"; + + List articlelist=getList(sql,params); + return articlelist; + } + /** + * @ܣȡϸ + */ + public ArticleSingle getSingleArticle(int id) throws SQLException{ + String sql="select * from tb_article where id=?"; + Object[] params={id}; + + List list=getList(sql,params); + if(list!=null&&list.size()!=0) + return (ArticleSingle)list.get(0); + else + return null; + } + private List getList(String sql,Object[] params) throws SQLException{ + List list=null; + DB mydb=new DB(); + mydb.doPstm(sql,params); + ResultSet rs=mydb.getRs(); + if(rs!=null){ + list=new ArrayList(); + while(rs.next()){ + ArticleSingle single=new ArticleSingle(); + single.setId(rs.getInt(1)); + single.setArtWhoId(rs.getInt(2)); + single.setArtTitle(rs.getString(3)); + single.setArtContent(rs.getString(4)); + single.setArtPubTime(Change.dateTimeChange(rs.getTimestamp(5))); + single.setArtCount(rs.getInt(6)); + single.setRevCount(getRevCount(single.getId())); + list.add(single); + } + rs.close(); + } + mydb.closed(); + return list; + } + /** + * @throws SQLException + * @ܣȡ + */ + private int getRevCount(int id) throws SQLException{ + int count=0; + String sql="select count(id) from tb_articleR where artReview_rootId=?"; + Object[] params={id}; + + DB mydb=new DB(); + mydb.doPstm(sql, params); + ResultSet rs = mydb.getRs(); + if(rs!=null&&rs.next()) + count=rs.getInt(1); + rs.close(); + mydb.closed(); + return count; + } + /** + * @ܣۼ·ʴ + */ + public void setArtCount(int id) throws SQLException{ + String sql="update tb_article set art_count=art_count+1 where id=?"; + Object[] params={id}; + DB mydb=new DB(); + mydb.doPstm(sql, params); + mydb.closed(); + } + /** + * @throws SQLException + * @ܣ޸ + */ + public int modify(Object[] params) throws SQLException{ + String sql="update tb_article set art_title=?,art_content=? where id=?"; + DB mydb=new DB(); + mydb.doPstm(sql, params); + int i=mydb.getCount(); + mydb.closed(); + return i; + } + /** + * @throws SQLException + * @ܣɾ + */ + public int delete(int id) throws SQLException{ + String sql="delete from tb_article where id=?"; + DB mydb=new DB(); + mydb.doPstm(sql, new Object[]{id}); + int i=mydb.getCount(); + mydb.closed(); + return i; + } + /** + * @throws SQLException + * @ܣ + */ + public int insert(Object[] params) throws SQLException{ + String sql="insert into tb_article values(?,?,?,?,?)"; + DB mydb=new DB(); + mydb.doPstm(sql,params); + int i=mydb.getCount(); + mydb.closed(); + return i; + } +} diff --git a/15/src/com/dao/ElectDao.java b/15/src/com/dao/ElectDao.java new file mode 100644 index 0000000..e3792ae --- /dev/null +++ b/15/src/com/dao/ElectDao.java @@ -0,0 +1,58 @@ +package com.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.toolsBean.Change; +import com.toolsBean.DB; +import com.valueBean.ElectSingle; + +public class ElectDao { + public List getDefaultElect(int id) throws SQLException{ + String sql="select top 5 * from tb_elect where elect_whoId=? order by elect_time desc"; + Object[] params={id}; + List electlist=getList(sql,params); + return electlist; + } + public List getListElect(int id) throws SQLException{ + String sql="select * from tb_elect where elect_whoId=? order by elect_time desc"; + Object[] params={id}; + List electlist=getList(sql,params); + return electlist; + } + private List getList(String sql,Object[] params) throws SQLException{ + List list=null; + DB mydb=new DB(); + mydb.doPstm(sql,params); + ResultSet rs=mydb.getRs(); + if(rs!=null){ + list=new ArrayList(); + while(rs.next()){ + ElectSingle single=new ElectSingle(); + single.setId(rs.getInt(1)); + single.setElectWhoId(rs.getInt(2)); + single.setElectTitle(rs.getString(3)); + single.setElectSrc(rs.getString(4)); + single.setElectTime(Change.dateTimeChange(rs.getTimestamp(5))); + list.add(single); + } + } + return list; + } + public int insert(Object[] params) throws SQLException{ + String sql="insert into tb_elect values(?,?,?,?)"; + DB mydb=new DB(); + mydb.doPstm(sql, params); + int i=mydb.getCount(); + return i; + } + public int delete(int id) throws SQLException{ + String sql="delete from tb_elect where id=?"; + DB mydb=new DB(); + mydb.doPstm(sql,new Object[]{id}); + int i=mydb.getCount(); + return i; + } +} diff --git a/15/src/com/dao/FriendDao.java b/15/src/com/dao/FriendDao.java new file mode 100644 index 0000000..249a933 --- /dev/null +++ b/15/src/com/dao/FriendDao.java @@ -0,0 +1,96 @@ +package com.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.toolsBean.Change; +import com.toolsBean.DB; +import com.valueBean.UserSingle; + +public class FriendDao extends SuperDao{ + /** + * @ܣȡ"ҳ"ʾҵĺ + */ + public List getDefaultFriend(int id) throws SQLException{ + String sql="select top 5 u.* from tb_friend f inner join tb_user u on f.user_id=u.id where f.friend_whoId=? order by f.id"; + Object[] params={id}; + List friendlist=getList(sql,params); + return friendlist; + } + /** + * @ܣȡҵк + */ + public List getListFriend(int id) throws SQLException{ + String sql="select u.* from tb_friend f inner join tb_user u on f.user_id=u.id where f.friend_whoId=? order by f.id"; + Object[] params={id}; + List friendlist=getList(sql,params); + return friendlist; + } + /** + * @ܣȡҵijһ + */ + public boolean getSingleFriend(Object[] params) throws SQLException{ + String sql="select * from tb_friend where friend_whoId=? and user_id=?"; + DB mydb=new DB(); + mydb.doPstm(sql, params); + ResultSet rs=mydb.getRs(); + if(rs!=null&&rs.next()) + return true; + else return false; + } + /** + * @ܣȡϸ + */ + public UserSingle getFriendInfo(int id) throws SQLException{ + String sql="select * from tb_user where id=?"; + Object[] params={id}; + + List list=getList(sql,params); + if(list!=null&&list.size()!=0) + return (UserSingle)list.get(0); + else + return null; + } + private List getList(String sql,Object[] params) throws SQLException{ + List list=null; + DB mydb=new DB(); + mydb.doPstm(sql,params); + ResultSet rs=mydb.getRs(); + if(rs!=null){ + list=new ArrayList(); + while(rs.next()){ + UserSingle single=new UserSingle(); + single.setId(rs.getInt(1)); + single.setUserName(rs.getString(2)); + single.setUserPswd(rs.getString(3)); + single.setUserIco(rs.getString(4)); + single.setUserMotto(rs.getString(5)); + single.setUserSex(rs.getString(6)); + single.setUserOicq(rs.getString(7)); + single.setUserEmail(rs.getString(8)); + single.setUserFrom(rs.getString(9)); + single.setUserBlogName(rs.getString(10)); + single.setUserCTTime(Change.dateTimeChange(rs.getTimestamp(11))); + single.setUserHitNum(rs.getInt(12)); + list.add(single); + } + rs.close(); + } + mydb.closed(); + return list; + } + public void insert(Object[] params) throws SQLException{ + String sql="insert into tb_friend values(?,?);"; + DB mydb=new DB(); + mydb.doPstm(sql, params); + } + public int delete(Object[] params) throws SQLException{ + String sql="delete from tb_friend where friend_whoId=? and user_id=?"; + DB mydb=new DB(); + mydb.doPstm(sql,params); + int i=mydb.getCount(); + return i; + } +} diff --git a/15/src/com/dao/LinkDao.java b/15/src/com/dao/LinkDao.java new file mode 100644 index 0000000..74ce05e --- /dev/null +++ b/15/src/com/dao/LinkDao.java @@ -0,0 +1,58 @@ +package com.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.toolsBean.Change; +import com.toolsBean.DB; +import com.valueBean.LinkSingle; + +public class LinkDao { + public List getDefaultLink(int id) throws SQLException{ + String sql="select top 5 * from tb_link where link_whoId=? order by link_time desc"; + Object[] params={id}; + List linklist=getList(sql,params); + return linklist; + } + public List getListLink(int id) throws SQLException{ + String sql="select * from tb_link where link_whoId=? order by link_time desc"; + Object[] params={id}; + List linklist=getList(sql,params); + return linklist; + } + private List getList(String sql,Object[] params) throws SQLException{ + List list=null; + DB mydb=new DB(); + mydb.doPstm(sql,params); + ResultSet rs=mydb.getRs(); + if(rs!=null){ + list=new ArrayList(); + while(rs.next()){ + LinkSingle single=new LinkSingle(); + single.setId(rs.getInt(1)); + single.setLinkWhoId(rs.getInt(2)); + single.setLinkTitle(rs.getString(3)); + single.setLinkSrc(rs.getString(4)); + single.setLinkTime(Change.dateTimeChange(rs.getTimestamp(5))); + list.add(single); + } + } + return list; + } + public int insert(Object[] params) throws SQLException{ + String sql="insert into tb_link values(?,?,?,?)"; + DB mydb=new DB(); + mydb.doPstm(sql, params); + int i=mydb.getCount(); + return i; + } + public int delete(int id) throws SQLException{ + String sql="delete from tb_link where id=?"; + DB mydb=new DB(); + mydb.doPstm(sql,new Object[]{id}); + int i=mydb.getCount(); + return i; + } +} diff --git a/15/src/com/dao/MediaDao.java b/15/src/com/dao/MediaDao.java new file mode 100644 index 0000000..1c22adb --- /dev/null +++ b/15/src/com/dao/MediaDao.java @@ -0,0 +1,171 @@ +package com.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.toolsBean.Change; +import com.toolsBean.DB; +import com.valueBean.MediaSingle; + +public class MediaDao extends SuperDao{ + public List getDefaultMedia(int id) throws SQLException{ + String sql="select top 4 * from tb_media where media_whoId=? order by media_uptime desc"; + Object[] params={id}; + List list=getList(sql,params); + List medialist=defaultDivide(list); + return medialist; + } + /** + * @ܣȡڵǰҳʾӰ + */ + public List getListMedia(int id,String showPage,String goWhich) throws SQLException{ + List medialist=null; + String sqlall="select * from tb_media where media_whoId=?"; + Object[] params={id}; + + setPerR(12); + createPage(sqlall,params,showPage,goWhich); + + int currentP=getPage().getCurrentP(); + int top1=getPage().getPerR(); + int top2=(currentP-1)*top1; + String sql=""; + if(currentP==1) + sql="SELECT TOP "+top1+" * FROM tb_media WHERE media_whoId=? ORDER BY media_uptime DESC"; + else + sql="SELECT TOP "+top1+" * FROM tb_media i WHERE (media_whoId = ?) AND (media_uptime < (SELECT MIN(media_uptime) FROM (SELECT TOP "+top2+" * FROM tb_media WHERE media_whoId = i.media_whoId ORDER BY media_uptime DESC) AS minv)) ORDER BY media_uptime DESC"; + + List list=getList(sql,params); + medialist=divide(list); + return medialist; + } + /** + * @ܣȡƵϸϢ + */ + public MediaSingle getSingleMedia(int id) throws SQLException{ + String sql="select * from tb_media where id=?"; + Object[] params={id}; + + List list=getList(sql,params); + if(list!=null&&list.size()!=0) + return (MediaSingle)list.get(0); + else + return null; + } + private List getList(String sql,Object[] params) throws SQLException{ + List list=null; + DB mydb=new DB(); + mydb.doPstm(sql,params); + ResultSet rs=mydb.getRs(); + if(rs!=null){ + list=new ArrayList(); + while(rs.next()){ + MediaSingle single=new MediaSingle(); + single.setId(rs.getInt(1)); + single.setMediaWhoId(rs.getInt(2)); + single.setMediaTitle(rs.getString(3)); + single.setMediaSrc(rs.getString(4)); + single.setMediaPic(rs.getString(5)); + single.setMediaInfo(rs.getString(6)); + single.setMediaUptime(Change.dateTimeChange(rs.getTimestamp(7))); + single.setLookCount(rs.getInt(8)); + single.setReviCount(getRevCount(single.getId())); + list.add(single); + } + rs.close(); + } + mydb.closed(); + return list; + } + /** + * @ܣȡƵ + */ + private int getRevCount(int id){ + int count=0; + String sql="select count(id) from tb_mediaR where mediaR_rootId=?"; + Object[] params={id}; + + DB mydb=new DB(); + mydb.doPstm(sql, params); + try { + ResultSet rs = mydb.getRs(); + if(rs!=null&&rs.next()) + count=rs.getInt(1); + rs.close(); + } catch (SQLException e) { + e.printStackTrace(); + } + mydb.closed(); + return count; + } + /** + * @ܣۼƵۿ + */ + public void setLookCount(int id) throws SQLException{ + String sql="update tb_media set media_lookCount=media_lookCount+1 where id=?"; + Object[] params={id}; + DB mydb=new DB(); + mydb.doPstm(sql, params); + mydb.closed(); + } + /** + *@ܣlistд洢12Ԫ(MediaSingle)˳ƽֳ3ݣÿһеԪش洢һ½List(temp)Уtemp洢medialistС
    + * medialistоʹ洢ˣԪأÿԪΪһListϣÿд洢ˣMediaSingleתΪmedialistһϣJSPҳͨforEachѭǩ34еĸʽƵ + */ + private List divide(List list){ + List medialist=null; + if(list!=null){ + medialist=new ArrayList(); + /* Ȳ볤 */ + int blank=12-list.size(); //Ϊÿҳʾ12¼listijֻܵ12С12 + if(blank>0){ //listijС12listдblanknullֵlistȲ뵽12 + for(int i=0;i0){ //listijС4listдblanknullֵlistȲ뵽4 + for(int i=0;i (SELECT MAX(mediaR_time) FROM (SELECT TOP "+top2+" * FROM tb_mediaR WHERE mediaR_rootId = i.mediaR_rootId ORDER BY mediaR_time) AS maxv)) ORDER BY mediaR_time"; + + List mediaRlist=getList(sql,params); + return mediaRlist; + } + private List getList(String sql,Object[] params) throws SQLException{ + List list=null; + DB mydb=new DB(); + mydb.doPstm(sql, params); + ResultSet rs=mydb.getRs(); + if(rs!=null){ + list=new ArrayList(); + while(rs.next()){ + MediaRevSingle single=new MediaRevSingle(); + single.setId(rs.getInt(1)); + single.setMediaRRootId(rs.getInt(2)); + single.setMediaRAuthor(rs.getString(3)); + single.setMediaRContent(rs.getString(4)); + single.setMediaRTime(Change.dateTimeChange(rs.getTimestamp(5))); + list.add(single); + } + rs.close(); + } + mydb.closed(); + return list; + } + public void insert(Object[] params) throws SQLException{ + String sql="insert into tb_mediaR values(?,?,?,?)"; + DB mydb=new DB(); + mydb.doPstm(sql, params); + } + public int delete(int id) throws SQLException{ + String sql="delete from tb_mediaR where id=?"; + DB mydb=new DB(); + mydb.doPstm(sql, new Object[]{id}); + int i=mydb.getCount(); + return i; + } +} diff --git a/15/src/com/dao/PhotoDao.java b/15/src/com/dao/PhotoDao.java new file mode 100644 index 0000000..375fbcc --- /dev/null +++ b/15/src/com/dao/PhotoDao.java @@ -0,0 +1,136 @@ +package com.dao; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import com.toolsBean.Change; +import com.toolsBean.DB; +import com.valueBean.PhotoSingle; + +public class PhotoDao extends SuperDao { + /** + * @ܣȡڸҳʾϴǰ4ͼƬ + */ + public List getDefaultPhoto(int id) throws SQLException{ + String sql="select top 4 * from tb_photo where photo_whoId=? order by photo_uptime desc"; + Object[] params={id}; + List list=getList(sql,params); + List photolist=defaultDivide(list); + return photolist; + } + /** + * @ܣȡڽ룢ҵᣢڵǰҳʾͼƬ + */ + public List getListPhoto(int id,String showPage,String goWhich) throws SQLException{ + List photolist=null; + String sqlall="select * from tb_photo where photo_whoId=?"; + Object[] params={id}; + + setPerR(12); + createPage(sqlall,params,showPage,goWhich); + + int currentP=getPage().getCurrentP(); + int top1=getPage().getPerR(); + int top2=(currentP-1)*top1; + String sql=""; + if(currentP<=1) + sql="SELECT TOP "+top1+" * FROM tb_photo WHERE photo_whoId=? ORDER BY photo_uptime DESC"; + else + sql="SELECT TOP "+top1+" * FROM tb_photo i WHERE (photo_whoId = ?) AND (photo_uptime < (SELECT MIN(photo_uptime) FROM (SELECT TOP "+top2+" * FROM tb_photo WHERE photo_whoId = i.photo_whoId ORDER BY photo_uptime DESC) AS minv)) ORDER BY photo_uptime DESC"; + List list=getList(sql,params); + photolist=divide(list); + return photolist; + } + /** + * @ܣȡͼƬϸϢ + */ + public PhotoSingle getSinglePhoto(int id) throws SQLException{ + String sql="select * from tb_photo where id=?"; + Object[] params={id}; + + List list=getList(sql,params); + if(list!=null) + return (PhotoSingle)list.get(0); + else + return null; + } + private List getList(String sql,Object[] params) throws SQLException{ + List list=null; + DB mydb=new DB(); + mydb.doPstm(sql,params); + ResultSet rs=mydb.getRs(); + if(rs!=null){ + list=new ArrayList(); + while(rs.next()){ + PhotoSingle single=new PhotoSingle(); + single.setId(rs.getInt(1)); + single.setPhotoWhoId(rs.getInt(2)); + single.setPhotoSrc(rs.getString(3)); + single.setPhotoInfo(rs.getString(4)); + single.setPhotoUptime(Change.dateTimeChange(rs.getTimestamp(5))); + list.add(single); + } + } + return list; + } + /** + *@ܣlistд洢12Ԫ(PhotoSingle)˳ƽֳ3ݣÿһеԪش洢һ½List(temp)Уtemp洢photolistС
    + * photolistоʹ洢ˣԪأÿԪΪһListϣÿд洢ˣPhotoSingleתΪphotolistһϣJSPҳͨforEachѭǩ34еĸʽͼƬ + */ + private List divide(List list){ + List photolist=null; + if(list!=null){ + photolist=new ArrayList(); + /* Ȳ볤 */ + int blank=12-list.size(); //Ϊÿҳʾ12¼listijֻܵ12С12 + if(blank>0){ //listijС12listдblanknullֵlistȲ뵽12 + for(int i=0;i0){ //listijС4listдblanknullֵlistȲ뵽4 + for(int i=0;iԪؽá + try{ + UserDao mainDao=new UserDao(); + List masterlist=mainDao.getMasterList(); + request.setAttribute("masterlist",masterlist); + }catch(Exception e){ + System.out.println("IndexServletdoPost"); + e.printStackTrace(); + } + + String forward=getInitParameter("showWelcome"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } +} \ No newline at end of file diff --git a/15/src/com/servlet/LinkServlet.java b/15/src/com/servlet/LinkServlet.java new file mode 100644 index 0000000..f80c302 --- /dev/null +++ b/15/src/com/servlet/LinkServlet.java @@ -0,0 +1,131 @@ +package com.servlet; + +import java.io.IOException; +import java.sql.SQLException; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.dao.LinkDao; +import com.toolsBean.Change; +import com.valueBean.UserSingle; + +public class LinkServlet extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + doPost(request,response); + } + protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String action=request.getParameter("action"); + if("adminList".equals(action)) + doAdminList(request,response); + else if("insert".equals(action)) + doInsert(request,response); + else if("delete".equals(action)) + doDelete(request,response); + else + doOther(request,response); + } + + protected void doAdminList(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("adminListPage")); + HttpSession session=request.getSession(); + UserSingle logoner=(UserSingle)session.getAttribute("logoner"); + + int whoid=logoner.getId(); + List linklist=null; + LinkDao linkDao=new LinkDao(); + try { + linklist=linkDao.getListLink(whoid); + } catch (SQLException e) { + System.out.println("̨ȡʧܣ"); + e.printStackTrace(); + } + request.setAttribute("linklist",linklist); + + String forward=getServletContext().getInitParameter("adminTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doInsert(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("insertPage")); + String message=""; + String forward=getServletContext().getInitParameter("adminTemp"); + HttpSession session=request.getSession(); + String type=request.getParameter("type"); + + if("add".equals(type)){ //ͨӡύť + message=validateLink(request); //б֤ + if("".equals(message)){ //֤ɹ + int whoId=((UserSingle)session.getAttribute("logoner")).getId(); + String title=request.getParameter("title"); + String src=request.getParameter("src"); + String time=Change.dateTimeChange(new Date()); + Object[] params={whoId,title,src,time}; + + int i=0; + try { + LinkDao linkDao=new LinkDao(); + i=linkDao.insert(params); + } catch (SQLException e) { + i=-1; + e.printStackTrace(); + } + if(i<=0) + message="
  • ʧܣ
  • "; + else{ + message="
  • ӳɹ
  • "; + forward="/my/admin/link?action=adminList"; + } + } + } + + request.setAttribute("message",message); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doDelete(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String message=""; + String forward=""; + int id=Change.strToInt(request.getParameter("id")); + + int i=0; + try { + LinkDao linkDao=new LinkDao(); + i=linkDao.delete(id); + } catch (SQLException e) { + i=-1; + e.printStackTrace(); + } + if(i<=0){ + message="
  • ɾʧܣء
  • "; + forward=getServletContext().getInitParameter("messagePage"); + } + else{ + message="
  • ɾɹ
  • "; + forward="/my/admin/link?action=adminList"; + } + request.setAttribute("message",message); + + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doOther(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + + } + private String validateLink(HttpServletRequest request){ + String message=""; + String title=request.getParameter("title"); + String src=request.getParameter("src"); + if(title==null||title.equals("")) + message="
  • ӱ⣡"; + if(src==null||src.equals("")) + message+="
  • ӵַ"; + return message; + } +} diff --git a/15/src/com/servlet/LogOff.java b/15/src/com/servlet/LogOff.java new file mode 100644 index 0000000..148d204 --- /dev/null +++ b/15/src/com/servlet/LogOff.java @@ -0,0 +1,20 @@ +package com.servlet; +import java.io.IOException; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +public class LogOff extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + doPost(request,response); + } + protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + HttpSession session=request.getSession(); + session.invalidate(); + String forward=getInitParameter("logoffPage"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } +} diff --git a/15/src/com/servlet/MediaRevServlet.java b/15/src/com/servlet/MediaRevServlet.java new file mode 100644 index 0000000..4b29605 --- /dev/null +++ b/15/src/com/servlet/MediaRevServlet.java @@ -0,0 +1,149 @@ +package com.servlet; + +import java.io.IOException; +import java.sql.SQLException; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.dao.ArtReviewDao; +import com.dao.MediaRevDao; +import com.toolsBean.Change; +import com.valueBean.UserSingle; + +public class MediaRevServlet extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + doPost(request,response); + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String action=request.getParameter("action"); + if("listShow".equals(action)) + doListShow(request,response); + else if("adminList".equals(action)) + doAdminList(request,response); + else if("review".equals(action)) + doReview(request,response); + else if("delete".equals(action)) + doDelete(request,response); + else + doOther(request,response); + } + protected void doListShow(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + int rootId=Change.strToInt(request.getParameter("id")); + String showPage=request.getParameter("showPage"); + String goWhich="my/guest/mediaRev?action=listShow&id="+rootId; + + List mediaRlist=null; + MediaRevDao mediaRevDao=new MediaRevDao(); + try { + mediaRlist=mediaRevDao.getMoreReviewList(rootId, showPage, goWhich); + } catch (SQLException e) { + System.out.println("ȡƵбʧܣ"); + e.printStackTrace(); + } + request.setAttribute("mediaRlist",mediaRlist); + request.setAttribute("createPage",mediaRevDao.getPage()); + + String forward=getInitParameter("mediaRlistPage"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doAdminList(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + int rootId=Change.strToInt(request.getParameter("id")); + String showPage=request.getParameter("showPage"); + String goWhich="my/admin/mediaRev?action=adminList&id="+rootId; + + List mediaRlist=null; + MediaRevDao mediaRevDao=new MediaRevDao(); + try { + mediaRlist=mediaRevDao.getMoreReviewList(rootId, showPage, goWhich); + } catch (SQLException e) { + System.out.println("̨ȡƵбʧܣ"); + e.printStackTrace(); + } + request.setAttribute("mediaRlist",mediaRlist); + request.setAttribute("createPage",mediaRevDao.getPage()); + + String forward=getInitParameter("adminMediaRListPage"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doReview(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String forward=""; + String message=validateInsert(request); //б֤ + if(!"".equals(message)){ //֤ʧ + forward=this.getServletContext().getInitParameter("messagePage"); + } + else{ //֤ɹ + String rootId=request.getParameter("rootId"); + String content=request.getParameter("mediaRContent"); + String time=Change.dateTimeChange(new Date()); + String author=""; + String noname=request.getParameter("noname"); + if("true".equals(noname)) // + author=""; + else{ // + HttpSession session=request.getSession(); + author=((UserSingle)session.getAttribute("logoner")).getUserName(); + } + + MediaRevDao mediaRevDao=new MediaRevDao(); + try { + mediaRevDao.insert(new Object[]{rootId,author,content,time}); + forward="/my/guest/media?action=singleShow&id="+rootId; + } catch (SQLException e) { + message="
  • ʧܣ
  • "; + forward=this.getServletContext().getInitParameter("messagePage"); + e.printStackTrace(); + } + } + request.setAttribute("message",message); + + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doDelete(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String message=""; + String forward=""; + int rootId=Change.strToInt(request.getParameter("rootId")); + int id=Change.strToInt(request.getParameter("id")); + + int i=0; + try { + MediaRevDao mediaRevDao=new MediaRevDao(); + i=mediaRevDao.delete(id); + } catch (SQLException e) { + i=-1; + e.printStackTrace(); + } + if(i<=0){ + message="
  • ɾʧܣ
  • ء"; + forward=getServletContext().getInitParameter("messagePage"); + } + else{ + message="
  • ɾɹ
  • "; + forward="/my/admin/mediaRev?action=adminList&id="+rootId; + } + + request.setAttribute("message",message); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doOther(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + + } + private String validateInsert(HttpServletRequest request) throws ServletException, IOException{ + String message=""; + String content=request.getParameter("mediaRContent"); + if(content==null||content.equals("")) + message="
  • ݣ
  • ء"; + return message; + } +} \ No newline at end of file diff --git a/15/src/com/servlet/MediaServlet.java b/15/src/com/servlet/MediaServlet.java new file mode 100644 index 0000000..0c6d6e4 --- /dev/null +++ b/15/src/com/servlet/MediaServlet.java @@ -0,0 +1,370 @@ +package com.servlet; + +import java.io.IOException; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.dao.MediaDao; +import com.dao.MediaRevDao; +import com.jspsmart.upload.File; +import com.jspsmart.upload.SmartUpload; +import com.jspsmart.upload.SmartUploadException; +import com.toolsBean.Change; +import com.valueBean.MediaSingle; +import com.valueBean.UserSingle; + +public class MediaServlet extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + doPost(request,response); + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String action=request.getParameter("action"); + if("listShow".equals(action)) + doListShow(request,response); + else if("singleShow".equals(action)) + doSingleShow(request,response); + else if("adminList".equals(action)) + doAdminList(request,response); + else if("adminSingle".equals(action)) + doAdminSingle(request,response); + else if("insert".equals(action)) + doInsert(request,response); + else if("delete".equals(action)) + doDelete(request,response); + else + doOther(request,response); + } + protected void doListShow(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("listShowPage")); + HttpSession session=request.getSession(); + UserSingle callMaster=(UserSingle)session.getAttribute("callBlogMaster"); + + int userid=callMaster.getId(); + String showPage=request.getParameter("showPage"); + String goWhich="my/guest/media?action=listShow"; + + List mediaList=null; + MediaDao mediaDao=new MediaDao(); + try { + mediaList=mediaDao.getListMedia(userid,showPage, goWhich); + } catch (SQLException e) { + System.out.println("ȡƵбʧܣ"); + e.printStackTrace(); + } + request.setAttribute("medialist",mediaList); + request.setAttribute("createPage",mediaDao.getPage()); + + String forward=this.getServletContext().getInitParameter("indexTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doSingleShow(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("playPage")); + try { + MediaDao mediaDao=new MediaDao(); + int id=Change.strToInt(request.getParameter("id")); + + mediaDao.setLookCount(id); // ƵĹۿӣ + MediaSingle single=mediaDao.getSingleMedia(id); // ȡƵϸϢ + + /* ȡƵµǰn */ + MediaRevDao mediaRDao=new MediaRevDao(); + List mediaRlist=mediaRDao.getNewReviewList(id); + + /* ҪŵƵƵ */ + request.setAttribute("mediasingle",single); + request.setAttribute("mediaRlist",mediaRlist); + } catch (Exception e) { + System.out.println("ȡƵϸϢʧܣ"); + e.printStackTrace(); + } + + String forward=this.getServletContext().getInitParameter("indexTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doAdminList(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("adminListPage")); + HttpSession session=request.getSession(); + UserSingle logoner=(UserSingle)session.getAttribute("logoner"); + + int whoid=logoner.getId(); + String showPage=request.getParameter("showPage"); + String goWhich="my/admin/media?action=adminList"; + + List mediaList=null; + MediaDao mediaoDao=new MediaDao(); + try { + mediaList=mediaoDao.getListMedia(whoid,showPage, goWhich); + } catch (SQLException e) { + System.out.println("̨ȡӰбʧܣ"); + e.printStackTrace(); + } + request.setAttribute("medialist",mediaList); + request.setAttribute("createPage",mediaoDao.getPage()); + + String forward=this.getServletContext().getInitParameter("adminTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doAdminSingle(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("adminPlayPage")); + try { + int id=Change.strToInt(request.getParameter("id")); + MediaDao mediaDao=new MediaDao(); + MediaSingle single=mediaDao.getSingleMedia(id); // ȡӰϸϢ + + /* ȡƵµǰn */ + MediaRevDao mediaRDao=new MediaRevDao(); + List mediaRlist=mediaRDao.getNewReviewList(id); + + /* ҪŵƵƵ */ + request.setAttribute("mediasingle",single); + request.setAttribute("mediaRlist",mediaRlist); + } catch (Exception e) { + System.out.println("̨ȡӰϸϢʧܣ"); + e.printStackTrace(); + } + String forward=this.getServletContext().getInitParameter("adminTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doInsert(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("upLoadPage")); + + String message=""; + HttpSession session=request.getSession(); + int whoid=((UserSingle)session.getAttribute("logoner")).getId(); + String type=request.getParameter("type"); + + if("upload".equals(type)){ //ǵϴƵύť + try { + SmartUpload myup=new SmartUpload(); + myup.initialize(this, request, response); + myup.setAllowedFilesList("avi,asf,asx,3gp,mpg,mov,mp4,wmv,flv"); //ϴļ + myup.upload(); //ϴļ + + File upfile=myup.getFiles().getFile(0); //ȡϴļΪֻϴһļֻһԪ + message=validateUpLoad(upfile); + + if(message.equals("")){ //֤ͨ + Date now=new Date(); //ȡǰʱ + String serialName=Change.getSerial(now); //ùBeanݵǰʱȡһΩһ + + String basePath=getServletContext().getRealPath("\\"); //ȡWebӦõʵʴ· + String upFilePath=basePath+"pages\\admin\\media\\temp\\"+serialName+"."+upfile.getFileExt(); //һʱļ·WebӦøĿ¼\pages\admin\media\temp\ϴļ磬F:\Tomcat 6.0\webapps\MediaBlog\pages\admin\media\temp\04302008143755.mpg + String flvFilePath=basePath+"pages\\media\\videos\\"+serialName+".flv"; //תΪflvʽļı· + String cutPicPath=basePath+"images\\media\\"+serialName+".jpg"; //ôϴƵнȡͼƬı· + + upfile.saveAs(upFilePath,File.SAVEAS_PHYSICAL); //ļУΪʱļ + boolean mark=convertVideo(upFilePath,flvFilePath,cutPicPath); //תƵʽ + + if(mark){ //תƵʽɹݱӸƵϢ + String src=serialName+".flv"; //ȡƵɹתΪflvʽļ + String time=Change.dateTimeChange(now); + String pic=serialName+".jpg"; //ȡƵĽͼ + int count=0; //Ƶķʴ + String info=myup.getRequest().getParameter("info"); //ȡƵϢ + String title=myup.getRequest().getParameter("title"); //ȡƵ + if(title==null||title.equals(""))title="ޱ"; + if(info==null||info.equals(""))info="ҵƵ"; + + Object[] params={whoid,title,src,pic,info,time,count}; + MediaDao mediaDao=new MediaDao(); + + int i=mediaDao.upLoad(params); //DAOݱƵϢ + if(i<=0) //ƵϢʧ + message="
  • ƵϢʱʧܣ
  • "; + else //ƵϢɹ + message="
  • Ƶϴɹ
  • "; + } + else //תƵʽʧ + message="
  • תƵʱʧܣ
  • "; + } + }catch(SecurityException e1){ //Υϴļͺ׳쳣 + message="
  • ֻϴ aviasfasx3gpmpgmovmp4wmvflv ʽͼƬ
  • "; + e1.printStackTrace(); + }catch (SmartUploadException e2) { + message="
  • Ƶϴʧܣ
  • "; + e2.printStackTrace(); + }catch(Exception e3){ + message="
  • ʧܣ
  • "; + e3.printStackTrace(); + }catch(OutOfMemoryError e4){ + message="
  • ϴʧܣϴļ̫
  • "; + e4.printStackTrace(); + } + } + else //ϴӰӴ + message="
  • ѡҪϴƵ
  • "; + + request.setAttribute("message",message); + String forward=getServletContext().getInitParameter("adminTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + /** + * @ܣ֤ǷѡҪϴļԼļС + * @أStringֵ + */ + private String validateUpLoad(File upfile){ + String message=""; + long maxLen=30*1024*1024; //ϴļ󳤶Ϊ30MB + if(upfile.isMissing()){ //ûѡļ + message+="
  • ѡҪϴƵ
  • "; + } + else{ + int len=upfile.getSize(); + if(len==0) + message="
  • ϴСΪ0Ŀļ
  • "; + else if(len>maxLen) + message="
  • ϴƵӦΪ30MB
  • "; + } + return message; + } + /** + * @ܣתϴƵΪFLVʽڴϴƵнͼ + * @upFilePath ָҪתʽļ·ԼָҪͼƵ
    + * @flvFilePathָתΪFLVʽļı·
    + * @cutPicPath ָȡͼƬı· + * @أbooleanֵ + */ + private boolean convertVideo(String upFilePath,String flvFilePath,String cutPicPath){ + String ffmpegPath=getInitParameter("ffmpegPath"); //ȡweb.xmlõתߣffmpeg.exeĴ· + + //һListתƵļΪflvʽ + List convert=new ArrayList(); + convert.add(ffmpegPath); //ת· + convert.add("-i"); //Ӳ-iòָҪתļ + convert.add(upFilePath); //ҪתʽƵļ· + convert.add("-qscale"); + convert.add("6"); + convert.add("-ab"); + convert.add("64"); + convert.add("-acodec"); + convert.add("mp3"); + convert.add("-ac"); + convert.add("2"); + convert.add("-ar"); + convert.add("22050"); + convert.add("-r"); + convert.add("24"); + convert.add("-y"); //Ӳ-yòָѴڵļ + convert.add(flvFilePath); + + //һListƵнȡͼƬ + List cutpic=new ArrayList(); + cutpic.add(ffmpegPath); + cutpic.add("-i"); + cutpic.add(upFilePath); //ͬϣָļתΪflvʽ֮ǰļҲתflvļ + cutpic.add("-y"); + cutpic.add("-f"); + cutpic.add("image2"); + cutpic.add("-ss"); //Ӳ-ssòָȡʼʱ + cutpic.add("9"); //ʼʱΪ9 + cutpic.add("-t"); //Ӳ-tòָʱ + cutpic.add("0.001"); //ӳʱΪ1 + cutpic.add("-s"); //Ӳ-sòָȡͼƬС + cutpic.add("350*240"); //ӽȡͼƬСΪ350*240 + cutpic.add(cutPicPath); //ӽȡͼƬı· + + boolean mark=true; + ProcessBuilder builder = new ProcessBuilder(); + try { + builder.command(convert); + builder.start(); + + builder.command(cutpic); + builder.start(); + } catch (Exception e) { + mark=false; + e.printStackTrace(); + } + return mark; + } + /** + * @ܣɾƵ + * @裺ȸ󴫵ݵIDֵѯƵϢлȡƵļȻӴɾƵļٴӴɾƵͼݱɾƵϢ + */ + protected void doDelete(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String message=""; + String forward=""; + int id=Change.strToInt(request.getParameter("id")); + MediaDao mediaDao=new MediaDao(); + + try { + MediaSingle single=new MediaSingle(); + single=mediaDao.getSingleMedia(id); + + String flvName=single.getMediaSrc(); + String picName=flvName.substring(0,flvName.lastIndexOf("."))+".jpg"; + + System.out.println("flvName:"+flvName); + System.out.println("picName:"+picName); + + boolean delflv=deleteFlv(flvName); //ӴɾƵļ + if(delflv){ //ɾƵļɹ + boolean delpic=deletePic(picName); //ӴɾƵͼ + if(delpic){ //ɾƵͼɹ + int i=mediaDao.delete(id); //ݱɾƵϢ + if(i>0){ //ɾƵϢɹ + message="
  • Ƶɾɹ
  • "; + forward="/my/admin/media?action=adminList"; + } + else{ + message="
  • ƵļԼƵͼѾӴɾڴݱɾƵϢʱʧܣ

  • ء"; + forward=getServletContext().getInitParameter("messagePage"); + } + } + else{ + message="
  • ƵļѾӴɾɾƵĽͼʱʧܣ

  • ء"; + forward=getServletContext().getInitParameter("messagePage"); + } + } + else{ //ӴɾƵļʧ + message="
  • ޷ӴɾƵļ
  • ء"; + forward=getServletContext().getInitParameter("messagePage"); + } + + } catch (SQLException e1) { + message="
  • ɾƵʧܣ
  • "; + forward=getServletContext().getInitParameter("messagePage"); + e1.printStackTrace(); + } + + request.setAttribute("message",message); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + /** + * @ܣӴɾƵļ + */ + private boolean deleteFlv(String flvName){ + String path=getServletContext().getRealPath("\\")+"pages\\media\\videos\\"+flvName; + java.io.File flvFile=new java.io.File(path); + boolean delflv=flvFile.delete(); + return delflv; + } + /** + * @ܣӴɾƵͼ + */ + private boolean deletePic(String picName){ + String path=getServletContext().getRealPath("\\")+"images\\media\\"+picName; + java.io.File picFile=new java.io.File(path); + boolean picflv=picFile.delete(); + return picflv; + } + protected void doOther(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + + } +} diff --git a/15/src/com/servlet/MyLogon.java b/15/src/com/servlet/MyLogon.java new file mode 100644 index 0000000..0b166d7 --- /dev/null +++ b/15/src/com/servlet/MyLogon.java @@ -0,0 +1,102 @@ +package com.servlet; + +import java.io.IOException; +import java.sql.SQLException; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.dao.UserDao; +import com.toolsBean.Change; +import com.valueBean.UserSingle; + +public class MyLogon extends HttpServlet { + + protected void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + doPost(request,response); + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String message=""; + HttpSession session=request.getSession(); + String goWhere=request.getParameter("goWhere"); + UserSingle callMaster=(UserSingle)session.getAttribute("callBlogMaster"); + + Object logoner=session.getAttribute("logoner"); + if(logoner!=null&&(logoner instanceof UserSingle)){ //ûѾ¼ + String forward=""; + if("adminTemp".equals(goWhere)){ //ǣͣ + if(((UserSingle)logoner).getId()==callMaster.getId()){ //ǰ¼ûDZʲ͵IJ + forward=this.getServletContext().getInitParameter("adminTemp"); + } + else{ //ǰ¼ûDZʲ͵IJ + message="
  • ûȨ޹òͣ
  • ء"; + request.setAttribute("message",message); + forward=this.getServletContext().getInitParameter("messagePage"); + } + } + else{ //ǣҵIJͣ + forward="/my/goBlog?master="+((UserSingle)logoner).getId(); + } + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + else{ //ûûѾ¼ + + String forward=""; + String name=request.getParameter("userName"); + String pswd=request.getParameter("userPswd"); + + message=validateLogon(name,pswd); //б֤ + if(message.equals("")){ //֤ɹ + try { + UserDao userDao=new UserDao(); + logoner=userDao.getLogoner(new Object[]{name,pswd}); + } catch (SQLException e) { + e.printStackTrace(); + } + if(logoner==null){ //¼ʧ + message="
  • ġûȷ"; + request.setAttribute("message",message); + forward=getInitParameter("myLogonPage"); + } + else{ //¼ɹ + if("adminTemp".equals(goWhere)){ //ǣͣ + if(((UserSingle)logoner).getId()==callMaster.getId()){ //ǰ¼ûDZʲ͵IJ + forward=this.getServletContext().getInitParameter("adminTemp"); + session.setAttribute("logoner",logoner); + } + else{ //ǰ¼ûDZʲ͵IJ + message="
  • ûȨ޵¼˲ͣ
  • ء"; + request.setAttribute("message",message); + forward=this.getServletContext().getInitParameter("messagePage"); + } + } + else{ //ǣҵIJͣ + forward="/my/goBlog?master="+((UserSingle)logoner).getId(); + session.setAttribute("logoner",logoner); + } + } + } + else{ //֤ʧ + request.setAttribute("message",message); + forward=getInitParameter("myLogonPage"); + } + + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + } + private String validateLogon(String name,String pswd){ + String message=""; + if(name==null||name.equals("")) + message="
  • û
  • "; + if(pswd==null||pswd.equals("")) + message+="
  •   룡
  • "; + return message; + } +} diff --git a/15/src/com/servlet/PhotoServlet.java b/15/src/com/servlet/PhotoServlet.java new file mode 100644 index 0000000..78420f2 --- /dev/null +++ b/15/src/com/servlet/PhotoServlet.java @@ -0,0 +1,236 @@ +package com.servlet; + +import java.io.IOException; +import java.sql.SQLException; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.dao.PhotoDao; +import com.jspsmart.upload.File; +import com.jspsmart.upload.SmartUpload; +import com.jspsmart.upload.SmartUploadException; +import com.toolsBean.Change; +import com.valueBean.PhotoSingle; +import com.valueBean.UserSingle; + +public class PhotoServlet extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + doPost(request,response); + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String action=request.getParameter("action"); + if("listShow".equals(action)) + doListShow(request,response); + else if("singleShow".equals(action)) + doSingleShow(request,response); + else if("adminList".equals(action)) + doAdminList(request,response); + else if("adminSingle".equals(action)) + doAdminSingle(request,response); + else if("insert".equals(action)) + doInsert(request,response); + else if("delete".equals(action)) + doDelete(request,response); + else + doOther(request,response); + } + + protected void doListShow(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("listShowPage")); + + HttpSession session=request.getSession(); + UserSingle callMaster=(UserSingle)session.getAttribute("callBlogMaster"); + + int userid=callMaster.getId(); + String showPage=request.getParameter("showPage"); + String goWhich="my/guest/photo?action=listShow"; + + List photoList=null; + PhotoDao photoDao=new PhotoDao(); + try { + photoList=photoDao.getListPhoto(userid,showPage, goWhich); + } catch (SQLException e) { + System.out.println("ȡͼƬбʧܣ"); + e.printStackTrace(); + } + request.setAttribute("photolist",photoList); + request.setAttribute("createPage",photoDao.getPage()); + + String forward=this.getServletContext().getInitParameter("indexTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + + protected void doSingleShow(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("singleShowPage")); + try { + int id=Change.strToInt(request.getParameter("id")); + PhotoDao photoDao=new PhotoDao(); + PhotoSingle single=photoDao.getSinglePhoto(id); // ȡͼƬϸϢ + request.setAttribute("photosingle",single); + } catch (Exception e) { + System.out.println("ȡͼƬϸϢʧܣ"); + e.printStackTrace(); + } + String forward=this.getServletContext().getInitParameter("indexTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doAdminList(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("adminListPage")); + HttpSession session=request.getSession(); + UserSingle logoner=(UserSingle)session.getAttribute("logoner"); + + int whoid=logoner.getId(); + String showPage=request.getParameter("showPage"); + String goWhich="my/admin/photo?action=adminList"; + + List photoList=null; + PhotoDao photoDao=new PhotoDao(); + try { + photoList=photoDao.getListPhoto(whoid,showPage, goWhich); + } catch (SQLException e) { + System.out.println("̨ȡͼƬбʧܣ"); + e.printStackTrace(); + } + request.setAttribute("photolist",photoList); + request.setAttribute("createPage",photoDao.getPage()); + + String forward=this.getServletContext().getInitParameter("adminTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doAdminSingle(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("adminSinglePage")); + try { + int id=Change.strToInt(request.getParameter("id")); + PhotoDao photoDao=new PhotoDao(); + PhotoSingle single=photoDao.getSinglePhoto(id); // ȡͼƬϸϢ + request.setAttribute("photosingle",single); + } catch (Exception e) { + System.out.println("̨ȡͼƬϸϢʧܣ"); + e.printStackTrace(); + } + String forward=this.getServletContext().getInitParameter("adminTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doInsert(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("upLoadPage")); + + String message=""; + HttpSession session=request.getSession(); + int whoid=((UserSingle)session.getAttribute("logoner")).getId(); + String type=request.getParameter("type"); + + if("upload".equals(type)){ //ϴͼƬύť + try { + SmartUpload myup=new SmartUpload(); + myup.initialize(this, request, response); + myup.setAllowedFilesList("jpg,jpeg,gif"); //ϴļ + myup.upload(); //ϴļ + File upfile=myup.getFiles().getFile(0); //ȡϴļΪֻϴһļֻһԪ + + message=validateUpLoad(upfile); //֤ϴļĴС + if(message.equals("")){ //֤ͨ + Date now=new Date(); //ȡǰʱ + String src=Change.getSerial(now)+"."+upfile.getFileExt(); + String info=myup.getRequest().getParameter("info"); + if(info==null||info.equals("")) + info="ҵͼƬ"; + String time=Change.dateTimeChange(now); + + Object[] params={whoid,src,info,time}; + PhotoDao photoDao=new PhotoDao(); + int i=photoDao.upLoad(params); + if(i<=0) + message="
  • ͼƬϴʧܣ
  • "; + else{ + upfile.saveAs("images/photo/"+src,File.SAVEAS_VIRTUAL); //ļ + message="
  • ļϴɹ
  • "; + } + } + }catch(SecurityException e1){ //Υϴļͺ׳쳣 + message="
  • ֻϴ jpgjpeggif ʽͼƬ
  • "; + e1.printStackTrace(); + }catch (SmartUploadException e2) { + message="
  • ͼƬϴʧܣ
  • "; + e2.printStackTrace(); + }catch(Exception e3){ + message="
  • ͼƬϴʧܣ
  • "; + e3.printStackTrace(); + } + } + else //ϴͼƬӴ + message="
  • ѡҪϴͼƬ
  • "; + + request.setAttribute("message",message); + String forward=getServletContext().getInitParameter("adminTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doDelete(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String message=""; + String forward=""; + int id=Change.strToInt(request.getParameter("id")); + + PhotoDao photoDao=new PhotoDao(); + try{ + PhotoSingle single=new PhotoSingle(); + single=photoDao.getSinglePhoto(id); + + String photoName=single.getPhotoSrc(); + String photoPath=getServletContext().getRealPath("\\")+"images\\photo\\"+photoName; + java.io.File delPhoto=new java.io.File(photoPath); + boolean delete=delPhoto.delete(); + if(delete){ //ӴɾͼƬɹ + int i=photoDao.delete(id); + if(i<=0){ + message="
  • ͼƬѾӴɾڴݱɾͼƬϢʱʧܣ

  • ء"; + forward=getServletContext().getInitParameter("messagePage"); + } + else{ + message="
  • ɾɹ
  • "; + forward="/my/admin/photo?action=adminList"; + } + } + else{ + message="
  • ޷ӴɾͼƬ
  • ء"; + forward=getServletContext().getInitParameter("messagePage"); + } + }catch(Exception e){ + e.printStackTrace(); + forward=getServletContext().getInitParameter("messagePage"); + } + + request.setAttribute("message",message); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doOther(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + + } + private String validateUpLoad(File upfile){ + String message=""; + long maxLen=2*1024*1024; //ϴļ󳤶ΪMB + if(upfile.isMissing()){ //ûѡļ + message+="
  • ѡҪϴͼƬ
  • "; + } + else{ + int len=upfile.getSize(); + if(len==0) + message="
  • ϴСΪ0Ŀļ
  • "; + else if(len>maxLen) + message="
  • ϴͼƬӦΪMB
  • "; + } + return message; + } +} diff --git a/15/src/com/servlet/UserLogon.java b/15/src/com/servlet/UserLogon.java new file mode 100644 index 0000000..d644fe3 --- /dev/null +++ b/15/src/com/servlet/UserLogon.java @@ -0,0 +1,65 @@ +package com.servlet; + +import java.io.IOException; +import java.sql.SQLException; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.dao.UserDao; +import com.toolsBean.Change; +import com.valueBean.UserSingle; + +public class UserLogon extends HttpServlet { + + protected void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + doPost(request,response); + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String message=""; + String forward=getInitParameter("visitorLogonPage"); + HttpSession session=request.getSession(); + + Object logoner=session.getAttribute("logoner"); + if(logoner!=null&&(logoner instanceof UserSingle)) //ûѾ¼ + message="
  • Ѿ¼
  • "; + else{ //ûûе¼ + String name=Change.toChinese(request.getParameter("userName")); + String pswd=Change.toChinese(request.getParameter("userPswd")); + + message=validateLogon(name,pswd); //б֤ + if(message.equals("")){ //֤ɹ + try { + UserDao userDao=new UserDao(); + logoner=userDao.getLogoner(new Object[]{name,pswd}); + if(logoner==null) + message="
  • ġû ȷ
  • "; + else{ + message="
  • ¼ɹ
  • "; + session.setAttribute("logoner",logoner); + } + } catch (SQLException e) { + message="
  • ¼ʧܣ
  • "; + e.printStackTrace(); + } + } + } + + request.setAttribute("message",message); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + private String validateLogon(String name,String pswd){ + String message=""; + if(name==null||name.equals("")) + message="
  • û
  • "; + if(pswd==null||pswd.equals("")) + message+="
  •   룡
  • "; + return message; + } +} diff --git a/15/src/com/servlet/UserServlet.java b/15/src/com/servlet/UserServlet.java new file mode 100644 index 0000000..4e27751 --- /dev/null +++ b/15/src/com/servlet/UserServlet.java @@ -0,0 +1,168 @@ +package com.servlet; + +import java.io.IOException; +import java.sql.SQLException; +import java.util.Date; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.dao.PhotoDao; +import com.dao.UserDao; +import com.jspsmart.upload.File; +import com.jspsmart.upload.SmartUpload; +import com.jspsmart.upload.SmartUploadException; +import com.toolsBean.Change; +import com.valueBean.UserSingle; + +public class UserServlet extends HttpServlet { + private String userIco="myNull.jpg"; + protected void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + doPost(request,response); + } + protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String action=request.getParameter("action"); + if("upIco".equals(action)) + doUpLoadIco(request,response); + else if("userReg".equals(action)) + doUserReg(request,response); + else + doOther(request,response); + } + + protected void doUserReg(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String forward=""; + String message=""; + + UserSingle single=(UserSingle)request.getAttribute("regUser"); + message=validateReg(single); + + if(!message.equals("")) //֤ʧ + forward=getInitParameter("input"); + else{ //֤ɹ + try { + UserDao userDao=new UserDao(); + + String ctTime=Change.dateTimeChange(new Date()); + single.setUserCTTime(ctTime); + single.setUserIco(userIco); + + userDao.insert(single); + forward="/goIndex"; + } catch (SQLException e) { + e.printStackTrace(); + message="
  • עᲩʧܣ
  • "; + forward=getInitParameter("input"); + } + } + userIco+="1"; + request.setAttribute("message",message); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + public void doUpLoadIco(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { + String message=""; + try { + SmartUpload myup=new SmartUpload(); + myup.initialize(this, request, response); + + myup.setAllowedFilesList("jpg,gif"); //ϴļ + myup.upload(); + File upfile=myup.getFiles().getFile(0); //ȡϴļΪֻϴһļֻһԪ + if(!upfile.isMissing()){ //ûѡҪϴͼƬ + message=validateUpLoad(upfile); //֤ϴļĴС + if(message.equals("")){ //֤ͨ + Date now=new Date(); + String src="userIco_"+Change.getSerial(now)+"."+upfile.getFileExt(); + userIco=src; + upfile.saveAs("images/ico/"+src,File.SAVEAS_VIRTUAL); //ļ + message="
  • ͷϴɹ
  • "; + } + } + else + message="
  • ѡͼƬ
  • "; + }catch(SecurityException e){ + e.printStackTrace(); + message="
  • ϴͼƬֻΪ jpggif ʽ
  • "; + } catch (Exception e1) { + e1.printStackTrace(); + message="
  • ͷϴʧܣԲϴʹĬͷ
  • "; + e1.printStackTrace(); + } + request.setAttribute("message",message); + RequestDispatcher rd=request.getRequestDispatcher(getInitParameter("input")); + rd.forward(request,response); + } + private String validateReg(UserSingle single){ + String message=""; + String userName=single.getUserName(); + String userPswd=single.getUserPswd(); + String aginPswd=single.getAginPswd(); + String blogName=single.getUserBlogName(); + String userMotto=single.getUserMotto(); + String userOicq=single.getUserOicq(); + String userEmail=single.getUserEmail(); + + boolean mark=true; + if(userName==null||userName.equals("")){ + message="
  • "; + mark=false; + } + if(userPswd==null||userPswd.equals("")){ + message+="
  • "; + mark=false; + } + if(aginPswd==null||aginPswd.equals("")){ + message+="
  • ȷ
  • "; + mark=false; + } + if(blogName==null||blogName.equals("")){ + message+="
  • "; + mark=false; + } + if(userMotto==null||userMotto.equals("")){ + message+="
  • ǩ
  • "; + mark=false; + } + + if(mark){ //жǷһ + if(!userPswd.equals(aginPswd)){ + message="
  • 벻һ£
  • "; + mark=false; + } + } + if(mark){ //жϣOICQE-mailжǷΪָʽ + if(userOicq!=null&&!userOicq.equals("")){ + try{ + Long.parseLong(userOicq); + }catch(NumberFormatException e){ + message="
  • OICQ ֣
  • "; + e.printStackTrace(); + } + } + if(userEmail!=null&&!userEmail.equals("")){ + String emailRegex="\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"; + if(!userEmail.matches(emailRegex)) + message+="
  • E-mail ַȷ
  • "; + } + } + return message; + } + private String validateUpLoad(File upfile){ + String message=""; + long maxLen=1*1024*1024; //ϴļ󳤶ΪMB + int len=upfile.getSize(); + if(len==0) + message="
  • ϴСΪ0Ŀļ
  • "; + else if(len>maxLen) + message="
  • ϴͼƬӦΪ1MB
  • "; + return message; + } + protected void doOther(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + + } +} diff --git a/15/src/com/servlet/WordServlet.java b/15/src/com/servlet/WordServlet.java new file mode 100644 index 0000000..051770b --- /dev/null +++ b/15/src/com/servlet/WordServlet.java @@ -0,0 +1,136 @@ +package com.servlet; + +import java.io.IOException; +import java.sql.SQLException; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.dao.ArtReviewDao; +import com.dao.MediaDao; +import com.dao.MediaRevDao; +import com.dao.WordDao; +import com.toolsBean.Change; +import com.valueBean.MediaSingle; +import com.valueBean.UserSingle; + +public class WordServlet extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + doPost(request,response); + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String action=request.getParameter("action"); + if("linkTo".equals(action)) + doShowPage(request,response); + else if("listShow".equals(action)) + doListShow(request,response); + else if("review".equals(action)) + doReview(request,response); + else if("delete".equals(action)) + doDelete(request,response); + else + doOther(request,response); + } + protected void doShowPage(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + request.setAttribute("mainPage",getInitParameter("leaveWordPage")); + + HttpSession session=request.getSession(); + UserSingle callMaster=(UserSingle)session.getAttribute("callBlogMaster"); + int userid=callMaster.getId(); + + List wordList=null; + WordDao wordDao=new WordDao(); + try { + wordList=wordDao.getNewWord(userid); + } catch (SQLException e) { + System.out.println("ȡʧܣ"); + e.printStackTrace(); + } + request.setAttribute("wordList",wordList); + + String forward=this.getServletContext().getInitParameter("indexTemp"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doListShow(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + HttpSession session=request.getSession(); + UserSingle callMaster=(UserSingle)session.getAttribute("callBlogMaster"); + + int userid=callMaster.getId(); + String showPage=request.getParameter("showPage"); + String goWhich="my/guest/word?action=listShow"; + + List wordList=null; + WordDao wordDao=new WordDao(); + try { + wordList=wordDao.getMoreWord(userid,showPage, goWhich); + } catch (SQLException e) { + System.out.println("ȡбʧܣ"); + e.printStackTrace(); + } + request.setAttribute("wordList",wordList); + request.setAttribute("createPage",wordDao.getPage()); + + String forward=getInitParameter("listShowPage"); + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doReview(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + String forward=""; + String message=validateInsert(request); //б֤ + if(!"".equals(message)) //֤ʧ + forward=this.getServletContext().getInitParameter("messagePage"); + else{ //֤ɹ + HttpSession session=request.getSession(); + UserSingle callMaster=(UserSingle)session.getAttribute("callBlogMaster"); + + int userid=callMaster.getId(); + String content=request.getParameter("wordContent"); + String time=Change.dateTimeChange(new Date()); + String author=""; + String noname=request.getParameter("noname"); + if("true".equals(noname)) // + author=""; + else // + author=((UserSingle)session.getAttribute("logoner")).getUserName(); + + try { + WordDao wordDao=new WordDao(); + wordDao.insert(new Object[]{userid,content,author,time}); + message="
  • Գɹ
  • "; + forward="/my/guest/word?action=linkTo"; + } catch (SQLException e) { + message="
  • ʧܣ
  • "; + forward=this.getServletContext().getInitParameter("messagePage"); + e.printStackTrace(); + } + } + request.setAttribute("message",message); + + RequestDispatcher rd=request.getRequestDispatcher(forward); + rd.forward(request,response); + } + protected void doModify(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + + } + protected void doDelete(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + + } + protected void doOther(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { + + } + private String validateInsert(HttpServletRequest request) throws ServletException, IOException{ + String message=""; + String content=request.getParameter("wordContent"); + if(content==null||content.equals("")) + message="
  • ݣ
  • ء"; + return message; + } +} \ No newline at end of file diff --git a/15/src/com/toolsBean/Change.java b/15/src/com/toolsBean/Change.java new file mode 100644 index 0000000..0112c26 --- /dev/null +++ b/15/src/com/toolsBean/Change.java @@ -0,0 +1,55 @@ +package com.toolsBean; + +import java.io.UnsupportedEncodingException; +import java.text.SimpleDateFormat; +import java.util.Date; + +public class Change { + public static String htmlSetChange(String source){ + String changeStr=""; + changeStr=source.replace("&","&"); + changeStr=changeStr.replace(" "," "); + changeStr=changeStr.replace("<","<"); + changeStr=changeStr.replace(">",">"); + changeStr=changeStr.replace("\r\n","
    "); + return changeStr; + } + public static String toChinese(String source){ + if(source==null) + source=""; + try { + source=new String(source.getBytes("ISO-8859-1"),"gb2312"); + } catch (UnsupportedEncodingException e) { + source=""; + e.printStackTrace(); + } + return source; + } + public static String dateTimeChange(Date date){ + String strDate=""; + if(date!=null){ + SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + strDate=format.format(date); + } + return strDate; + } + public static String getSerial(Date date){ + String strDate=""; + if(date!=null){ + SimpleDateFormat format=new SimpleDateFormat("MMddyyyyHHmmss"); + strDate=format.format(date); + } + return strDate; + } + public static int strToInt(String src){ + if(src==null||src.equals("")) + src="-1"; + int result=-1; + try{ + result=Integer.parseInt(src); + }catch(NumberFormatException e){ + e.printStackTrace(); + } + return result; + } +} \ No newline at end of file diff --git a/15/src/com/toolsBean/CreatePage.java b/15/src/com/toolsBean/CreatePage.java new file mode 100644 index 0000000..0c153c4 --- /dev/null +++ b/15/src/com/toolsBean/CreatePage.java @@ -0,0 +1,113 @@ +package com.toolsBean; + +public class CreatePage { + private int currentP; //ǰҳ + private int allP; //ҳ + private int allR; //ܼ¼ + private int perR; //ÿҳʾ¼ + private String pageLink; //ҳϢ + private String pageInfo; //ҳ״̬ʾϢ + + public CreatePage(){ + currentP=1; + allP=1; + allR=0; + perR=3; + pageLink=""; + pageInfo=""; + } + + /** ÿҳʾ¼ */ + public void setPerR(int perR){ + this.perR=perR; + } + + /** ܼ¼ */ + public void setAllR(int allR){ + this.allR=allR; + } + /** ҳ */ + public void setAllP(){ + allP=(allR%perR==0)?(allR/perR):(allR/perR+1); + } + + /** õǰҳ */ + public void setCurrentP(String currentP) { + if(currentP==null||currentP.equals("")) + currentP="1"; + try{ + this.currentP=Integer.parseInt(currentP); + }catch(NumberFormatException e){ + this.currentP=1; + e.printStackTrace(); + } + if(this.currentP<1) + this.currentP=1; + if(this.currentP>allP) + this.currentP=allP; + } + + /** ÷ҳ״̬ʾϢ */ + public void setPageInfo(){ + if(allP>=1){ + pageInfo="
    "; + pageInfo+="ÿҳʾ"+perR+"/"+allR+" ¼"; + pageInfo+="    "; + pageInfo+="ǰҳ"+currentP+"/"+allP+" ҳ"; + pageInfo+="
    "; + } + } + + /** ÷ҳϢ */ + public void setPageLink(String goWhich){ + if(goWhich==null) + goWhich=""; + if(goWhich.indexOf("?")>=0) + goWhich+="&"; + else + goWhich+="?"; + if(allP>1){ + pageLink="
    "; + if(currentP>1){ + pageLink+="ҳ  "; + pageLink+="һҳ  "; + } + if(currentPһҳ  "; + pageLink+="βҳ"; + } + pageLink+="
    "; + } + } + + + /** ÿҳ¼ */ + public int getPerR(){ + return perR; + } + + /** ܼ¼ */ + public int getAllR() { + return allR; + } + + /** ҳ */ + public int getAllP() { + return allP; + } + + /** صǰҳ */ + public int getCurrentP() { + return currentP; + } + + /** طҳ״̬ʾϢ */ + public String getPageInfo(){ + return pageInfo; + } + + /** طҳϢ */ + public String getPageLink(){ + return pageLink; + } +} \ No newline at end of file diff --git a/15/src/com/toolsBean/DB.java b/15/src/com/toolsBean/DB.java new file mode 100644 index 0000000..f34a693 --- /dev/null +++ b/15/src/com/toolsBean/DB.java @@ -0,0 +1,102 @@ +package com.toolsBean; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +public class DB { + private Connection con; + private PreparedStatement pstm; + private String user="sa"; + private String password=""; + private String className="com.microsoft.sqlserver.jdbc.SQLServerDriver"; + private String url="jdbc:sqlserver://localhost:1433;DatabaseName=db_mediaBlog"; + + /** 췽ڸ÷мݿ */ + public DB(){ + try{ + Class.forName(className); + }catch(ClassNotFoundException e){ + System.out.println("ݿʧܣ"); + e.printStackTrace(); + } + } + + /**ݿ*/ + public Connection getCon(){ + if(con==null){ + try { + con=DriverManager.getConnection(url,user,password); + } catch (SQLException e) { + System.out.println("ݿʧܣ"); + con=null; + e.printStackTrace(); + } + } + return con; + } + + /** + *@ܣݿɾġ + *@sqlΪSQL䣻paramsΪObject飬洢ΪsqlʾSQL"?"ռλֵ + */ + public void doPstm(String sql,Object[] params){ + if(sql!=null&&!sql.equals("")){ + if(params==null) + params=new Object[0]; + getCon(); + if(con!=null){ + try{ + System.out.println(sql); + pstm=con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); + for(int i=0;i=artContent.length()||len<=0) + return Change.htmlSetChange(artContent); + else{ + return Change.htmlSetChange((artContent.substring(0,len)+"...")); + } + } + public void setArtContent(String artContent) { + this.artContent = artContent; + } + public String getArtPubTime() { + return artPubTime; + } + public void setArtPubTime(String artPubTime) { + this.artPubTime = artPubTime; + } + public int getArtCount() { + return artCount; + } + public void setArtCount(int artCount) { + this.artCount = artCount; + } + public int getRevCount() { + return revCount; + } + public void setRevCount(int revCount) { + this.revCount = revCount; + } +} \ No newline at end of file diff --git a/15/src/com/valueBean/ElectSingle.java b/15/src/com/valueBean/ElectSingle.java new file mode 100644 index 0000000..e2c2931 --- /dev/null +++ b/15/src/com/valueBean/ElectSingle.java @@ -0,0 +1,48 @@ +package com.valueBean; + +public class ElectSingle { + private int id; + private int electWhoId; + private String electTitle; + private String electSrc; + private String electTime; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public int getElectWhoId() { + return electWhoId; + } + public void setElectWhoId(int electWhoId) { + this.electWhoId = electWhoId; + } + public String getElectTitle() { + return electTitle; + } + public String getCutElectTitle() { + int len=14; + if(len>=electTitle.length()||len<=0) + return electTitle; + else{ + return (electTitle.substring(0,len)+".."); + } + } + public void setElectTitle(String electTitle) { + this.electTitle = electTitle; + } + public String getElectSrc() { + return electSrc; + } + public void setElectSrc(String electSrc) { + this.electSrc = electSrc; + } + public String getElectTime() { + return electTime; + } + public void setElectTime(String electTime) { + this.electTime = electTime; + } +} diff --git a/15/src/com/valueBean/LinkSingle.java b/15/src/com/valueBean/LinkSingle.java new file mode 100644 index 0000000..93aee95 --- /dev/null +++ b/15/src/com/valueBean/LinkSingle.java @@ -0,0 +1,48 @@ +package com.valueBean; + +public class LinkSingle { + private int id; + private int linkWhoId; + private String linkTitle; + private String linkSrc; + private String linkTime; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public int getLinkWhoId() { + return linkWhoId; + } + public void setLinkWhoId(int linkWhoId) { + this.linkWhoId = linkWhoId; + } + public String getLinkTitle() { + return linkTitle; + } + public String getCutLinkTitle() { + int len=14; + if(len>=linkTitle.length()||len<=0) + return linkTitle; + else{ + return (linkTitle.substring(0,len)+".."); + } + } + public void setLinkTitle(String linkTitle) { + this.linkTitle = linkTitle; + } + public String getLinkSrc() { + return linkSrc; + } + public void setLinkSrc(String linkSrc) { + this.linkSrc = linkSrc; + } + public String getLinkTime() { + return linkTime; + } + public void setLinkTime(String linkTime) { + this.linkTime = linkTime; + } +} diff --git a/15/src/com/valueBean/MediaRevSingle.java b/15/src/com/valueBean/MediaRevSingle.java new file mode 100644 index 0000000..5cf21fd --- /dev/null +++ b/15/src/com/valueBean/MediaRevSingle.java @@ -0,0 +1,40 @@ +package com.valueBean; + +public class MediaRevSingle { + private int id; + private int mediaRRootId; + private String mediaRAuthor; + private String mediaRContent; + private String mediaRTime; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public int getMediaRRootId() { + return mediaRRootId; + } + public void setMediaRRootId(int mediaRRootId) { + this.mediaRRootId = mediaRRootId; + } + public String getMediaRAuthor() { + return mediaRAuthor; + } + public void setMediaRAuthor(String mediaRAuthor) { + this.mediaRAuthor = mediaRAuthor; + } + public String getMediaRContent() { + return mediaRContent; + } + public void setMediaRContent(String mediaRContent) { + this.mediaRContent = mediaRContent; + } + public String getMediaRTime() { + return mediaRTime; + } + public void setMediaRTime(String mediaRTime) { + this.mediaRTime = mediaRTime; + } +} diff --git a/15/src/com/valueBean/MediaSingle.java b/15/src/com/valueBean/MediaSingle.java new file mode 100644 index 0000000..20d87a2 --- /dev/null +++ b/15/src/com/valueBean/MediaSingle.java @@ -0,0 +1,75 @@ +package com.valueBean; + +public class MediaSingle { + private int id; + private int mediaWhoId; + private String mediaTitle; + private String mediaSrc; + private String mediaPic; + private String mediaInfo; + private String mediaUptime; + private int lookCount; + private int reviCount; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public int getMediaWhoId() { + return mediaWhoId; + } + public void setMediaWhoId(int mediaWhoId) { + this.mediaWhoId = mediaWhoId; + } + public String getMediaTitle() { + return mediaTitle; + } + public String getSubMediaTitle() { + int len=10; + if(mediaTitle.length()<=len) + return mediaTitle; + else + return mediaTitle.substring(0,len)+".."; + } + public void setMediaTitle(String mediaTitle) { + this.mediaTitle = mediaTitle; + } + public String getMediaSrc() { + return mediaSrc; + } + public void setMediaSrc(String mediaSrc) { + this.mediaSrc = mediaSrc; + } + public String getMediaPic() { + return mediaPic; + } + public void setMediaPic(String mediaPic) { + this.mediaPic = mediaPic; + } + public String getMediaInfo() { + return mediaInfo; + } + public void setMediaInfo(String mediaInfo) { + this.mediaInfo = mediaInfo; + } + public String getMediaUptime() { + return mediaUptime; + } + public void setMediaUptime(String mediaUptime) { + this.mediaUptime = mediaUptime; + } + public int getLookCount() { + return lookCount; + } + public void setLookCount(int lookCount) { + this.lookCount = lookCount; + } + public int getReviCount() { + return reviCount; + } + public void setReviCount(int reviCount) { + this.reviCount = reviCount; + } +} diff --git a/15/src/com/valueBean/PhotoSingle.java b/15/src/com/valueBean/PhotoSingle.java new file mode 100644 index 0000000..ad7615b --- /dev/null +++ b/15/src/com/valueBean/PhotoSingle.java @@ -0,0 +1,47 @@ +package com.valueBean; + +public class PhotoSingle { + private int id; + private int photoWhoId; + private String photoSrc; + private String photoInfo; + private String photoUptime; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public int getPhotoWhoId() { + return photoWhoId; + } + public void setPhotoWhoId(int photoWhoId) { + this.photoWhoId = photoWhoId; + } + public String getPhotoSrc() { + return photoSrc; + } + public void setPhotoSrc(String photoSrc) { + this.photoSrc = photoSrc; + } + public String getPhotoInfo() { + return photoInfo; + } + public String getSubPhotoInfo() { + int len=9; + if(photoInfo.length()<=len) + return photoInfo; + else + return photoInfo.substring(0,len)+"..."; + } + public void setPhotoInfo(String photoInfo) { + this.photoInfo = photoInfo; + } + public String getPhotoUptime() { + return photoUptime; + } + public void setPhotoUptime(String photoUptime) { + this.photoUptime = photoUptime; + } +} diff --git a/15/src/com/valueBean/UserSingle.java b/15/src/com/valueBean/UserSingle.java new file mode 100644 index 0000000..23dea16 --- /dev/null +++ b/15/src/com/valueBean/UserSingle.java @@ -0,0 +1,118 @@ +package com.valueBean; + +public class UserSingle { + private int id; + private String userName; + private String userPswd; + private String aginPswd; + private String userIco; + private String userMotto; + private String userSex; + private String userOicq; + private String userEmail; + private String userFrom; + private String userBlogName; + private String userCTTime; + private int userHitNum; + + public UserSingle(){ + userName=""; + userPswd=""; + aginPswd=""; + userIco=""; + userMotto=""; + userSex=""; + userOicq=""; + userEmail=""; + userFrom=""; + userBlogName=""; + userHitNum=0; + } + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public String getUserName() { + return userName; + } + public void setUserName(String userName) { + this.userName = userName; + } + public String getUserPswd() { + return userPswd; + } + public void setUserPswd(String userPswd) { + this.userPswd = userPswd; + } + public String getAginPswd() { + return aginPswd; + } + public void setAginPswd(String aginPswd) { + this.aginPswd = aginPswd; + } + public String getUserIco() { + return userIco; + } + public void setUserIco(String userIco) { + this.userIco = userIco; + } + public String getUserMotto() { + return userMotto; + } + public void setUserMotto(String userMotto) { + this.userMotto = userMotto; + } + public String getUserSex() { + return userSex; + } + public void setUserSex(String userSex) { + this.userSex = userSex; + } + public String getUserOicq() { + return userOicq; + } + public void setUserOicq(String userOicq) { + this.userOicq = userOicq; + } + public String getUserEmail() { + return userEmail; + } + public void setUserEmail(String userEmail) { + this.userEmail = userEmail; + } + public String getUserFrom() { + return userFrom; + } + public void setUserFrom(String userFrom) { + this.userFrom = userFrom; + } + public String getUserBlogName() { + return userBlogName; + } + public String getCutUserBlogName() { + int len=14; + if(len>=userBlogName.length()||len<=0) + return userBlogName; + else{ + return (userBlogName.substring(0,len)+".."); + } + } + public void setUserBlogName(String userBlogName) { + this.userBlogName = userBlogName; + } + public String getUserCTTime() { + return userCTTime; + } + public void setUserCTTime(String userCTTime) { + this.userCTTime = userCTTime; + } + public int getUserHitNum() { + return userHitNum; + } + public void setUserHitNum(int userHitNum) { + this.userHitNum = userHitNum; + } +} diff --git a/15/src/com/valueBean/WordSingle.java b/15/src/com/valueBean/WordSingle.java new file mode 100644 index 0000000..0788ffa --- /dev/null +++ b/15/src/com/valueBean/WordSingle.java @@ -0,0 +1,40 @@ +package com.valueBean; + +public class WordSingle { + private int id; + private int wordWhoId; + private String wordContent; + private String wordAuthor; + private String wordTime; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public int getWordWhoId() { + return wordWhoId; + } + public void setWordWhoId(int wordWhoId) { + this.wordWhoId = wordWhoId; + } + public String getWordContent() { + return wordContent; + } + public void setWordContent(String wordContent) { + this.wordContent = wordContent; + } + public String getWordAuthor() { + return wordAuthor; + } + public void setWordAuthor(String wordAuthor) { + this.wordAuthor = wordAuthor; + } + public String getWordTime() { + return wordTime; + } + public void setWordTime(String wordTime) { + this.wordTime = wordTime; + } +} diff --git "a/15/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/15/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..091c365 Binary files /dev/null and "b/15/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/16/.classpath b/16/.classpath new file mode 100644 index 0000000..40b4f47 --- /dev/null +++ b/16/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/16/.mymetadata b/16/.mymetadata new file mode 100644 index 0000000..2ee2579 --- /dev/null +++ b/16/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/16/.project b/16/.project new file mode 100644 index 0000000..e8a0625 --- /dev/null +++ b/16/.project @@ -0,0 +1,50 @@ + + + 16 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/16/.settings/.jsdtscope b/16/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/16/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/16/.settings/org.eclipse.wst.jsdt.ui.superType.container b/16/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/16/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/16/.settings/org.eclipse.wst.jsdt.ui.superType.name b/16/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/16/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/16/WebRoot/CSS/style.css b/16/WebRoot/CSS/style.css new file mode 100644 index 0000000..3b86bd7 --- /dev/null +++ b/16/WebRoot/CSS/style.css @@ -0,0 +1,91 @@ + + \ No newline at end of file diff --git a/16/WebRoot/Database/db_shopping_Data.MDF b/16/WebRoot/Database/db_shopping_Data.MDF new file mode 100644 index 0000000..7482dfc Binary files /dev/null and b/16/WebRoot/Database/db_shopping_Data.MDF differ diff --git a/16/WebRoot/Database/db_shopping_log.LDF b/16/WebRoot/Database/db_shopping_log.LDF new file mode 100644 index 0000000..54326ff Binary files /dev/null and b/16/WebRoot/Database/db_shopping_log.LDF differ diff --git a/16/WebRoot/META-INF/MANIFEST.MF b/16/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..5e94951 --- /dev/null +++ b/16/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/16/WebRoot/META-INF/context.xml b/16/WebRoot/META-INF/context.xml new file mode 100644 index 0000000..dbd195a --- /dev/null +++ b/16/WebRoot/META-INF/context.xml @@ -0,0 +1,7 @@ + + + diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/chinese/ToChinese.class b/16/WebRoot/WEB-INF/classes/com/mingri/chinese/ToChinese.class new file mode 100644 index 0000000..13afae0 Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/chinese/ToChinese.class differ diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/dbconn/DBResult.class b/16/WebRoot/WEB-INF/classes/com/mingri/dbconn/DBResult.class new file mode 100644 index 0000000..93d0e1b Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/dbconn/DBResult.class differ diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/info/GysRegist.class b/16/WebRoot/WEB-INF/classes/com/mingri/info/GysRegist.class new file mode 100644 index 0000000..d01b428 Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/info/GysRegist.class differ diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/info/GysinfoBean.class b/16/WebRoot/WEB-INF/classes/com/mingri/info/GysinfoBean.class new file mode 100644 index 0000000..68ac4f8 Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/info/GysinfoBean.class differ diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/info/KhRegist.class b/16/WebRoot/WEB-INF/classes/com/mingri/info/KhRegist.class new file mode 100644 index 0000000..d74c455 Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/info/KhRegist.class differ diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/info/KhinfoBean.class b/16/WebRoot/WEB-INF/classes/com/mingri/info/KhinfoBean.class new file mode 100644 index 0000000..f91bd24 Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/info/KhinfoBean.class differ diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/info/Quest.class b/16/WebRoot/WEB-INF/classes/com/mingri/info/Quest.class new file mode 100644 index 0000000..9e431d1 Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/info/Quest.class differ diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/info/QuestString.class b/16/WebRoot/WEB-INF/classes/com/mingri/info/QuestString.class new file mode 100644 index 0000000..9445e13 Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/info/QuestString.class differ diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/info/SpRegist.class b/16/WebRoot/WEB-INF/classes/com/mingri/info/SpRegist.class new file mode 100644 index 0000000..7c172db Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/info/SpRegist.class differ diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/info/SpinfoBean.class b/16/WebRoot/WEB-INF/classes/com/mingri/info/SpinfoBean.class new file mode 100644 index 0000000..58e6235 Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/info/SpinfoBean.class differ diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/showtime/CalendarBean.class b/16/WebRoot/WEB-INF/classes/com/mingri/showtime/CalendarBean.class new file mode 100644 index 0000000..f2b9832 Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/showtime/CalendarBean.class differ diff --git a/16/WebRoot/WEB-INF/classes/com/mingri/showtime/ShowTime.class b/16/WebRoot/WEB-INF/classes/com/mingri/showtime/ShowTime.class new file mode 100644 index 0000000..771c0c3 Binary files /dev/null and b/16/WebRoot/WEB-INF/classes/com/mingri/showtime/ShowTime.class differ diff --git a/16/WebRoot/WEB-INF/lib/jcommon-1.0.9.jar b/16/WebRoot/WEB-INF/lib/jcommon-1.0.9.jar new file mode 100644 index 0000000..a44d0d3 Binary files /dev/null and b/16/WebRoot/WEB-INF/lib/jcommon-1.0.9.jar differ diff --git a/16/WebRoot/WEB-INF/lib/jfreechart-1.0.9.jar b/16/WebRoot/WEB-INF/lib/jfreechart-1.0.9.jar new file mode 100644 index 0000000..d1e2b74 Binary files /dev/null and b/16/WebRoot/WEB-INF/lib/jfreechart-1.0.9.jar differ diff --git a/16/WebRoot/WEB-INF/lib/sqljdbc.jar b/16/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/16/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/16/WebRoot/WEB-INF/web.xml b/16/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..8455e3b --- /dev/null +++ b/16/WebRoot/WEB-INF/web.xml @@ -0,0 +1,22 @@ + + + + + DisplayChart + + org.jfree.chart.servlet.DisplayChart + + + + DisplayChart + /servlet/DisplayChart + + + + index.jsp + + diff --git a/16/WebRoot/blank.jsp b/16/WebRoot/blank.jsp new file mode 100644 index 0000000..4b70875 --- /dev/null +++ b/16/WebRoot/blank.jsp @@ -0,0 +1,6 @@ + + + + + + diff --git a/16/WebRoot/chat.jsp b/16/WebRoot/chat.jsp new file mode 100644 index 0000000..2f298c3 --- /dev/null +++ b/16/WebRoot/chat.jsp @@ -0,0 +1,24 @@ + +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +ϵͳ + + + + + + + + + + + + + + +<body> +</body> + diff --git a/16/WebRoot/cxtj/main.jsp b/16/WebRoot/cxtj/main.jsp new file mode 100644 index 0000000..e69de29 diff --git a/16/WebRoot/cxtj/sprkchat.jsp b/16/WebRoot/cxtj/sprkchat.jsp new file mode 100644 index 0000000..4b3290e --- /dev/null +++ b/16/WebRoot/cxtj/sprkchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +Ʒ + + + + + + +<body> +</body> + diff --git a/16/WebRoot/cxtj/sprkquest.jsp b/16/WebRoot/cxtj/sprkquest.jsp new file mode 100644 index 0000000..a95d577 --- /dev/null +++ b/16/WebRoot/cxtj/sprkquest.jsp @@ -0,0 +1,107 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> + + + + + Ϣѯ + + +<% + String table="tb_ruku",httpFile="sprkquest.jsp"; + String date="rkdate"; + String pages=request.getParameter("pages"); + String cif=request.getParameter("cif"); + String ccif=request.getParameter("ccif"); + String qvalue=trans.trans(request.getParameter("qvalue")); + String andor=request.getParameter("andor"); + String sdate=request.getParameter("sdate");//ñвѯʼʱ + String edate=request.getParameter("edate");//ñвѯֹʱ + qu.setCcif(ccif);qu.setCif(cif);qu.setQValue(qvalue); + qu.setAndor(andor); qu.setSdate(sdate); qu.setEdate(edate); + //String strCount=qu.getCount(table); + //BeangetDateCount()û̵ʱѯļ¼ + String strCount=qu.getDateCount(table,date); + if(pages==null||pages.equals("null")){ + pages="0"; + } + qu.setQuerySql(httpFile,pages,strCount); + //ڱtb_sellûύʱѯļ¼Ľ + ResultSet rs=rst.getResult((String)qu.getDateString(table,date)); + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ʊ: + <%=rs.getString("ID")%>Ʒ: + <%=rs.getString("spid")%>Ʒƣ + <%=rs.getString("spname")%>
    : + <%=rs.getString("jc")%>: + <%=rs.getString("cd")%>: + <%=rs.getString("gg")%>
    װ: + <%=rs.getString("bz")%>: + <%=rs.getString("dj")%>: + <%=rs.getString("sl")%>
    : + <%=rs.getString("je")%>Ӧȫ: + <%=rs.getString("gysname")%>: + <%=rs.getString("rkdate").substring(0,10)%>
    Ա: + <%=rs.getString("czy")%>: + <%=rs.getString("jsr")%>㷽ʽ: + <%=rs.getString("jsfs")%>
    +
    +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+ + "&andor="+qu.getAndor()+"&sdate="+qu.getSdate()+"&edate="+qu.getEdate(); +qu.setStr_parameter(str_parameter); +%> +<%=qu.pageFooter()%> + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/cxtj/sprkquest1.jsp b/16/WebRoot/cxtj/sprkquest1.jsp new file mode 100644 index 0000000..3323c1f --- /dev/null +++ b/16/WebRoot/cxtj/sprkquest1.jsp @@ -0,0 +1,141 @@ +<%@ page contentType="text/html;charset=gb2312"%> +<%request.setCharacterEncoding("gb2312");%> + + Ʒѯ + + + + + + + + + +
    +   ǰλãѯͳ> Ʒѯ >>>
    + + + +
    +
    +
    ѡѯ: + + + + +
    + ѯڣ + + + + + +
    +
    +
      +
    +
    + + + diff --git a/16/WebRoot/cxtj/spxsphchat.jsp b/16/WebRoot/cxtj/spxsphchat.jsp new file mode 100644 index 0000000..c24472a --- /dev/null +++ b/16/WebRoot/cxtj/spxsphchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +Ʒп + + + + + + +<body> +</body> + diff --git a/16/WebRoot/cxtj/spxsphquest.jsp b/16/WebRoot/cxtj/spxsphquest.jsp new file mode 100644 index 0000000..e373f90 --- /dev/null +++ b/16/WebRoot/cxtj/spxsphquest.jsp @@ -0,0 +1,75 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + + + +Ʒ + + + + + + + + + + + + +<% + request.setCharacterEncoding("gb2312"); + String table="tb_sell"; String httpFile="spxsphquest.jsp"; + String date="xsdate"; + String pages=request.getParameter("pages"); + String sdate=request.getParameter("sdate"); + String edate=request.getParameter("edate"); + String orderby=request.getParameter("orderby"); + String paixu=request.getParameter("paixu"); + qu.setSdate(sdate);qu.setEdate(edate); + qu.setOrderby(orderby);qu.setPaixu(paixu); + qu.setPageSize(10); + String strCount=qu.getOrderCount(table,date); + if(pages==null||pages.equals("")){ + pages="0"; + } + qu.setQuerySql(httpFile,pages,strCount); + ResultSet rs=rst.getResult((String)qu.getOrderString(table,date)); + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%> + + + + + + + + + +<%}i++;} + rs.close(); + String str_parameter="&sdate="+qu.getSdate()+"&edate="+qu.getEdate()+ + "&orderby="+qu.getOrderby()+"&paixu="+qu.getPaixu(); + //session.setAttribute("str_parameter",str_parameter); + qu.setStr_parameter(str_parameter); +%> +
    +
    Ʒ
    +
    Ʒ
    +
    +
    +
    װ
    +
    +
    + <%=rs.getString("spid")%> + <%=rs.getString("spname")%> + <%=rs.getString("cd")%> + <%=rs.getString("gg")%> + <%=rs.getString("bz")%> + <%=rs.getString("sl")%>(<%=rs.getString("dw")%>) + <%=rs.getString("je")%>
    +<%=qu.pageFooter()%> + + + diff --git a/16/WebRoot/cxtj/spxsphquest1.jsp b/16/WebRoot/cxtj/spxsphquest1.jsp new file mode 100644 index 0000000..933228c --- /dev/null +++ b/16/WebRoot/cxtj/spxsphquest1.jsp @@ -0,0 +1,117 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> + + Ʒ + + + + + + + +
    +   ǰλãѯͳ> Ʒ >>>
    + + + + + +
    + ѡѯ: + + : +   + + + +
    +
    + + + diff --git a/16/WebRoot/cxtj/spyearchat.jsp b/16/WebRoot/cxtj/spyearchat.jsp new file mode 100644 index 0000000..e322322 --- /dev/null +++ b/16/WebRoot/cxtj/spyearchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +ҵϵͳ + + + + + + +<body> +</body> + \ No newline at end of file diff --git a/16/WebRoot/cxtj/spyearquest.jsp b/16/WebRoot/cxtj/spyearquest.jsp new file mode 100644 index 0000000..044689e --- /dev/null +++ b/16/WebRoot/cxtj/spyearquest.jsp @@ -0,0 +1,66 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ page import="org.jfree.chart.ChartFactory" %> +<%@ page import="org.jfree.chart.JFreeChart" %> +<%@ page import="org.jfree.data.category.DefaultCategoryDataset" %> +<%@ page import="org.jfree.chart.plot.PlotOrientation" %> +<%@ page import="org.jfree.chart.entity.StandardEntityCollection" %> +<%@ page import="org.jfree.chart.ChartRenderingInfo" %> +<%@ page import="org.jfree.chart.servlet.ServletUtilities" %> + +<%@ page import="java.io.*,java.sql.*"%> + + +<% + String year=request.getParameter("year"); + //ij갴·ݷ۶SQL + String strSql="select * from (select sum(je) as sumje,month(xsdate) as xsmonth from tb_sell where year(xsdate)='"+ + year+"' group by month(xsdate) union select 0,MonthName from GetMonth() where MonthName not in (select month(xsdate) as xsmonth from tb_sell where year(xsdate)='"+ + year+"' group by month(xsdate))) temp order by temp.xsmonth"; + ResultSet rs=rst.getResult(strSql); + int counts=0; + if(!rs.next()){ + out.println(""); + } +%> + + +<% +DefaultCategoryDataset dataset1=new DefaultCategoryDataset(); +for(int j=1;j<=12;j++){ //ѭ1ѭ12 + float sumje=Float.valueOf(rs.getString("sumje")); + int y=rs.getInt("xsmonth"); + dataset1.addValue(sumje,y+"",y+""); + rs.next(); +} +//JFreeChartͼ +JFreeChart chart=ChartFactory.createBarChart3D( + year+"۶ͼ", //ͼ + "·", //xʾ + "", //yʾ + dataset1, //ݼ + PlotOrientation.VERTICAL,//ͼ(ֱ) + true, //Ƿͼ + false, //Ƿʾ + false //ǷURL + ); +//ͼļ +// ̶÷ +ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection()); +String fileName=ServletUtilities.saveChartAsPNG(chart,500,300,info,session); +String url=request.getContextPath()+"/servlet/DisplayChart?filename="+fileName; + +%> + +۶ + + + + + + + +
     
    + + diff --git a/16/WebRoot/cxtj/spyearquest1.jsp b/16/WebRoot/cxtj/spyearquest1.jsp new file mode 100644 index 0000000..3a99277 --- /dev/null +++ b/16/WebRoot/cxtj/spyearquest1.jsp @@ -0,0 +1,33 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> + + Ʒ + + + + + + +
    +
    + + + + + + + + + +
    +   ǰλãѯͳ>۶ >>>
     ѡҪзݣ + +
    +
    + + + + diff --git a/16/WebRoot/cxtj/xsxxchat.jsp b/16/WebRoot/cxtj/xsxxchat.jsp new file mode 100644 index 0000000..3af8702 --- /dev/null +++ b/16/WebRoot/cxtj/xsxxchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +Ʒ۲ѯ + + + + + + +<body> +</body> + diff --git a/16/WebRoot/cxtj/xsxxquest.jsp b/16/WebRoot/cxtj/xsxxquest.jsp new file mode 100644 index 0000000..3443bae --- /dev/null +++ b/16/WebRoot/cxtj/xsxxquest.jsp @@ -0,0 +1,107 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> + + + + + Ϣѯ + + +<% + String table="tb_sell",httpFile="xsxxquest.jsp"; + String date="xsdate"; + String pages=request.getParameter("pages"); + String cif=request.getParameter("cif"); + String ccif=request.getParameter("ccif"); + String qvalue=trans.trans(request.getParameter("qvalue")); + String andor=request.getParameter("andor"); + String sdate=request.getParameter("sdate");//ñвѯʼʱ + String edate=request.getParameter("edate");//ñвѯֹʱ + qu.setCcif(ccif);qu.setCif(cif);qu.setQValue(qvalue); + qu.setAndor(andor); qu.setSdate(sdate); qu.setEdate(edate); + //String strCount=qu.getCount(table); + //BeangetDateCount()û̵ʱѯļ¼ + String strCount=qu.getDateCount(table,date); + if(pages==null||pages.equals("null")){ + pages="0"; + } + qu.setQuerySql(httpFile,pages,strCount); + //ڱtb_sellûύʱѯļ¼Ľ + ResultSet rs=rst.getResult((String)qu.getDateString(table,date)); + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ʊ: + <%=rs.getString("ID")%>Ʒ: + <%=rs.getString("spid")%>Ʒƣ + <%=rs.getString("spname")%>
    : + <%=rs.getString("jc")%>: + <%=rs.getString("cd")%>: + <%=rs.getString("gg")%>
    װ: + <%=rs.getString("bz")%>: + <%=rs.getString("dj")%>: + <%=rs.getString("sl")%>
    : + <%=rs.getString("je")%>ͻȫ: + <%=rs.getString("khname")%>: + <%=rs.getString("xsdate").substring(0,10)%>
    Ա: + <%=rs.getString("czy")%>: + <%=rs.getString("jsr")%>㷽ʽ: + <%=rs.getString("jsfs")%>
    +
    +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+ + "&andor="+qu.getAndor()+"&sdate="+qu.getSdate()+"&edate="+qu.getEdate(); +qu.setStr_parameter(str_parameter); +%> +<%=qu.pageFooter()%> + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/cxtj/xsxxquest1.jsp b/16/WebRoot/cxtj/xsxxquest1.jsp new file mode 100644 index 0000000..08cd323 --- /dev/null +++ b/16/WebRoot/cxtj/xsxxquest1.jsp @@ -0,0 +1,145 @@ +<%@ page contentType="text/html;charset=gb2312"%> +<%request.setCharacterEncoding("gb2312");%> + + Ϣѯ + + + + + + + + + +
    +   ǰλãѯͳ> Ϣѯ >>>
    + + + +
    +
    +
    ѡѯ: + + + + +
    + ѯڣ + + + + + +
    +
    +
      +
    +
    + + + diff --git a/16/WebRoot/images/Imgmenu1_1.gif b/16/WebRoot/images/Imgmenu1_1.gif new file mode 100644 index 0000000..fddb86a Binary files /dev/null and b/16/WebRoot/images/Imgmenu1_1.gif differ diff --git a/16/WebRoot/images/Imgmenu1_2.gif b/16/WebRoot/images/Imgmenu1_2.gif new file mode 100644 index 0000000..56d829c Binary files /dev/null and b/16/WebRoot/images/Imgmenu1_2.gif differ diff --git a/16/WebRoot/images/Thumbs.db b/16/WebRoot/images/Thumbs.db new file mode 100644 index 0000000..9832aa5 Binary files /dev/null and b/16/WebRoot/images/Thumbs.db differ diff --git a/16/WebRoot/images/cup.GIF b/16/WebRoot/images/cup.GIF new file mode 100644 index 0000000..a778a3e Binary files /dev/null and b/16/WebRoot/images/cup.GIF differ diff --git a/16/WebRoot/images/datetime.gif b/16/WebRoot/images/datetime.gif new file mode 100644 index 0000000..67f5802 Binary files /dev/null and b/16/WebRoot/images/datetime.gif differ diff --git a/16/WebRoot/images/dmwaste.gif b/16/WebRoot/images/dmwaste.gif new file mode 100644 index 0000000..9638050 Binary files /dev/null and b/16/WebRoot/images/dmwaste.gif differ diff --git a/16/WebRoot/images/ed-item.gif b/16/WebRoot/images/ed-item.gif new file mode 100644 index 0000000..94dda82 Binary files /dev/null and b/16/WebRoot/images/ed-item.gif differ diff --git a/16/WebRoot/images/email.GIF b/16/WebRoot/images/email.GIF new file mode 100644 index 0000000..55080cd Binary files /dev/null and b/16/WebRoot/images/email.GIF differ diff --git a/16/WebRoot/images/home.gif b/16/WebRoot/images/home.gif new file mode 100644 index 0000000..6767602 Binary files /dev/null and b/16/WebRoot/images/home.gif differ diff --git a/16/WebRoot/images/homepage.GIF b/16/WebRoot/images/homepage.GIF new file mode 100644 index 0000000..153b861 Binary files /dev/null and b/16/WebRoot/images/homepage.GIF differ diff --git a/16/WebRoot/images/jobPane.gif b/16/WebRoot/images/jobPane.gif new file mode 100644 index 0000000..2a6d897 Binary files /dev/null and b/16/WebRoot/images/jobPane.gif differ diff --git a/16/WebRoot/images/left_top.GIF b/16/WebRoot/images/left_top.GIF new file mode 100644 index 0000000..e7d6237 Binary files /dev/null and b/16/WebRoot/images/left_top.GIF differ diff --git a/16/WebRoot/images/login_bottom.jpg b/16/WebRoot/images/login_bottom.jpg new file mode 100644 index 0000000..ea3c930 Binary files /dev/null and b/16/WebRoot/images/login_bottom.jpg differ diff --git a/16/WebRoot/images/login_btn_bg.gif b/16/WebRoot/images/login_btn_bg.gif new file mode 100644 index 0000000..1cab412 Binary files /dev/null and b/16/WebRoot/images/login_btn_bg.gif differ diff --git a/16/WebRoot/images/login_btn_bg.jpg b/16/WebRoot/images/login_btn_bg.jpg new file mode 100644 index 0000000..51d6516 Binary files /dev/null and b/16/WebRoot/images/login_btn_bg.jpg differ diff --git a/16/WebRoot/images/login_top.jpg b/16/WebRoot/images/login_top.jpg new file mode 100644 index 0000000..03b86ed Binary files /dev/null and b/16/WebRoot/images/login_top.jpg differ diff --git a/16/WebRoot/images/logo.jpg b/16/WebRoot/images/logo.jpg new file mode 100644 index 0000000..9ec2536 Binary files /dev/null and b/16/WebRoot/images/logo.jpg differ diff --git a/16/WebRoot/images/menu_1.JPG b/16/WebRoot/images/menu_1.JPG new file mode 100644 index 0000000..5dc62cb Binary files /dev/null and b/16/WebRoot/images/menu_1.JPG differ diff --git a/16/WebRoot/images/menu_1a.JPG b/16/WebRoot/images/menu_1a.JPG new file mode 100644 index 0000000..bae9ecc Binary files /dev/null and b/16/WebRoot/images/menu_1a.JPG differ diff --git a/16/WebRoot/images/menu_3.JPG b/16/WebRoot/images/menu_3.JPG new file mode 100644 index 0000000..27717a3 Binary files /dev/null and b/16/WebRoot/images/menu_3.JPG differ diff --git a/16/WebRoot/images/menu_4.JPG b/16/WebRoot/images/menu_4.JPG new file mode 100644 index 0000000..8e53284 Binary files /dev/null and b/16/WebRoot/images/menu_4.JPG differ diff --git a/16/WebRoot/images/menu_5.JPG b/16/WebRoot/images/menu_5.JPG new file mode 100644 index 0000000..ff1e853 Binary files /dev/null and b/16/WebRoot/images/menu_5.JPG differ diff --git a/16/WebRoot/images/menu_6.JPG b/16/WebRoot/images/menu_6.JPG new file mode 100644 index 0000000..a9cc4a2 Binary files /dev/null and b/16/WebRoot/images/menu_6.JPG differ diff --git a/16/WebRoot/images/menu_7.JPG b/16/WebRoot/images/menu_7.JPG new file mode 100644 index 0000000..3a84d67 Binary files /dev/null and b/16/WebRoot/images/menu_7.JPG differ diff --git a/16/WebRoot/images/revigate.GIF b/16/WebRoot/images/revigate.GIF new file mode 100644 index 0000000..a682574 Binary files /dev/null and b/16/WebRoot/images/revigate.GIF differ diff --git a/16/WebRoot/images/speaker.bmp b/16/WebRoot/images/speaker.bmp new file mode 100644 index 0000000..b4d4f16 Binary files /dev/null and b/16/WebRoot/images/speaker.bmp differ diff --git a/16/WebRoot/images/subMenu_ico.GIF b/16/WebRoot/images/subMenu_ico.GIF new file mode 100644 index 0000000..c6eaa2e Binary files /dev/null and b/16/WebRoot/images/subMenu_ico.GIF differ diff --git a/16/WebRoot/index.jsp b/16/WebRoot/index.jsp new file mode 100644 index 0000000..41a2f7d --- /dev/null +++ b/16/WebRoot/index.jsp @@ -0,0 +1,59 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> + +ҵ¼ + + + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + +
     û
       룺
      +
    +
    + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/jcxx/gyschat.jsp b/16/WebRoot/jcxx/gyschat.jsp new file mode 100644 index 0000000..cf88e7b --- /dev/null +++ b/16/WebRoot/jcxx/gyschat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +ӦƷϢѯ + + + + + + +<body> +</body> + diff --git a/16/WebRoot/jcxx/gysinfo.html b/16/WebRoot/jcxx/gysinfo.html new file mode 100644 index 0000000..e066a56 --- /dev/null +++ b/16/WebRoot/jcxx/gysinfo.html @@ -0,0 +1,80 @@ + +ӦϢǼ + + + + + + + + + +
    +   ǰλãϢ > ӦϢ >>>

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     ע:*Ϊ
       Ӧȫƣ + *     ƣ
       ַ + *    룺
       绰 + *    棺
       ϵˣ + *    ϵ˵绰
       䣺    У
    +   +  
    +
    + + + diff --git a/16/WebRoot/jcxx/gysinfo.jsp b/16/WebRoot/jcxx/gysinfo.jsp new file mode 100644 index 0000000..ab261bd --- /dev/null +++ b/16/WebRoot/jcxx/gysinfo.jsp @@ -0,0 +1,12 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<% request.setCharacterEncoding("gb2312"); %> + + + + +<% + regist.setGysinfo(gysinfo); + regist.regist(); + out.println(""); +%> diff --git a/16/WebRoot/jcxx/gysquest.jsp b/16/WebRoot/jcxx/gysquest.jsp new file mode 100644 index 0000000..7670241 --- /dev/null +++ b/16/WebRoot/jcxx/gysquest.jsp @@ -0,0 +1,68 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> + + + + +ӦϢѯ + + +<% + String table="tb_supplier",httpFile="gysquest.jsp"; + String pages=request.getParameter("pages"); + String cif=request.getParameter("cif"); + String ccif=request.getParameter("ccif"); + String qvalue=trans.trans(request.getParameter("qvalue")); + qu.setCcif(ccif);qu.setCif(cif);qu.setQValue(qvalue); + String strCount=qu.getCount(table); + if(pages==null||pages.equals("null")){ + pages="0"; + } + qu.setQuerySql(httpFile,pages,strCount); + ResultSet rs=rst.getResult((String)qu.getString(table)); + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%> + + + + + + + + + + + + + + + + + + + + +
    Ӧȫ: + <%=rs.getString("gysname")%>: + <%=rs.getString("jc")%>
    ַ + <%=rs.getString("address")%>: + <%=rs.getString("postcode")%>绰: + <%=rs.getString("tel")%>
    : + <%=rs.getString("fax")%>ϵ: + <%=rs.getString("lxr")%>ϵ˵绰: + <%=rs.getString("lxrtel")%>
    E-Mail: + <%=rs.getString("Email")%>: + <%=rs.getString("khyh")%>
    +
    +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+""; +//session.setAttribute("str_parameter",str_parameter); +qu.setStr_parameter(str_parameter); +%> +<%=qu.pageFooter()%> +
    + + diff --git a/16/WebRoot/jcxx/gysquest1.jsp b/16/WebRoot/jcxx/gysquest1.jsp new file mode 100644 index 0000000..3c2f2b8 --- /dev/null +++ b/16/WebRoot/jcxx/gysquest1.jsp @@ -0,0 +1,57 @@ +<%@ page contentType="text/html;charset=gb2312"%> + + ӦϢѯ + + + + + +<% + session.removeAttribute("gysqu"); +%> + + + + + +
    +   ǰλãϢ> ӦϢѯ >>>
    + + +
    +
    +
    ѡѯ: + + + <%request.setCharacterEncoding("gb2312");%> + + + +
    +
    +
    +
    + + diff --git a/16/WebRoot/jcxx/khchat.jsp b/16/WebRoot/jcxx/khchat.jsp new file mode 100644 index 0000000..a5b875a --- /dev/null +++ b/16/WebRoot/jcxx/khchat.jsp @@ -0,0 +1,16 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> +<%@ page import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +ͻϢѯ + + + + + + +<body> +</body> + diff --git a/16/WebRoot/jcxx/khinfo.html b/16/WebRoot/jcxx/khinfo.html new file mode 100644 index 0000000..4434175 --- /dev/null +++ b/16/WebRoot/jcxx/khinfo.html @@ -0,0 +1,72 @@ + +ͻϢǼ + + + + + + + +
    +   ǰλãϢ > ͻϢ >>>
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     ע:*Ϊ
         ͻȫƣ + *    ͻƣ
         ַ + *    룺
         绰 + *    棺
         ϵˣ + *    ϵ˵绰
         E-Mail    У
         ˺ţ
    +   +
    +
    +
    + + + diff --git a/16/WebRoot/jcxx/khinfo.jsp b/16/WebRoot/jcxx/khinfo.jsp new file mode 100644 index 0000000..3d0acdd --- /dev/null +++ b/16/WebRoot/jcxx/khinfo.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> +<% request.setCharacterEncoding("gb2312");%> + + + + +<% + regist.setKhinfo(khinfo); + regist.regist();//regist()ݿ + out.println(""); +%> diff --git a/16/WebRoot/jcxx/khquest.jsp b/16/WebRoot/jcxx/khquest.jsp new file mode 100644 index 0000000..11eb7c0 --- /dev/null +++ b/16/WebRoot/jcxx/khquest.jsp @@ -0,0 +1,82 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> + + + + +ͻѯҳʾ + + + +<% + String table="tb_customer";//Ҫѯı + String httpFile="khquest.jsp";//ôJSPļ + String pages=request.getParameter("pages");//յǰǵڼҳ + String cif=request.getParameter("cif");//ѯֶ + String ccif=request.getParameter("ccif");//ѯ + //ѯؼֵ֣ͨĴûĿȷʶ + String qvalue=trans.trans(request.getParameter("qvalue")); + //QuestStringֵ + qu.setCcif(ccif);qu.setCif(cif);qu.setQValue(qvalue); + //QuestStringgetCount(String table)ݲѯóҪѯ¼ + String strCount=qu.getCount(table); + //жpagesǷΪnull,ΪnullpagesֵΪ"0" + if(pages==null||pages.equals("null")){ + pages="0"; + } + //QuestStringsetQuerySql()Beanе + qu.setQuerySql(httpFile,pages,strCount); + //QuestStringgetString()ÿִеSQL䣬ResultSet + ResultSet rs=rst.getResult((String)qu.getString(table)); + //QuestStringȡǰҳÿҳʾļ¼ + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + //ͱi¼ָ붨λʾҳĵһ¼ + if(i>(Page-1)*pagesize-1){ +%> + + + + + + + + + + + + + + + + + + + + + +
    ͻȫ: + <%=rs.getString("khname")%>: + <%=rs.getString("khjc")%>ַ: + <%=rs.getString("address")%>
    룺 + <%=rs.getString("postcode")%>绰: + <%=rs.getString("tel")%>: + <%=rs.getString("fax")%>
    ϵ˵绰: + <%=rs.getString("lxrtel")%>ϵ: + <%=rs.getString("lxr")%>: + <%=rs.getString("khyh")%>
    ˺: + <%=rs.getString("yhzh")%>E-Mail: + <%=rs.getString("Email")%>
    +
    +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+""; +//÷ҳӱǩIJ +qu.setStr_parameter(str_parameter); +%> + +<%=qu.pageFooter()%> + +
    + + diff --git a/16/WebRoot/jcxx/khquest1.jsp b/16/WebRoot/jcxx/khquest1.jsp new file mode 100644 index 0000000..029164b --- /dev/null +++ b/16/WebRoot/jcxx/khquest1.jsp @@ -0,0 +1,55 @@ +<%@ page contentType="text/html;charset=gb2312"%> + + ͻϢѯ + + + + + + + + + +
    +   ǰλãϢ > ͻϢѯ >>>
    + + +
    +
    +
         ѡѯ: + + + <%request.setCharacterEncoding("gb2312");%> + + + +
    +
    +
    +
    + + + diff --git a/16/WebRoot/jcxx/main.jsp b/16/WebRoot/jcxx/main.jsp new file mode 100644 index 0000000..ec7e5fe --- /dev/null +++ b/16/WebRoot/jcxx/main.jsp @@ -0,0 +1,10 @@ + + + + diff --git a/16/WebRoot/jcxx/spchat.jsp b/16/WebRoot/jcxx/spchat.jsp new file mode 100644 index 0000000..339488b --- /dev/null +++ b/16/WebRoot/jcxx/spchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +ƷϢѯ + + + + + + +<body> +</body> + diff --git a/16/WebRoot/jcxx/spinfo.jsp b/16/WebRoot/jcxx/spinfo.jsp new file mode 100644 index 0000000..af6bfcd --- /dev/null +++ b/16/WebRoot/jcxx/spinfo.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<% request.setCharacterEncoding("gb2312");%> +<%@ page import="java.sql.*,java.io.*"%> + + + + +<% + regist.setSpinfo(spinfo); + regist.regist(); + out.println(""); +%> diff --git a/16/WebRoot/jcxx/spinfo1.jsp b/16/WebRoot/jcxx/spinfo1.jsp new file mode 100644 index 0000000..6e5a59f --- /dev/null +++ b/16/WebRoot/jcxx/spinfo1.jsp @@ -0,0 +1,64 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + + +ƷϢǼ + + + + +<% + String strSql="select * from tb_supplier"; + ResultSet rs=rst.getResult(strSql); +%> + + + + +
    +   ǰλãϢ > ƷϢ >>>

    +
    + + + + + + + + + + + + + + + + + + + + +
     ע:*Ϊ
          Ʒƣ*      ƣ
          أ*      ţ
          *      װ
          λ*      ׼ĺţ
          Ӧȫƣ      ע
      +
    +
    +
    + + + diff --git a/16/WebRoot/jcxx/spquest.jsp b/16/WebRoot/jcxx/spquest.jsp new file mode 100644 index 0000000..f5cb633 --- /dev/null +++ b/16/WebRoot/jcxx/spquest.jsp @@ -0,0 +1,73 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> +<%@ page import="com.mingri.info.Quest"%> + + + + + Ʒѯ + + + +<% + String table="tb_brand",httpFile="spquest.jsp"; + String pages=request.getParameter("pages"); + String cif=request.getParameter("cif"); + String ccif=request.getParameter("ccif"); + String qvalue=trans.trans(request.getParameter("qvalue")); + qu.setCcif(ccif);qu.setCif(cif);qu.setQValue(qvalue); + String strCount=qu.getCount(table); + if(pages==null||pages.equals("null")){ + pages="0"; + } + qu.setQuerySql(httpFile,pages,strCount); + ResultSet rs=rst.getResult((String)qu.getString(table)); + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%> + + + + + + + + + + + + + + + + + + + + +
    Ʒ: <%=rs.getString("ID")%>: + <%=rs.getString("gg")%>: + <%=rs.getString("jc")%>
    Ʒƣ + <%=rs.getString("spname")%>װ: + <%=rs.getString("bz")%>: + <%=rs.getString("cd")%>
    : + <%=rs.getString("ph")%>Ӧȫ: + <%=rs.getString("gysname")%>λ: + <%=rs.getString("dw")%>
    ׼ĺ: + <%=rs.getString("pzwh")%>ע: + <%=rs.getString("memo")%>

    +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue(); +//session.setAttribute("str_parameter",str_parameter); +qu.setStr_parameter(str_parameter); +%> +<%=qu.pageFooter()%> + + + diff --git a/16/WebRoot/jcxx/spquest1.jsp b/16/WebRoot/jcxx/spquest1.jsp new file mode 100644 index 0000000..288175a --- /dev/null +++ b/16/WebRoot/jcxx/spquest1.jsp @@ -0,0 +1,61 @@ +<%@ page contentType="text/html;charset=gb2312"%> + + ƷϢѯ + + + + +<% + session.removeAttribute("khqu"); +%> + + + + + +
    +   ǰλãϢ > ƷϢѯ >>>
    + + +
    +
    +
    ѡѯ: + + + <%request.setCharacterEncoding("gb2312");%> + + + +
    +
    +
    +
    + + + diff --git a/16/WebRoot/kcgl/kcchat.jsp b/16/WebRoot/kcgl/kcchat.jsp new file mode 100644 index 0000000..446126d --- /dev/null +++ b/16/WebRoot/kcgl/kcchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + + + + + + + + +<body> +</body> + diff --git a/16/WebRoot/kcgl/kcquest.jsp b/16/WebRoot/kcgl/kcquest.jsp new file mode 100644 index 0000000..87284d6 --- /dev/null +++ b/16/WebRoot/kcgl/kcquest.jsp @@ -0,0 +1,64 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> + + + + +ѯ + + +<% + String table="tb_kucun",httpFile="kcquest.jsp"; + String pages=request.getParameter("pages"); + String cif=request.getParameter("cif"); + String ccif=request.getParameter("ccif"); + String qvalue=trans.trans(request.getParameter("qvalue")); + qu.setCcif(ccif);qu.setCif(cif);qu.setQValue(qvalue); + String strCount=qu.getCount(table); + if(pages==null||pages.equals("null")){ + pages="0"; + } + qu.setQuerySql(httpFile,pages,strCount); + ResultSet rs=rst.getResult((String)qu.getString(table)); + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%> + + + + + + + + + + + + + + + + + +
    Ʒ: + <%=rs.getString("spname")%>: + <%=rs.getString("jc")%>: + <%=rs.getString("cd")%>
    : + <%=rs.getString("gg")%>װ: + <%=rs.getString("bz")%>λ: + <%=rs.getString("dw")%>
    : + <%=rs.getString("dj")%>: + <%=rs.getString("kcsl")%>: + <%=rs.getString("kcje")%>
    +
    +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+""; +session.setAttribute("str_parameter",str_parameter); +qu.setStr_parameter(str_parameter); +%> +<%=qu.pageFooter()%> +
    + + diff --git a/16/WebRoot/kcgl/kcquest1.jsp b/16/WebRoot/kcgl/kcquest1.jsp new file mode 100644 index 0000000..5524794 --- /dev/null +++ b/16/WebRoot/kcgl/kcquest1.jsp @@ -0,0 +1,56 @@ +<%@ page contentType="text/html;charset=gb2312"%> + + ƷϢѯ + + + + + + + + +
    +   ǰλã > ѯ >>>
    + + +
    +
    +
    ѡѯ: + + + <%request.setCharacterEncoding("gb2312");%> + + + +
    +
    +
    +
    + + + diff --git a/16/WebRoot/kcgl/main.jsp b/16/WebRoot/kcgl/main.jsp new file mode 100644 index 0000000..e69de29 diff --git a/16/WebRoot/kcgl/modifyPrice.jsp b/16/WebRoot/kcgl/modifyPrice.jsp new file mode 100644 index 0000000..ee5ed61 --- /dev/null +++ b/16/WebRoot/kcgl/modifyPrice.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> + +<% + request.setCharacterEncoding("gb2312"); + String hid=request.getParameter("hid"); + String hkcje=request.getParameter("hkcje"); + String hdj=request.getParameter("hdj"); + String strSql="update tb_kucun set kcje="+hkcje+ + ", dj="+hdj+"where id='"+hid+"'"; + rst.doExecute(strSql); + out.println(""); +%> diff --git a/16/WebRoot/kcgl/modifyPrice1.jsp b/16/WebRoot/kcgl/modifyPrice1.jsp new file mode 100644 index 0000000..0e61246 --- /dev/null +++ b/16/WebRoot/kcgl/modifyPrice1.jsp @@ -0,0 +1,112 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> + + +Ʒ۸ + + +<% + request.setCharacterEncoding("gb2312");//ַͳһύе + String spbh="",cd="",spname="",jc="",gg="",bz="",sl="",je="",dj=""; + String jgspname=request.getParameter("jgspname"); + String strSql="select * from tb_kucun "; + String strSpname="select * from tb_kucun where spname='"+jgspname+"'"; + ResultSet rs=rst.getResult(strSql); + ResultSet rsSpname=rst.getResult(strSpname); + if(rsSpname.next()){ + spbh=rsSpname.getString("id"); cd=rsSpname.getString("cd"); + jc=rsSpname.getString("jc"); gg=rsSpname.getString("gg"); + bz=rsSpname.getString("bz"); sl=rsSpname.getString("kcsl"); + je=rsSpname.getString("kcje"); dj=rsSpname.getString("dj"); + spname=rsSpname.getString("spname"); + } +%> + + + + + +
    +   ǰλã> ۸ >>>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      
     Ʒţ + <%=spbh%>    أ + <%=cd%>
     Ʒƣ + <%=spname%>    ƣ + <%=jc%>
         : + <%=gg%>    װ + <%=bz%>
      +  +
         ۣ +  
      + +   +
    +
    + + + +
    +
    + + + + diff --git a/16/WebRoot/kcgl/spChange.jsp b/16/WebRoot/kcgl/spChange.jsp new file mode 100644 index 0000000..53a4ca7 --- /dev/null +++ b/16/WebRoot/kcgl/spChange.jsp @@ -0,0 +1,49 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> +<%@ page import="com.mingri.dbconn.DBResult"%> + + +<% + request.setCharacterEncoding("gb2312");//ύе + //ȡ + String jc=(String)session.getAttribute("jc"); String spname=(String)session.getAttribute("spname"); + String gg=(String)session.getAttribute("gg"); String rkid=(String)session.getAttribute("rkbh"); + String bz=(String)session.getAttribute("bz"); String gysname=(String)session.getAttribute("gysname"); + String cd=(String)session.getAttribute("cd"); String spid=(String)session.getAttribute("spid"); + String dw=(String)session.getAttribute("dw"); + String sl=(String)request.getParameter("sl"); String czy=(String)request.getParameter("czy"); + String je=(String)request.getParameter("je"); String jsr=(String)request.getParameter("jsr"); + String dj=(String)request.getParameter("dj"); String rkdate=(String)request.getParameter("rkdate"); + String yf=(String)request.getParameter("yf"); String jsfs=(String)request.getParameter("jsfs"); + String sf=(String)request.getParameter("sf"); String wf=(String)request.getParameter("wf"); + String whether=""; + if(wf.equals("0")){//¼ƷʱǷδ + whether=""; + }else{ + whether=""; + } + String theMax=""; + //Ϣ + String rukuSql="insert into tb_ruku values('"+rkid+"','"+spid+"','"+spname+"',"+ + "'"+jc+"','"+cd+"','"+gg+"','"+bz+"','"+dw+"',"+dj+",'"+sl+"',"+je+","+ + "'"+gysname+"','"+rkdate+"','"+czy+"','"+jsr+"','"+jsfs+"')"; + //ƱϢ + String rkphSql="insert into tb_rkph values('"+rkid+"','"+sl+"',"+yf+","+sf+","+ + ""+wf+",'"+gysname+"','"+rkdate+"','"+czy+"','"+jsr+"','"+jsfs+"','"+whether+"')"; + + //޸ĿϢ + String rkkcSelect="select * from tb_kucun where id='"+spid+"'"; + ResultSet rkkc=rst.getResult(rkkcSelect); + String rkkcSql=""; + //жϿǷиƷ޸ĿϢ¼ + if(rkkc.next()){ + rkkcSql="update tb_kucun set kcsl=kcsl+"+sl+",dj="+dj+","+ + "kcje=(kcsl+"+sl+")*"+dj+" where id='"+spid+"'"; + }else{ + rkkcSql="insert into tb_kucun values('"+spid+"','"+spname+"','"+jc+"','"+cd+"',"+ + "'"+gg+"','"+bz+"','"+dw+"',"+dj+","+sl+","+je+")"; + } + rst.getResult(rkkcSql);rst.getResult(rukuSql);rst.getResult(rkphSql); + out.println(""); +%> diff --git a/16/WebRoot/kcgl/sprk.jsp b/16/WebRoot/kcgl/sprk.jsp new file mode 100644 index 0000000..42e491b --- /dev/null +++ b/16/WebRoot/kcgl/sprk.jsp @@ -0,0 +1,169 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + + + +ƷϢ + + + +<% + request.setCharacterEncoding("gb2312");//ַͳһύе + String strSql="select * from tb_brand"; + String maxCount="select max(id) from tb_ruku";//вҳid + ResultSet rs=rst.getResult(strSql);//бʾƷ + String jc=""; String gg="";String bz="";String spid="";String spname=""; + String gysname="";String cd="";String dw="";String theMax=""; + String rkspname=(String)request.getParameter("rkspname");//ûѡƷļ + String rkStr="select * from tb_brand where spname='"+rkspname+"'"; + ResultSet rs1=rst.getResult(rkStr);//ƷƲѯûѡƷ + + if(rs1.next()){ + jc=rs1.getString("jc");gg=rs1.getString("gg");bz=rs1.getString("bz"); + gysname=rs1.getString("gysname"); cd=rs1.getString("cd");dw=rs1.getString("dw"); + spid=rs1.getString("ID");spname=rs1.getString("spname"); + } + ResultSet rs2=rst.getResult(maxCount);//tb_rukuֶ"id"ļ¼ + if(rs2.next()){ + theMax=rs2.getString(1); + } + //ֶμ1 + String rkbh="RK"+calendar.getDateString()+(Integer.parseInt(theMax.substring(10))+1); +%> + + + + + +
    +   ǰλã> Ʒ >>>

    + + + + + + + + + + + + + + + + <% + session.setAttribute("jc",jc); session.setAttribute("spname",spname); + session.setAttribute("gg",gg); session.setAttribute("bz",bz); + session.setAttribute("cd",cd); session.setAttribute("rkbh",rkbh); + session.setAttribute("dw",dw); session.setAttribute("spid",spid); + session.setAttribute("gysname",gysname); + %> + + + + + + + + + + + + + + + + + > + + + +
    +
    +
           ע:*Ϊ
          :<%=rkbh%>
          Ʒ:<%=spname%>        :<%=jc%>
            :<%=gg%>        װ:<%=bz%>
          Ӧȫ:<%=gysname%>        :<%=cd%>
            : + (<%=dw%>)*        :
            : + (Ԫ)*      Ӧ  :
          ʵ  : + (Ԫ)*      δ  :
          Ա:"> +       :*
          : +       㷽ʽ:
    + +   +
    + + + + + + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/kcgl/sprkth.jsp b/16/WebRoot/kcgl/sprkth.jsp new file mode 100644 index 0000000..5d53ec6 --- /dev/null +++ b/16/WebRoot/kcgl/sprkth.jsp @@ -0,0 +1,168 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + + + +Ʒ˻ + + + +<% + request.setCharacterEncoding("gb2312");//ַͳһύе + String strSql="select * from tb_brand"; + String maxCount="select max(id) from tb_rukuth";//˻вҳid + ResultSet rs=rst.getResult(strSql);//бʾƷ + String jc=""; String gg="";String bz="";String spid="";String spname=""; + String gysname="";String cd="";String dw="";String theMax=""; + String rkspname=(String)request.getParameter("rkspname");//ûѡƷļ + String rkStr="select * from tb_brand where spname='"+rkspname+"'"; + ResultSet rs1=rst.getResult(rkStr);//ƷƲѯûѡƷ + + if(rs1.next()){ + jc=rs1.getString("jc");gg=rs1.getString("gg");bz=rs1.getString("bz"); + gysname=rs1.getString("gysname"); cd=rs1.getString("cd");dw=rs1.getString("dw"); + spid=rs1.getString("ID");spname=rs1.getString("spname"); + } + ResultSet rs2=rst.getResult(maxCount);//tb_rukuthֶ"id"ļ¼ + if(rs2.next()){ + theMax=rs2.getString(1); + } + //ֶμ1 + String rkbh="TH"+calendar.getDateString()+(Integer.parseInt(theMax.substring(10))+1); +%> + + + + + +
    +   ǰλã > ˻ >>>

    + + + + + + + + + + + + + + + + + <% + session.setAttribute("jc",jc); session.setAttribute("spname",spname); + session.setAttribute("gg",gg); session.setAttribute("bz",bz); + session.setAttribute("cd",cd); session.setAttribute("rkbh",rkbh); + session.setAttribute("dw",dw); session.setAttribute("spid",spid); + session.setAttribute("gysname",gysname); + %> + + + + + + + + + + + + + + + + + > + + + +
           ע:*Ϊ
          ˻:<%=rkbh%>
          Ʒ:<%=spname%>        :<%=jc%>
            :<%=gg%>        װ:<%=bz%>
          Ӧȫ:<%=gysname%>        :<%=cd%>
            : + (<%=dw%>)*        :
            : + (Ԫ)*      Ӧ  :
          ʵ  : + (Ԫ)*      δ  :
          Ա:"> +       :*
          ˻: +       㷽ʽ:
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/kcgl/sprkthChange.jsp b/16/WebRoot/kcgl/sprkthChange.jsp new file mode 100644 index 0000000..cd33a97 --- /dev/null +++ b/16/WebRoot/kcgl/sprkthChange.jsp @@ -0,0 +1,49 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> +<%@ page import="com.mingri.dbconn.DBResult"%> + + +<% + request.setCharacterEncoding("gb2312");//ύе + //ȡ + String jc=(String)session.getAttribute("jc"); String spname=(String)session.getAttribute("spname"); + String gg=(String)session.getAttribute("gg"); String thid=(String)session.getAttribute("rkbh"); + String bz=(String)session.getAttribute("bz"); String gysname=(String)session.getAttribute("gysname"); + String cd=(String)session.getAttribute("cd"); String spid=(String)session.getAttribute("spid"); + String dw=(String)session.getAttribute("dw"); + String sl=(String)request.getParameter("sl"); String czy=(String)request.getParameter("czy"); + String je=(String)request.getParameter("je"); String jsr=(String)request.getParameter("jsr"); + String dj=(String)request.getParameter("dj"); String thdate=(String)request.getParameter("rkdate"); + String yf=(String)request.getParameter("yf"); String jsfs=(String)request.getParameter("jsfs"); + String sf=(String)request.getParameter("sf"); String wf=(String)request.getParameter("wf"); + String whether=""; + if(wf.equals("0")){//¼ƷʱǷδ + whether=""; + }else{ + whether=""; + } + String theMax=""; + //˻Ϣ + String rukuthSql="insert into tb_rukuth values('"+thid+"','"+spid+"','"+spname+"',"+ + "'"+jc+"','"+cd+"','"+gg+"','"+bz+"','"+dw+"',"+dj+",'"+sl+"',"+je+","+ + "'"+gysname+"','"+thdate+"','"+czy+"','"+jsr+"','"+jsfs+"')"; + //˻ƱϢ + String rkphSql="insert into tb_thph_rk values('"+thid+"','"+sl+"',"+yf+","+sf+","+ + ""+wf+",'"+gysname+"','"+thdate+"','"+czy+"','"+jsr+"','"+jsfs+"','"+whether+"')"; + + //޸ĿϢ + String rkkcSelect="select * from tb_kucun where id='"+spid+"'"; + ResultSet rkkc=rst.getResult(rkkcSelect); + String rkkcSql=""; + //жϿǷиƷ޸ĿϢʾϢ + if(rkkc.next()){ + rkkcSql="update tb_kucun set kcsl=kcsl-"+sl+",dj="+dj+","+ + "kcje=(kcsl-"+sl+")*"+dj+" where id='"+spid+"'"; + }else{ + out.println(""); + } + rst.getResult(rkkcSql);rst.getResult(rukuthSql);rst.getResult(rkphSql); + out.println(""); +%> diff --git a/16/WebRoot/left.jsp b/16/WebRoot/left.jsp new file mode 100644 index 0000000..6fd7339 --- /dev/null +++ b/16/WebRoot/left.jsp @@ -0,0 +1,175 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + ҵ浼 + + + + + + + + + + +
    + + + + +
    + + +
    + + +
    + + +
    + + +
    + +
    + + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/login.jsp b/16/WebRoot/login.jsp new file mode 100644 index 0000000..9c5c59a --- /dev/null +++ b/16/WebRoot/login.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> + + +<% + request.setCharacterEncoding("gb2312");//ͳһ룬 + String username=request.getParameter("username"); //ձеusername + String password=request.getParameter("password");//ձеpassword + String str="select * from tb_user where "+ + "username='"+username+"' and password='"+password+"'"; + ResultSet rs=rst.getResult(str);//ִSQLý + session.setAttribute("isLog",new String("0"));//жûǷ¼isLogΪ0ʱ˵ûûе¼ + if(!rs.next())//ûҵҪҵ + { + out.println(""); + } + else + { + session.setAttribute("username",rs.getString("username"));//¼Ϣsession + session.setAttribute("password",rs.getString("password")); + session.setAttribute("isLog",new String("1"));//isLogΪ1 + //ûϴε¼ϵͳʱ + session.setAttribute("userLastLogTime",rs.getString("userLastLogTime")); + String strsql=calendar.getDate(); + int id=rs.getInt("ID"); + //ûε¼ϵͳʱûϢи + String strUpdate="update tb_user set userLastLogTime='"+strsql+"' where ID="+id+""; + rst.getResult(strUpdate);//ִSQL + response.sendRedirect("chat.jsp");//¼ɹתϵͳҳ + } +%> + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/main.jsp b/16/WebRoot/main.jsp new file mode 100644 index 0000000..e69de29 diff --git a/16/WebRoot/spxs/spxs.jsp b/16/WebRoot/spxs/spxs.jsp new file mode 100644 index 0000000..fbd8cff --- /dev/null +++ b/16/WebRoot/spxs/spxs.jsp @@ -0,0 +1,247 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> + +<%@ page import="java.sql.*,java.io.*"%> + + + +ƷϢ + + +<% + request.setCharacterEncoding("gb2312"); + String strSql="select * from tb_kucun"; + String strKh="select * from tb_customer"; + String maxCount="select max(id) from tb_sell"; + ResultSet rs=rst.getResult(strSql);//бʾƷ + ResultSet rsKh=rst.getResult(strKh); + + String jc=""; String gg="";String bz="";String spid="";String spname=""; + String dj="";String cd="";String dw="";String kcsl="";String theMax=""; + String xsspname=(String)request.getParameter("xsspname");//ûѡƷļ + String rkStr="select * from tb_kucun where jc='"+xsspname+"'"; + ResultSet rs1=rst.getResult(rkStr);//ݼƲѯûѡƷ + + if(rs1.next()){ + jc=rs1.getString("jc");gg=rs1.getString("gg");bz=rs1.getString("bz"); + cd=rs1.getString("cd");dw=rs1.getString("dw");kcsl=rs1.getString("kcsl"); + spid=rs1.getString("ID");spname=rs1.getString("spname"); + dj=rs1.getString("dj"); + } + ResultSet rs2=rst.getResult(maxCount);//tb_rukuֶ"id"ļ¼ + if(rs2.next()){ + theMax=rs2.getString(1); + } + //ֶμ1 + String xsph="XS"+calendar.getDateString()+(Integer.parseInt(theMax.substring(10))+1); +%> + + + + + +
    +   ǰλã۹ > Ʒ >>>

    + + + + + + + + + + + + + + + + + <% + session.setAttribute("jc",jc); session.setAttribute("spname",spname); + session.setAttribute("gg",gg); session.setAttribute("bz",bz); + session.setAttribute("cd",cd); session.setAttribute("xsph",xsph); + session.setAttribute("dw",dw); session.setAttribute("spid",spid); + session.setAttribute("dj",dj); + %> + + + + + + + + + + + + + + + + + + + > + + + +
    ע:*Ϊ
    Ʊ:<%=xsph%>
    Ʒ:<%=spname%>  :<%=jc%>
      :<%=gg%>  װ:<%=bz%>
      :<%=cd%>  :<%=dj%>Ԫ
    ͻȫ: + :
        : + + (Ԫ)    :
        : + + (<%=dw.trim()%>)*Ӧ    :
    ʵ    : + + (Ԫ)*δ    :
      Ա: + "> +   :*
    : + + 㷽ʽ:
      +
    +
    + + + + + + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/spxs/spxsth.jsp b/16/WebRoot/spxs/spxsth.jsp new file mode 100644 index 0000000..7d37620 --- /dev/null +++ b/16/WebRoot/spxs/spxsth.jsp @@ -0,0 +1,242 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> + +<%@ page import="java.sql.*,java.io.*"%> + + + +Ʒ˻Ϣ + + +<% + request.setCharacterEncoding("gb2312"); + String strSql="select * from tb_kucun"; + String strKh="select * from tb_customer"; + String maxCount="select max(id) from tb_sell"; + ResultSet rs=rst.getResult(strSql);//бʾƷ + ResultSet rsKh=rst.getResult(strKh); + + String jc=""; String gg="";String bz="";String spid="";String spname=""; + String dj="";String cd="";String dw="";String kcsl="";String theMax=""; + String xsspname=(String)request.getParameter("xsspname");//ûѡƷļ + String rkStr="select * from tb_kucun where jc='"+xsspname+"'"; + ResultSet rs1=rst.getResult(rkStr);//ݼƲѯûѡƷ + + if(rs1.next()){ + jc=rs1.getString("jc");gg=rs1.getString("gg");bz=rs1.getString("bz"); + cd=rs1.getString("cd");dw=rs1.getString("dw");kcsl=rs1.getString("kcsl"); + spid=rs1.getString("ID");spname=rs1.getString("spname"); + dj=rs1.getString("dj"); + } + ResultSet rs2=rst.getResult(maxCount);//tb_sellthֶ"id"ļ¼ + if(rs2.next()){ + theMax=rs2.getString(1); + } + //ֶμ1 + String xsthph="TH"+calendar.getDateString()+(Integer.parseInt(theMax.substring(10))+1); +%> + + + + + +
    +   ǰλã۹> ˻ >>>

    + + + + + + + + + + + + + + + + + <% + session.setAttribute("jc",jc); session.setAttribute("spname",spname); + session.setAttribute("gg",gg); session.setAttribute("bz",bz); + session.setAttribute("cd",cd); session.setAttribute("xsthph",xsthph); + session.setAttribute("dw",dw); session.setAttribute("spid",spid); + session.setAttribute("dj",dj); + %> + + + + + + + + + + + + + + + + + + + > + + + +
    ע:*Ϊ
    Ʊ:<%=xsthph%>
    Ʒ:<%=spname%>  :<%=jc%>
      :<%=gg%>  װ:<%=bz%>
      :<%=cd%>  :<%=dj%>Ԫ
    ͻȫ::
        : + (Ԫ)    :
        : + (<%=dw.trim()%>)*Ӧ    :
    ʵ    : + (Ԫ)*δ    :
      Ա:"> +   :*
    : + 㷽ʽ:
    +   +
    +
    + + + + + + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/spxs/xsChange.jsp b/16/WebRoot/spxs/xsChange.jsp new file mode 100644 index 0000000..334525d --- /dev/null +++ b/16/WebRoot/spxs/xsChange.jsp @@ -0,0 +1,44 @@ + <%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> +<%@ page import="com.mingri.dbconn.DBResult"%> + + +<% + request.setCharacterEncoding("gb2312");//ύе + //ȡ + String jc=(String)session.getAttribute("jc"); String spname=(String)session.getAttribute("spname"); + String gg=(String)session.getAttribute("gg"); String xsid=(String)session.getAttribute("xsph"); + String bz=(String)session.getAttribute("bz"); + String cd=(String)session.getAttribute("cd"); String spid=(String)session.getAttribute("spid"); + String dw=(String)session.getAttribute("dw"); + String sl=(String)request.getParameter("sl"); String czy=(String)request.getParameter("czy"); + String je=(String)request.getParameter("je"); String jsr=(String)request.getParameter("jsr"); + String dj=(String)request.getParameter("dj"); String xsdate=(String)request.getParameter("xsdate"); + String ys=(String)request.getParameter("ys"); String jsfs=(String)request.getParameter("jsfs"); + String ss=(String)request.getParameter("ss"); String ws=(String)request.getParameter("ws"); + String xskhname=(String)request.getParameter("xskhname"); + String whether=""; + if(ws.equals("0")){ + whether=""; + }else{ + whether=""; + } +%> +<% + //Ϣ + String xsSql="insert into tb_sell values('"+xsid+"','"+spid+"','"+spname+"',"+ + "'"+jc+"','"+cd+"','"+gg+"','"+bz+"','"+dw+"',"+dj+",'"+sl+"',"+je+","+ + "'"+xskhname+"','"+xsdate+"','"+czy+"','"+jsr+"','"+jsfs+"')"; + //ƱϢ + String xsphSql="insert into tb_sellph values('"+xsid+"','"+sl+"',"+ys+","+ss+","+ + ""+ws+",'"+xskhname+"','"+xsdate+"','"+czy+"','"+jsr+"','"+jsfs+"','"+whether+"')"; + + //¿Ϣ + //String rkkcSql="update tb_kucun set kcsl=kcsl-"+sl+",dj="+dj+","+ + //"kcje=(kcsl+"+sl+")*"+dj+" where id='"+spid+"'"; + String rkkcSql="update tb_kucun set kcsl=kcsl-"+sl+","+ + "kcje=(kcsl-"+sl+")* dj where id='"+spid+"'"; + + rst.getResult(rkkcSql);rst.getResult(xsSql);rst.getResult(xsphSql); + out.println(""); +%> diff --git a/16/WebRoot/spxs/xsthChange.jsp b/16/WebRoot/spxs/xsthChange.jsp new file mode 100644 index 0000000..a6cc4bb --- /dev/null +++ b/16/WebRoot/spxs/xsthChange.jsp @@ -0,0 +1,43 @@ + <%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> +<%@ page import="com.mingri.dbconn.DBResult"%> + + +<% + request.setCharacterEncoding("gb2312");//ύе + //ȡ + String jc=(String)session.getAttribute("jc"); String spname=(String)session.getAttribute("spname"); + String gg=(String)session.getAttribute("gg"); String xsid=(String)session.getAttribute("xsthph"); + String bz=(String)session.getAttribute("bz"); + String cd=(String)session.getAttribute("cd"); String spid=(String)session.getAttribute("spid"); + String dw=(String)session.getAttribute("dw"); + String sl=(String)request.getParameter("sl"); String czy=(String)request.getParameter("czy"); + String je=(String)request.getParameter("je"); String jsr=(String)request.getParameter("jsr"); + String dj=(String)request.getParameter("dj"); String xsdate=(String)request.getParameter("xsdate"); + String ys=(String)request.getParameter("ys"); String jsfs=(String)request.getParameter("jsfs"); + String ss=(String)request.getParameter("ss"); String ws=(String)request.getParameter("ws"); + String xskhname=(String)request.getParameter("xskhname"); + String whether=""; + if(ws.equals("0")){ + whether=""; + }else{ + whether=""; + } +%> +<% + //˻Ϣ + String xsSql="insert into tb_sellth values('"+xsid+"','"+spid+"','"+spname+"',"+ + "'"+jc+"','"+cd+"','"+gg+"','"+bz+"','"+dw+"',"+dj+",'"+sl+"',"+je+","+ + "'"+xskhname+"','"+xsdate+"','"+czy+"','"+jsr+"','"+jsfs+"')"; + //˻ƱϢ + String xsphSql="insert into tb_thph_xs values('"+xsid+"','"+sl+"',"+ys+","+ss+","+ + ""+ws+",'"+xskhname+"','"+xsdate+"','"+czy+"','"+jsr+"','"+jsfs+"','"+whether+"')"; + + //¿Ϣ + //String rkkcSql="update tb_kucun set kcsl=kcsl-"+sl+",dj="+dj+","+ + //"kcje=(kcsl+"+sl+")*"+dj+" where id='"+spid+"'"; + String rkkcSql="update tb_kucun set kcsl=kcsl+"+sl+","+ + "kcje=(kcsl+"+sl+")* dj where id='"+spid+"'"; + rst.getResult(rkkcSql);rst.getResult(xsSql);rst.getResult(xsphSql); + out.println(""); +%> diff --git a/16/WebRoot/top.jsp b/16/WebRoot/top.jsp new file mode 100644 index 0000000..18fb12c --- /dev/null +++ b/16/WebRoot/top.jsp @@ -0,0 +1,47 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*,java.util.*"%> + + + + + + +<% + boolean isLog=false; + try + { + //ûǷ¼Ϣ + isLog=((String)session.getAttribute("isLog")).equals("1"); + } + catch(Exception e){} + if(!isLog) + { + out.println(""); + } +%> + + + + +
    + + + + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/top1.jsp b/16/WebRoot/top1.jsp new file mode 100644 index 0000000..1fb3be1 --- /dev/null +++ b/16/WebRoot/top1.jsp @@ -0,0 +1,79 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*,java.util.*"%> + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/wlgl/main.jsp b/16/WebRoot/wlgl/main.jsp new file mode 100644 index 0000000..e69de29 diff --git a/16/WebRoot/wlgl/rkjzquest/rkjzchat.jsp b/16/WebRoot/wlgl/rkjzquest/rkjzchat.jsp new file mode 100644 index 0000000..1de7c90 --- /dev/null +++ b/16/WebRoot/wlgl/rkjzquest/rkjzchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +˿ + + + + + + +<body> +</body> + diff --git a/16/WebRoot/wlgl/rkjzquest/rkjzquest.jsp b/16/WebRoot/wlgl/rkjzquest/rkjzquest.jsp new file mode 100644 index 0000000..5f2eb7d --- /dev/null +++ b/16/WebRoot/wlgl/rkjzquest/rkjzquest.jsp @@ -0,0 +1,89 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> + + + + + ۽˲ѯ + + +<% + String table="tb_rkjz",httpFile="rkjzquest.jsp"; + String date="jkdate"; + String pages=request.getParameter("pages"); + String cif=request.getParameter("cif"); + String ccif=request.getParameter("ccif"); + String qvalue=trans.trans(request.getParameter("qvalue")); + String andor=request.getParameter("andor"); + String sdate=request.getParameter("sdate");//ñвѯʼʱ + String edate=request.getParameter("edate");//ñвѯֹʱ + qu.setCcif(ccif);qu.setCif(cif);qu.setQValue(qvalue); + qu.setAndor(andor); qu.setSdate(sdate); qu.setEdate(edate); + //String strCount=qu.getCount(table); + //BeangetDateCount()û̵ʱѯļ¼ + String strCount=qu.getDateCount(table,date); + if(pages==null||pages.equals("null")){ + pages="0"; + } + qu.setQuerySql(httpFile,pages,strCount); + //ڱtb_sellûύʱѯļ¼Ľ + ResultSet rs=rst.getResult((String)qu.getDateString(table,date)); + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%> + + + + + + + + + + + + + + + + +
    Ʊ: + <%=rs.getString("ID")%>Ʊ: + <%=rs.getString("rkid")%>Ӧƣ + <%=rs.getString("gysname")%>
    ν + <%=rs.getString("bcjk")%>: + <%=rs.getString("ye")%>ڣ + <%=rs.getString("jkdate")%>
    Ա: + <%=rs.getString("czy")%>: + <%=rs.getString("jsr")%>
    +
    +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+ + "&andor="+qu.getAndor()+"&sdate="+qu.getSdate()+"&edate="+qu.getEdate(); +qu.setStr_parameter(str_parameter); +%> +<%=qu.pageFooter()%> + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/wlgl/rkjzquest/rkjzquest1.jsp b/16/WebRoot/wlgl/rkjzquest/rkjzquest1.jsp new file mode 100644 index 0000000..7e045e9 --- /dev/null +++ b/16/WebRoot/wlgl/rkjzquest/rkjzquest1.jsp @@ -0,0 +1,144 @@ +<%@ page contentType="text/html;charset=gb2312"%> +<%request.setCharacterEncoding("gb2312");%> + + ۽˲ѯ + + + + + + + + + +
    +   ǰλã > ˲ѯ >>>
    + + + +
    +
    +
    ѡѯ: + + + + +
    + ѯڣ + + + + + +
    +
    +
      +
    +
    + + + diff --git a/16/WebRoot/wlgl/rkthjz/rkPayFor.jsp b/16/WebRoot/wlgl/rkthjz/rkPayFor.jsp new file mode 100644 index 0000000..5510fa8 --- /dev/null +++ b/16/WebRoot/wlgl/rkthjz/rkPayFor.jsp @@ -0,0 +1,40 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + +<% + request.setCharacterEncoding("gb2312");//ֹ + String id=request.getParameter("jkph"); + String thph=request.getParameter("thph"); + String gysname=request.getParameter("gysname"); + String bcjk=request.getParameter("bcjk"); + String ye=request.getParameter("ye"); + String jkdate=request.getParameter("jkdate"); + String czy=request.getParameter("czy1"); + String jsr=request.getParameter("jsr1"); + String whether="";//жǷɣǷδ + if(ye.equals("0")||ye=="0"){ + whether=""; + } + else{ + whether=""; + } + //˻Ϣ + String strInsert="insert into tb_thjz_rk values('"+id+"','"+thph+"','"+gysname+"',"+ + ""+bcjk+","+ye+",'"+jkdate+"','"+czy+"','"+jsr+"')"; + //˻Ʊݱ(tb_thph_rk) + String strUpdate="update tb_thph_rk set ss=ss+"+bcjk+", ws="+ye+", whether='"+whether+ + "' where thph='"+thph+"'"; + rst.doExecute(strInsert); + rst.doExecute(strUpdate); +%> + + + + + + + + + diff --git a/16/WebRoot/wlgl/rkthjz/rkthjz.jsp b/16/WebRoot/wlgl/rkthjz/rkthjz.jsp new file mode 100644 index 0000000..d1037b9 --- /dev/null +++ b/16/WebRoot/wlgl/rkthjz/rkthjz.jsp @@ -0,0 +1,155 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + + + + + +ƷϢ + + + +<% + //Զ۽Ʊ + String maxCount="select max(id) as maxid from tb_thjz_rk"; + String theMax=""; + ResultSet rsMax=rst.getResult(maxCount); + if(rsMax.next()){ + theMax=rsMax.getString(1); + } + //Ʊַ"JK"ϵͳڼλֱ + String jkph="JK"+calendar.getDateString()+(Integer.parseInt(theMax.substring(10))+1); +// + //ҳʾƷƱű(tb_thph_rk)еϢ + String pages=request.getParameter("pages");//յǰҳҳʾ + String cif=request.getParameter("cif");//ղѯ + String ccif=request.getParameter("ccif");//ղѯ + String qvalue=trans.trans(request.getParameter("qvalue"));//ղѯؼ + String table="tb_thph_rk";//Ҫѯı + String httpFile="rkthjz.jsp";//崦JSPļ + //ѯҪJavaBean + qu.setCif(cif);qu.setQValue(qvalue);qu.setCcif(ccif); + qu.setPageSize(1);//ÿҳʾļ¼Ϊ1 + String strCount=qu.getXSCount(table);//Ҫѯļ¼ + if(pages==null||pages.equals("null")){ + pages="0"; + } + //JavaBeanеķBeanеһЩ(ҪǷҳҪ) + qu.setQuerySql(httpFile,pages,strCount); + //ҪѯĽ + ResultSet rs=rst.getResult((String)qu.getXSString(table)); + //ȡǰҳÿҳʾļ¼ + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%> +
    + + + + + + + + + + + + + + + + + +
    ˻Ʊ: + "> +   :"> +
    Ӧȫ: + "> + Ӧ  :">Ԫ +
    ʵ    : + ">Ԫ + δ  :">Ԫ +
    ˻: + "> + Ա:"> +
    㷽ʽ: + "> + :"> +
    + + + + + + + + + + + + + +
    Ʊ: + : +
    ν: +     : +
      Ա:"> +   :
    +   +
    +
    +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+""; +session.setAttribute("str_parameter",str_parameter); +qu.setStr_parameter(str_parameter); +%> +<%=qu.pageFooter()%> + + + + + + + + + + + + + + + diff --git a/16/WebRoot/wlgl/rkthjz/rkthjz1.jsp b/16/WebRoot/wlgl/rkthjz/rkthjz1.jsp new file mode 100644 index 0000000..77203d9 --- /dev/null +++ b/16/WebRoot/wlgl/rkthjz/rkthjz1.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html;charset=gb2312"%> +<%request.setCharacterEncoding("gb2312");%> + + ˻ + + + + + + + + + + +
    +   ǰλã > ˻ >>>
    + + +
    +
    +
    ѡѯ: + + + + +
    +
    +
    +
    + + + diff --git a/16/WebRoot/wlgl/rkthjz/rkthjzchat.jsp b/16/WebRoot/wlgl/rkthjz/rkthjzchat.jsp new file mode 100644 index 0000000..a2b4ea0 --- /dev/null +++ b/16/WebRoot/wlgl/rkthjz/rkthjzchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +˻˿ + + + + + + +<body> +</body> + diff --git a/16/WebRoot/wlgl/sprkjz/sprkPayFor.jsp b/16/WebRoot/wlgl/sprkjz/sprkPayFor.jsp new file mode 100644 index 0000000..70ef263 --- /dev/null +++ b/16/WebRoot/wlgl/sprkjz/sprkPayFor.jsp @@ -0,0 +1,40 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + +<% + request.setCharacterEncoding("gb2312");//ֹ + String id=request.getParameter("jkph"); + String rkph=request.getParameter("rkph"); + String gysname=request.getParameter("gysname"); + String bcjk=request.getParameter("bcjk"); + String ye=request.getParameter("ye"); + String jkdate=request.getParameter("jkdate"); + String czy=request.getParameter("czy1"); + String jsr=request.getParameter("jsr1"); + String whether="";//жǷɣǷδ + if(ye.equals("0")||ye=="0"){ + whether=""; + } + else{ + whether=""; + } + //Ϣ + String strInsert="insert into tb_rkjz values('"+id+"','"+rkph+"','"+gysname+"',"+ + ""+bcjk+","+ye+",'"+jkdate+"','"+czy+"','"+jsr+"')"; + //Ʊݱ(tb_rkph) + String strUpdate="update tb_rkph set sf=sf+"+bcjk+", wf="+ye+", whether='"+whether+ + "' where rkph='"+rkph+"'"; + rst.doExecute(strInsert); + rst.doExecute(strUpdate); +%> + + + + + + + + + diff --git a/16/WebRoot/wlgl/sprkjz/sprkjz.jsp b/16/WebRoot/wlgl/sprkjz/sprkjz.jsp new file mode 100644 index 0000000..1c39449 --- /dev/null +++ b/16/WebRoot/wlgl/sprkjz/sprkjz.jsp @@ -0,0 +1,153 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + + + + + +ƷϢ + + + +<% + //ԶƱ + String maxCount="select max(id) as maxid from tb_rkjz"; + String theMax=""; + ResultSet rsMax=rst.getResult(maxCount); + if(rsMax.next()){ + theMax=rsMax.getString(1); + } + //Ʊַ"JK"ϵͳڼλֱ + String jkph="JK"+calendar.getDateString()+(Integer.parseInt(theMax.substring(10))+1); +// + //ҳʾƱű(tb_rkph)еϢ + String pages=request.getParameter("pages");//յǰҳҳʾ + String cif=request.getParameter("cif");//ղѯ + String ccif=request.getParameter("ccif");//ղѯ + String qvalue=trans.trans(request.getParameter("qvalue"));//ղѯؼ + String table="tb_rkph";//Ҫѯı + String httpFile="sprkjz.jsp";//崦JSPļ + //ѯҪJavaBean + qu.setCif(cif);qu.setQValue(qvalue);qu.setCcif(ccif); + qu.setPageSize(1);//ÿҳʾļ¼Ϊ1 + String strCount=qu.getXSCount(table);//Ҫѯļ¼ + if(pages==null||pages.equals("null")){ + pages="0"; + } + //JavaBeanеķBeanеһЩ(ҪǷҳҪ) + qu.setQuerySql(httpFile,pages,strCount); + //ҪѯĽ + ResultSet rs=rst.getResult((String)qu.getXSString(table)); + //ȡǰҳÿҳʾļ¼ + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%>
    + + + + + + + + + + + + + + + + + +
    Ʊ: + "> +   :"> +
    Ӧ: + "> + Ӧ  :">Ԫ +
    ʵ    : + ">Ԫ + δ  :">Ԫ +
    : + "> + Ա:"> +
    㷽ʽ: + "> + :"> +
    + + + + + + + + + + + + +
    Ʊ: + : +
    ν: +     : +
      Ա:"> +   :
    +   +
    +
    +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+""; +session.setAttribute("str_parameter",str_parameter); +qu.setStr_parameter(str_parameter); +%> +<%=qu.pageFooter()%> + + + + + + + + + + + + + + + diff --git a/16/WebRoot/wlgl/sprkjz/sprkjz1.jsp b/16/WebRoot/wlgl/sprkjz/sprkjz1.jsp new file mode 100644 index 0000000..bcc0825 --- /dev/null +++ b/16/WebRoot/wlgl/sprkjz/sprkjz1.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html;charset=gb2312"%> +<%request.setCharacterEncoding("gb2312");%> + + Ʒ + + + + + + + + + + +
    +   ǰλã > Ʒ >>>
    + + +
    +
    +
    ѡѯ: + + + + +
    +
    +
    +
    + + + diff --git a/16/WebRoot/wlgl/sprkjz/sprkjzchat.jsp b/16/WebRoot/wlgl/sprkjz/sprkjzchat.jsp new file mode 100644 index 0000000..7decbf9 --- /dev/null +++ b/16/WebRoot/wlgl/sprkjz/sprkjzchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +Ʒ˿ + + + + + + +<body> +</body> + diff --git a/16/WebRoot/wlgl/spxsjz/spPayFor.jsp b/16/WebRoot/wlgl/spxsjz/spPayFor.jsp new file mode 100644 index 0000000..9c84802 --- /dev/null +++ b/16/WebRoot/wlgl/spxsjz/spPayFor.jsp @@ -0,0 +1,40 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + +<% + request.setCharacterEncoding("gb2312");//ֹ + String id=request.getParameter("jkph"); + String xsid=request.getParameter("xsid"); + String khname=request.getParameter("khname"); + String bcjk=request.getParameter("bcjk"); + String ye=request.getParameter("ye"); + String jkdate=request.getParameter("jkdate"); + String czy=request.getParameter("czy1"); + String jsr=request.getParameter("jsr1"); + String whether="";//жǷɣǷδ + if(ye.equals("0")||ye=="0"){ + whether=""; + } + else{ + whether=""; + } + //۽Ϣ + String strInsert="insert into tb_selljz values('"+id+"','"+xsid+"','"+khname+"',"+ + ""+bcjk+","+ye+",'"+jkdate+"','"+czy+"','"+jsr+"')"; + //Ʊݱ(tb_sellph) + String strUpdate="update tb_sellph set ss=ss+"+bcjk+", ws="+ye+", whether='"+whether+ + "' where xsph='"+xsid+"'"; + rst.doExecute(strInsert); + rst.doExecute(strUpdate); +%> + + + + + + + + + diff --git a/16/WebRoot/wlgl/spxsjz/spxsjz.jsp b/16/WebRoot/wlgl/spxsjz/spxsjz.jsp new file mode 100644 index 0000000..3a27601 --- /dev/null +++ b/16/WebRoot/wlgl/spxsjz/spxsjz.jsp @@ -0,0 +1,150 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + + + + + +ƷϢ + + + +<% + //Զ۽Ʊ + String maxCount="select max(id) as maxid from tb_selljz"; + String theMax=""; + ResultSet rsMax=rst.getResult(maxCount); + if(rsMax.next()){ + theMax=rsMax.getString(1); + } + //Ʊַ"JK"ϵͳڼλֱ + String jkph="JK"+calendar.getDateString()+(Integer.parseInt(theMax.substring(10))+1); +// + //ҳʾƷƱű(tb_sellph)еϢ + String pages=request.getParameter("pages");//յǰҳҳʾ + String cif=request.getParameter("cif");//ղѯ + String ccif=request.getParameter("ccif");//ղѯ + String qvalue=trans.trans(request.getParameter("qvalue"));//ղѯؼ + String table="tb_sellph";//Ҫѯı + String httpFile="spxsjz.jsp";//崦JSPļ + //ѯҪJavaBean + qu.setCif(cif);qu.setQValue(qvalue);qu.setCcif(ccif); + qu.setPageSize(1);//ÿҳʾļ¼Ϊ1 + String strCount=qu.getXSCount(table);//Ҫѯļ¼ + if(pages==null||pages.equals("null")){ + pages="0"; + } + //JavaBeanеķBeanеһЩ(ҪǷҳҪ) + qu.setQuerySql(httpFile,pages,strCount); + //ҪѯĽ + ResultSet rs=rst.getResult((String)qu.getXSString(table)); + //ȡǰҳÿҳʾļ¼ + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%> +
    + + + + + + + + + + + + + + + + + +
    Ʊ:"> +   :"> +
    ͻȫ:"> + Ӧ  :">Ԫ +
    ʵ    :">Ԫ + δ  :">Ԫ +
    :"> + Ա:"> +
    㷽ʽ:"> + :"> +
    + + + + + + + + + + + + +
    Ʊ: + : +
    ν: +     : +
      Ա:"> +   :
    +   +
    +
    + +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+""; +session.setAttribute("str_parameter",str_parameter); +qu.setStr_parameter(str_parameter); +%> +<%=qu.pageFooter()%> + + + + + + + + + + + + + + + diff --git a/16/WebRoot/wlgl/spxsjz/spxsjz1.jsp b/16/WebRoot/wlgl/spxsjz/spxsjz1.jsp new file mode 100644 index 0000000..f6eff64 --- /dev/null +++ b/16/WebRoot/wlgl/spxsjz/spxsjz1.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html;charset=gb2312"%> +<%request.setCharacterEncoding("gb2312");%> + + Ʒ۽ + + + + + + + + + + +
    +   ǰλã > Ʒ۽ >>>
    + + +
    +
    +
    ѡѯ: + + + + +
    +
    +
    +
    + + + diff --git a/16/WebRoot/wlgl/spxsjz/spxsjzchat.jsp b/16/WebRoot/wlgl/spxsjz/spxsjzchat.jsp new file mode 100644 index 0000000..483c0fe --- /dev/null +++ b/16/WebRoot/wlgl/spxsjz/spxsjzchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +Ʒ۽˿ + + + + + + +<body> +</body> + diff --git a/16/WebRoot/wlgl/xsjzquest/xsjzchat.jsp b/16/WebRoot/wlgl/xsjzquest/xsjzchat.jsp new file mode 100644 index 0000000..5dbf775 --- /dev/null +++ b/16/WebRoot/wlgl/xsjzquest/xsjzchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +۽˿ + + + + + + +<body> +</body> + diff --git a/16/WebRoot/wlgl/xsjzquest/xsjzquest.jsp b/16/WebRoot/wlgl/xsjzquest/xsjzquest.jsp new file mode 100644 index 0000000..be2f883 --- /dev/null +++ b/16/WebRoot/wlgl/xsjzquest/xsjzquest.jsp @@ -0,0 +1,89 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> + + + + + ۽˲ѯ + + +<% + String table="tb_selljz",httpFile="xsjzquest.jsp"; + String date="jkdate"; + String pages=request.getParameter("pages"); + String cif=request.getParameter("cif"); + String ccif=request.getParameter("ccif"); + String qvalue=trans.trans(request.getParameter("qvalue")); + String andor=request.getParameter("andor"); + String sdate=request.getParameter("sdate");//ñвѯʼʱ + String edate=request.getParameter("edate");//ñвѯֹʱ + qu.setCcif(ccif);qu.setCif(cif);qu.setQValue(qvalue); + qu.setAndor(andor); qu.setSdate(sdate); qu.setEdate(edate); + //String strCount=qu.getCount(table); + //BeangetDateCount()û̵ʱѯļ¼ + String strCount=qu.getDateCount(table,date); + if(pages==null||pages.equals("null")){ + pages="0"; + } + qu.setQuerySql(httpFile,pages,strCount); + //ڱtb_sellûύʱѯļ¼Ľ + ResultSet rs=rst.getResult((String)qu.getDateString(table,date)); + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%> + + + + + + + + + + + + + + + + +
    Ʊ: + <%=rs.getString("ID")%>Ʊ: + <%=rs.getString("xsid")%>ͻƣ + <%=rs.getString("khname")%>
    ν + <%=rs.getString("bcjk")%>: + <%=rs.getString("ye")%>ڣ + <%=rs.getString("jkdate")%>
    Ա: + <%=rs.getString("czy")%>: + <%=rs.getString("jsr")%>
    +
    +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+ + "&andor="+qu.getAndor()+"&sdate="+qu.getSdate()+"&edate="+qu.getEdate(); +qu.setStr_parameter(str_parameter); +%> +<%=qu.pageFooter()%> + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/16/WebRoot/wlgl/xsjzquest/xsjzquest1.jsp b/16/WebRoot/wlgl/xsjzquest/xsjzquest1.jsp new file mode 100644 index 0000000..607b4cf --- /dev/null +++ b/16/WebRoot/wlgl/xsjzquest/xsjzquest1.jsp @@ -0,0 +1,138 @@ +<%@ page contentType="text/html;charset=gb2312"%> +<%request.setCharacterEncoding("gb2312");%> + + ۽˲ѯ + + + + + + + + +
    +   ǰλã > ۽˲ѯ >>>
    + + + +
    +
    +
    ѡѯ: + + + + +
    + ѯڣ + + + + + +
    +
    +
      +
    +
    + + + diff --git a/16/WebRoot/wlgl/xsthjz/xsthPayFor.jsp b/16/WebRoot/wlgl/xsthjz/xsthPayFor.jsp new file mode 100644 index 0000000..0055d89 --- /dev/null +++ b/16/WebRoot/wlgl/xsthjz/xsthPayFor.jsp @@ -0,0 +1,40 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + +<% + request.setCharacterEncoding("gb2312");//ֹ + String id=request.getParameter("jkph"); + String thph=request.getParameter("thph"); + String khname=request.getParameter("khname"); + String bcjk=request.getParameter("bcjk"); + String ye=request.getParameter("ye"); + String jkdate=request.getParameter("jkdate"); + String czy=request.getParameter("czy1"); + String jsr=request.getParameter("jsr1"); + String whether="";//жǷɣǷδ + if(ye.equals("0")||ye=="0"){ + whether=""; + } + else{ + whether=""; + } + //˻Ϣ + String strInsert="insert into tb_thjz_xs values('"+id+"','"+thph+"','"+khname+"',"+ + ""+bcjk+","+ye+",'"+jkdate+"','"+czy+"','"+jsr+"')"; + //˻Ʊݱ(tb_thph_rk) + String strUpdate="update tb_thph_xs set sf=sf+"+bcjk+", wf="+ye+", whether='"+whether+ + "' where thph='"+thph+"'"; + rst.doExecute(strInsert); + rst.doExecute(strUpdate); +%> + + + + + + + + + diff --git a/16/WebRoot/wlgl/xsthjz/xsthjz.jsp b/16/WebRoot/wlgl/xsthjz/xsthjz.jsp new file mode 100644 index 0000000..abbf174 --- /dev/null +++ b/16/WebRoot/wlgl/xsthjz/xsthjz.jsp @@ -0,0 +1,150 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + + + + + +ƷϢ + + + +<% + //Զ۽Ʊ + String maxCount="select max(id) as maxid from tb_thjz_xs"; + String theMax=""; + ResultSet rsMax=rst.getResult(maxCount); + if(rsMax.next()){ + theMax=rsMax.getString(1); + } + //Ʊַ"JK"ϵͳڼλֱ + String jkph="JK"+calendar.getDateString()+(Integer.parseInt(theMax.substring(10))+1); +// + //ҳʾƷƱű(tb_thph_rk)еϢ + String pages=request.getParameter("pages");//յǰҳҳʾ + String cif=request.getParameter("cif");//ղѯ + String ccif=request.getParameter("ccif");//ղѯ + String qvalue=trans.trans(request.getParameter("qvalue"));//ղѯؼ + String table="tb_thph_xs";//Ҫѯı + String httpFile="xsthjz.jsp";//崦JSPļ + //ѯҪJavaBean + qu.setCif(cif);qu.setQValue(qvalue);qu.setCcif(ccif); + qu.setPageSize(1);//ÿҳʾļ¼Ϊ1 + String strCount=qu.getXSCount(table);//Ҫѯļ¼ + if(pages==null||pages.equals("null")){ + pages="0"; + } + //JavaBeanеķBeanеһЩ(ҪǷҳҪ) + qu.setQuerySql(httpFile,pages,strCount); + //ҪѯĽ + ResultSet rs=rst.getResult((String)qu.getXSString(table)); + //ȡǰҳÿҳʾļ¼ + int i=0,Page=qu.getCurPage(),pagesize=qu.getPageSize(); + while(rs.next()){ + if(i>(Page-1)*pagesize-1){ +%> +
    + + + + + + + + + + + + + + + + + +
    ˻Ʊ:"> +   :"> +
    ͻȫ:"> + Ӧ  :">Ԫ +
    ʵ    :">Ԫ + δ  :">Ԫ +
    ˻:"> + Ա:"> +
    㷽ʽ:"> + :"> +
    + + + + + + + + + + + + +
    Ʊ: + : +
    ν: +     : +
      Ա:"> +   :
    +   +
    +
    + +<%}i++;} +rs.close(); +String str_parameter="&cif="+qu.getCif()+"&ccif="+qu.getCcif()+"&qvalue="+qu.getQValue()+""; +session.setAttribute("str_parameter",str_parameter); +qu.setStr_parameter(str_parameter); +%> +<%=qu.pageFooter()%> + + + + + + + + + + + + + + + diff --git a/16/WebRoot/wlgl/xsthjz/xsthjz1.jsp b/16/WebRoot/wlgl/xsthjz/xsthjz1.jsp new file mode 100644 index 0000000..883fe52 --- /dev/null +++ b/16/WebRoot/wlgl/xsthjz/xsthjz1.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html;charset=gb2312"%> +<%request.setCharacterEncoding("gb2312");%> + + ˻ + + + + + + + + + + +
    +   ǰλã> ˻ >>>
    + + +
    +
    +
    ѡѯ: + + + + +
    +
    +
    +
    + + + diff --git a/16/WebRoot/wlgl/xsthjz/xsthjzchat.jsp b/16/WebRoot/wlgl/xsthjz/xsthjzchat.jsp new file mode 100644 index 0000000..7fd865a --- /dev/null +++ b/16/WebRoot/wlgl/xsthjz/xsthjzchat.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + +˻˿ + + + + + + +<body> +</body> + diff --git a/16/WebRoot/xtsz/addUser.jsp b/16/WebRoot/xtsz/addUser.jsp new file mode 100644 index 0000000..72475b8 --- /dev/null +++ b/16/WebRoot/xtsz/addUser.jsp @@ -0,0 +1,82 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> + + + + + Ա + + + +<% + //ֹǷûƹ¼ҳ棬ֱӽϵͳڲ + boolean isLog=false; + try{ + //ûǷ¼Ϣ + isLog=((String)session.getAttribute("isLog")).equals("1"); + }catch(Exception e){} + if(!isLog){ + out.println(""); + } +%> + + + + + + +
    +   ǰλãϵͳ> Ա >>>
    + + + + + +
    Ա + +
    +       룺 + +
    + ȷ룺 + + +
    + +   + + ˳ϵͳ +
    +
    + + + + + + + + + + diff --git a/16/WebRoot/xtsz/updateUser.jsp b/16/WebRoot/xtsz/updateUser.jsp new file mode 100644 index 0000000..f9cdce7 --- /dev/null +++ b/16/WebRoot/xtsz/updateUser.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.sql.*,java.io.*"%> + + + +<% + request.setCharacterEncoding("gb2312"); + String username=request.getParameter("username"); + String password=request.getParameter("newpw1"); + String strSql="select * from tb_user where username='"+username+"'"; + String strAdd=""; + ResultSet rs=rst.getResult(strSql); + if(rs.next()){ + out.println(""); + } + else{ + String strLast=calendar.getDate(); + strAdd="insert into tb_user values ('"+username+"','"+password+"','"+strLast+"')"; + rst.doExecute(strAdd); + out.println(""); + } +%> diff --git a/16/WebRoot/xtsz/userexit.jsp b/16/WebRoot/xtsz/userexit.jsp new file mode 100644 index 0000000..23642ee --- /dev/null +++ b/16/WebRoot/xtsz/userexit.jsp @@ -0,0 +1,8 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<% + //session.removeAttribute("username"); + session.invalidate(); +%> + diff --git a/16/WebRoot/xtsz/usermanager.jsp b/16/WebRoot/xtsz/usermanager.jsp new file mode 100644 index 0000000..c5747db --- /dev/null +++ b/16/WebRoot/xtsz/usermanager.jsp @@ -0,0 +1,120 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="java.io.*,java.sql.*"%> + + + + û + + + + + + +<% + request.setCharacterEncoding("gb2312");//ַͳһύе + //ֹǷûƹ¼ҳ棬ֱӽϵͳڲ + boolean isLog=false; + try{ + //ûǷ¼Ϣ + isLog=((String)session.getAttribute("isLog")).equals("1"); + }catch(Exception e){} + if(!isLog){ + out.println(""); + } +%> + + + + +
    +   ǰλãϵͳ > ޸ >>>
    +
    + + + + + + + + + + + + + + + + + + + +
    + Ա + " readonly /> +
    ԭ    룺 + +
        룺 + +
    ȷ룺 + +
    + + + ˳ϵͳ +
    +
    +
    + + + + + + + + + + diff --git a/16/WebRoot/xtsz/usermodify.jsp b/16/WebRoot/xtsz/usermodify.jsp new file mode 100644 index 0000000..3c02e56 --- /dev/null +++ b/16/WebRoot/xtsz/usermodify.jsp @@ -0,0 +1,23 @@ +<%@ page contentType="text/html;charset=gb2312" language="java"%> +<%@ page import="java.io.*,java.sql.*"%> + +<% + request.setCharacterEncoding("gb2312"); + String username=request.getParameter("username");//û + String password=request.getParameter("password");//վ + String newpw1=request.getParameter("newpw1");// + String strSql="select * from tb_user where username='"+ + username+"'and password='"+password+"'"; + ResultSet rs=rst.getResult(strSql); + if(rs.next()){ + //ûϢ + String strUpdate="update tb_user set password='"+newpw1+ + "' where username='"+username+"'"; + rst.doExecute(strUpdate); + out.println(""); + }else{ + out.println(""); + } +%> diff --git a/16/src/com/mingri/chinese/ToChinese.java b/16/src/com/mingri/chinese/ToChinese.java new file mode 100644 index 0000000..44e4513 --- /dev/null +++ b/16/src/com/mingri/chinese/ToChinese.java @@ -0,0 +1,17 @@ +package com.mingri.chinese; + +import java.io.*; + +public class ToChinese { + public String trans(String str) { + String result = null; + byte temp[]; + try { + temp = str.getBytes("iso-8859-1"); + result = new String(temp); + } catch (UnsupportedEncodingException e) { + System.out.println(e.toString()); + } + return result; + } +} diff --git a/16/src/com/mingri/dbconn/DBResult.java b/16/src/com/mingri/dbconn/DBResult.java new file mode 100644 index 0000000..79c0046 --- /dev/null +++ b/16/src/com/mingri/dbconn/DBResult.java @@ -0,0 +1,58 @@ +package com.mingri.dbconn; + +import java.sql.*; + +import javax.naming.*; +import javax.sql.DataSource; + +public class DBResult { + public static Connection conn = null; + private static String driverClass = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; + private static String URL = "jdbc:sqlserver://localhost:1433;DatabaseName=db_shopping"; + private static String user="sa"; + private static String pwd = ""; + static{ + try { + Class.forName(driverClass); + conn = DriverManager.getConnection(URL, user, pwd); + } catch (Exception e) { + e.printStackTrace(); + } + } + /** + * ڻִSQLResultSet + */ + public ResultSet getResult(String sql) { + try { + Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery(sql); + return rs; + } catch (Exception e) { + } + return null; + } + + /** + * ִSQLûзֵ + */ + public void doExecute(String sql) { + try { + Statement stmt = conn.createStatement(); + stmt.executeQuery(sql); + } catch (Exception e) { + } + } + + /** + * ڻִSQLPreparedStatement(Ԥ) + */ + public PreparedStatement getPreparedStatement(String sql) { + try { + PreparedStatement pstmt = conn.prepareStatement(sql); + return pstmt; + } catch (Exception e) { + } + return null; + } + +} diff --git a/16/src/com/mingri/info/GysRegist.java b/16/src/com/mingri/info/GysRegist.java new file mode 100644 index 0000000..ab3013b --- /dev/null +++ b/16/src/com/mingri/info/GysRegist.java @@ -0,0 +1,38 @@ +package com.mingri.info; + +import com.mingri.dbconn.DBResult; +import java.sql.*; + +public class GysRegist +{ + private GysinfoBean gysinfo; + DBResult rst=new DBResult(); + public void setGysinfo(GysinfoBean gysinfo) + { + this.gysinfo=gysinfo; + } + public void regist()throws Exception + { + String sql="insert into tb_supplier values(?,?,?,?,?,?,?,?,?,?)"; + try + { + PreparedStatement pstmt=rst.getPreparedStatement(sql); + pstmt.setString(1,gysinfo.getGysname()); + pstmt.setString(2,gysinfo.getJc()); + pstmt.setString(3,gysinfo.getAddress()); + pstmt.setString(4,gysinfo.getPostcode()); + pstmt.setString(5,gysinfo.getTel()); + pstmt.setString(6,gysinfo.getFax()); + pstmt.setString(7,gysinfo.getLxr()); + pstmt.setString(8,gysinfo.getLxrtel()); + pstmt.setString(9,gysinfo.getKhyh()); + pstmt.setString(10,gysinfo.getEamil()); + pstmt.executeUpdate(); + } + catch(Exception e) + { + e.printStackTrace(); + throw e; + } + } +} diff --git a/16/src/com/mingri/info/GysinfoBean.java b/16/src/com/mingri/info/GysinfoBean.java new file mode 100644 index 0000000..9d15172 --- /dev/null +++ b/16/src/com/mingri/info/GysinfoBean.java @@ -0,0 +1,76 @@ +package com.mingri.info; + +public class GysinfoBean +{ + private String gysname;//Ӧȫ + private String jc;// + private String address;//ַ + private String postcode;// + private String tel;//绰 + private String fax;// + private String lxr;//ϵ + private String lxrtel;//ϵ˵绰 + private String khyh;// + private String eamil;//ʼ + public String getGysname() { + return gysname; + } + public void setGysname(String gysname) { + this.gysname = gysname; + } + public String getJc() { + return jc; + } + public void setJc(String jc) { + this.jc = jc; + } + public String getAddress() { + return address; + } + public void setAddress(String address) { + this.address = address; + } + public String getPostcode() { + return postcode; + } + public void setPostcode(String postcode) { + this.postcode = postcode; + } + public String getTel() { + return tel; + } + public void setTel(String tel) { + this.tel = tel; + } + public String getFax() { + return fax; + } + public void setFax(String fax) { + this.fax = fax; + } + public String getLxr() { + return lxr; + } + public void setLxr(String lxr) { + this.lxr = lxr; + } + public String getLxrtel() { + return lxrtel; + } + public void setLxrtel(String lxrtel) { + this.lxrtel = lxrtel; + } + public String getKhyh() { + return khyh; + } + public void setKhyh(String khyh) { + this.khyh = khyh; + } + public String getEamil() { + return eamil; + } + public void setEamil(String eamil) { + this.eamil = eamil; + } + +} diff --git a/16/src/com/mingri/info/KhRegist.java b/16/src/com/mingri/info/KhRegist.java new file mode 100644 index 0000000..b84dce6 --- /dev/null +++ b/16/src/com/mingri/info/KhRegist.java @@ -0,0 +1,37 @@ +package com.mingri.info; + +import com.mingri.dbconn.DBResult; +import java.sql.*; + +public class KhRegist { + private KhinfoBean khinfo; + DBResult rst = new DBResult(); + + public void setKhinfo(KhinfoBean khinfo) { + this.khinfo = khinfo; + } + + public void regist() throws Exception { + String reg = "insert into tb_customer values(?,?,?,?,?,?,?,?,?,?,?)"; + try { + PreparedStatement pstmt = rst.getPreparedStatement(reg); + // һԤ䣬ȻǵIJ + pstmt.setString(1, khinfo.getKhname()); + pstmt.setString(2, khinfo.getKhjc()); + pstmt.setString(3, khinfo.getAddress()); + pstmt.setString(4, khinfo.getPostcode()); + pstmt.setString(5, khinfo.getTel()); + pstmt.setString(6, khinfo.getFax()); + pstmt.setString(7, khinfo.getLxr()); + pstmt.setString(8, khinfo.getLxrtel()); + pstmt.setString(9, khinfo.getEmail()); + pstmt.setString(10, khinfo.getKhyh()); + pstmt.setString(11, khinfo.getYhzh()); + // ִи² + pstmt.executeUpdate(); + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } +} diff --git a/16/src/com/mingri/info/KhinfoBean.java b/16/src/com/mingri/info/KhinfoBean.java new file mode 100644 index 0000000..2493149 --- /dev/null +++ b/16/src/com/mingri/info/KhinfoBean.java @@ -0,0 +1,103 @@ +package com.mingri.info; + +public class KhinfoBean { + private String khname;// ͻȫ + private String khjc;// ͻ + private String address;// ַ + private String postcode;// + private String tel;// 绰 + private String fax;// + private String lxr;// ϵ + private String lxrtel;// ϵ˵绰 + private String email;// + private String khyh;// + private String yhzh;// ʺ + + public String getKhname() { + return khname; + } + + public void setKhname(String khname) { + this.khname = khname; + } + + public String getKhjc() { + return khjc; + } + + public void setKhjc(String khjc) { + this.khjc = khjc; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getPostcode() { + return postcode; + } + + public void setPostcode(String postcode) { + this.postcode = postcode; + } + + public String getTel() { + return tel; + } + + public void setTel(String tel) { + this.tel = tel; + } + + public String getFax() { + return fax; + } + + public void setFax(String fax) { + this.fax = fax; + } + + public String getLxr() { + return lxr; + } + + public void setLxr(String lxr) { + this.lxr = lxr; + } + + public String getLxrtel() { + return lxrtel; + } + + public void setLxrtel(String lxrtel) { + this.lxrtel = lxrtel; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getKhyh() { + return khyh; + } + + public void setKhyh(String khyh) { + this.khyh = khyh; + } + + public String getYhzh() { + return yhzh; + } + + public void setYhzh(String yhzh) { + this.yhzh = yhzh; + } +} diff --git a/16/src/com/mingri/info/Quest.java b/16/src/com/mingri/info/Quest.java new file mode 100644 index 0000000..a8e9a3f --- /dev/null +++ b/16/src/com/mingri/info/Quest.java @@ -0,0 +1,143 @@ +package com.mingri.info; + +import com.mingri.dbconn.DBResult; +import java.sql.*; +import java.io.*; + +public class Quest +{ + private String cif="";//ѯ + private String ccif="";//ѯ + private String qvalue="";//ѯؼ + private String andor; + private String sdate; + private String edate; + public String getCif() { + return cif; + } + public void setCif(String cif) { + this.cif = cif; + } + public String getCcif() { + return ccif; + } + public void setCcif(String ccif) { + this.ccif = ccif; + } + public String getQvalue() { + return qvalue; + } + public void setQvalue(String qvalue) { + this.qvalue = qvalue; + } + public String getAndor() { + return andor; + } + public void setAndor(String andor) { + this.andor = andor; + } + public String getSdate() { + return sdate; + } + public void setSdate(String sdate) { + this.sdate = sdate; + } + public String getEdate() { + return edate; + } + public void setEdate(String edate) { + this.edate = edate; + } + public String getString(String topsize, String table) + { + if(ccif.equals("=")) + { + String strSql="select top "+topsize+" * from "+table+" where"+" "+cif+"="+"'"+qvalue+"'"; + return strSql; + } + else if(ccif.equals("LIKE")) + { + String strSql="select top "+topsize+" * from "+table+" where"+" "+cif+" "+"like"+" "+"'%"+qvalue+"%'"; + return strSql; + } + else if(ccif.equals("ALL")) + { + String strSql="select top "+topsize+" * from "+table; + return strSql; + } + else if(ccif.equals("<")) + { + String strSql="select top "+topsize+" * from "+table+" where "+cif+" < '"+qvalue+"'"; + return strSql; + } + return null; + } + + public String getCount(String table) + { + if(ccif.equals("=")) + { + String strSql="select count(*) from "+table+" where"+" "+cif+"="+"'"+qvalue+"'"; + return strSql; + } + else if(ccif.equals("LIKE")) + { + String strSql="select count(*) from "+table+" where"+" "+cif+" "+"like"+" "+"'%"+qvalue+"%'"; + return strSql; + } + else if(ccif.equals("ALL")) + { + String strSql="select count(*) from "+table; + return strSql; + } + else if(ccif.equals("<")) + { + String strSql="select count(*) from "+table+" where "+cif+" < '"+qvalue+"'"; + return strSql; + } + return null; + } + public String getDateCount(String table) + { + if(ccif.equals("=")) + { + String strSql="select count(*) from "+table+" where "+cif+" = '"+qvalue+"'"+ + andor+" xsdate between '"+sdate+"' and '"+edate+"'"; + return strSql; + } + else if(ccif.equals("LIKE")) + { + String strSql="select count(*) from "+table+" where "+cif+" like '%"+qvalue+"%'"+ + andor+" xsdate between '"+sdate+"' and '"+edate+"'"; + return strSql; + } + else if(ccif.equals("ALL")) + { + String strSql="select count(*) from "+table; + return strSql; + } + return null; + } + public String getDateString(String topsize, String table) + { + if(ccif.equals("=")) + { + String strSql="select top "+topsize+" * from "+table+" where "+cif+" = '"+qvalue+"'"+ + andor+" xsdate between '"+sdate+"' and '"+edate+"'"; + return strSql; + } + else if(ccif.equals("LIKE")) + { + String strSql="select top "+topsize+" * from "+table+" where "+cif+" like '%"+qvalue+"%'"+ + andor+" xsdate between '"+sdate+"' and '"+edate+"'"; + return strSql; + } + else if(ccif.equals("ALL")) + { + String strSql="select top "+topsize+" * from "+table; + return strSql; + } + return null; + } +} + diff --git a/16/src/com/mingri/info/QuestString.java b/16/src/com/mingri/info/QuestString.java new file mode 100644 index 0000000..65a081f --- /dev/null +++ b/16/src/com/mingri/info/QuestString.java @@ -0,0 +1,387 @@ +package com.mingri.info; + +import com.mingri.dbconn.DBResult; +import java.sql.ResultSet; +import java.sql.SQLException; + +public class QuestString { + + private int curPage; //ǰҳ + private int maxPage; //ҳ + private int maxRowCount; //ܼ¼(ݿвм¼) + private int pageSize=2; //ÿҳҪʾļ¼ + private DBResult db; //¼ + private String httpFile; //ǰַļJSPļ + private String cif; //ѡIJѯֶ + private String ccif; //ѡIJѯ + private String qvalue; //ѯؼ + private String countSql=null; //洢select count (*) + private String topSql=null; //洢 select top 2 + private String nowPage=null; //ʼǰҳcurPageȡǰҳľҳ + private String str_parameter; //ҳʱݳpages + private String andor; //ѯ/ + private String sdate; //ѯʼʱ䣬ʲôڿʼѯ + private String edate; //ѯʱ䣬ʲôڽ + private String orderby; //ʲô + private String paixu; //򷽷 + public QuestString(){ //췽dbΪһDBResult() + pageSize = 2; + countSql = null; + topSql = null; + nowPage = null; + db = new DBResult(); + } + + public int getCurPage() { + return curPage; + } + + public void setCurPage(int i) { + curPage = i; + } + + public int getMaxPage() { + return maxPage; + } + + public void setMaxPage(int i) { + maxPage = i; + } + + public int getMaxRowCount() { + return maxRowCount; + } + + public void setMaxRowCount(int i) { + maxRowCount = i; + } + + public int getPageSize() { + return pageSize; + } + + public void setPageSize(int i) { + pageSize = i; + } + + public String getHttpFile() { + return httpFile; + } + + public void setHttpFile(String s) { + httpFile = s; + } + + public String getCcif() { + return ccif; + } + + public void setCcif(String s) { + ccif = s; + } + + public String getCif() { + return cif; + } + + public void setCif(String s) { + cif = s; + } + + public String getQValue() { + return qvalue; + } + + public void setQValue(String s) { + qvalue = s; + } + + public String getStr_parameter() { + return str_parameter; + } + + public void setStr_parameter(String s) { + str_parameter = s; + } + + public String getAndor() { + return andor; + } + + public void setAndor(String s) { + andor = s; + } + + public String getSdate() { + return sdate; + } + + public void setSdate(String s) { + sdate = s; + } + + public String getEdate() { + return edate; + } + + public void setEdate(String s) { + edate = s; + } + + public String getOrderby() { + return orderby; + } + + public void setOrderby(String s) { + orderby = s; + } + + public String getPaixu() { + return paixu; + } + + public void setPaixu(String s) { + paixu = s; + } + /** + * ͨBeanе + */ + public void setQuerySql(String s, String s1, String s2) { + nowPage = s1; //ύIJpages(ڼҳ)ֵݸnowPage + httpFile = s; //̬ôJSPļ + countSql = s2; //ִselect count(*)SQL + try { + querySql(countSql);//querySql()countSqlݵ÷ + } catch (Exception exception) { + exception.printStackTrace(); + } + } + /** + * ִSQL䣬÷ҳʾʱĸ + */ + public void querySql(String s) throws SQLException { + if (nowPage == null || "".equals(nowPage)) { + curPage = 1; + } else { + curPage = Integer.parseInt(nowPage); + if (curPage < 1) + curPage = 1; + } + ResultSet resultset = db.getResult(s); + if (resultset.next()) + maxRowCount = resultset.getInt(1); + maxPage = maxRowCount % pageSize != 0 ? maxRowCount / pageSize + 1 + : maxRowCount / pageSize; + if (curPage > maxPage) + curPage = maxPage; + resultset.close(); + } + /** + * һַ̬ĸһ + * ñзҳͳҳת + */ + + public String pageFooter() { + //һ + String s = "
    "; + int i = curPage - 1;//ǰҳǰҳ1 + int j = curPage + 1;//ҳǰҳ1 + s = s + "ܼ" + + getMaxRowCount() + "¼," + "" + + getMaxPage() + "ҳ"; + s = s + " " + pageSize + + "/ҳ ǰ" + getCurPage() + + "ҳ   "; + if (curPage > 1) + s = s + " ҳ "; + else + s = s + " ҳ "; + if (curPage > 1) + s = s + " һҳ "; + else + s = s + " һҳ "; + if (curPage < maxPage) + s = s + " һҳ "; + else + s = s + " һҳ "; + if (maxPage > 1 && curPage != maxPage) + s = s + " βҳ"; + else + s = s + " βҳ";//ҳתر治ͬ + s = s + "תҳ" + + "
    "; + return s; + } + /** + * ݲͬȡͬIJѯǰN¼SQL + */ + public String getString(String s) { + if (ccif.equals("=")) { + String s1 = "select top " + pageSize * curPage + " * from " + s + + " where" + " " + cif + "=" + "'" + qvalue + "'"; + return s1; + } + if (ccif.equals("LIKE")) { + String s2 = "select top " + pageSize * curPage + " * from " + s + + " where" + " " + cif + " " + "like" + " " + "'%" + qvalue + + "%'"; + return s2; + } + if (ccif.equals("ALL")) { + String s3 = "select top " + pageSize * curPage + " * from " + s; + return s3; + } + if (ccif.equals("<")) { + String s4 = "select top " + pageSize * curPage + " * from " + s + + " where " + cif + " < '" + qvalue + "'"; + return s4; + } else { + return null; + } + } + public String getXSString(String s) { + if (ccif.equals("=")) { + String s1 = "select top " + pageSize * curPage + " * from " + s + + " where" + " " + cif + "=" + "'" + qvalue + + "' and whether=''"; + return s1; + } + if (ccif.equals("LIKE")) { + String s2 = "select top " + pageSize * curPage + " * from " + s + + " where" + " " + cif + " " + "like" + " " + "'%" + qvalue + + "%'and whether=''"; + return s2; + } else { + return null; + } + } + /** + * ݲͬòͬļ¼SQL + */ + public String getCount(String s) { + if (ccif.equals("=")) { + String s1 = "select count(*) from " + s + " where" + " " + cif + + "=" + "'" + qvalue + "'"; + return s1; + } + if (ccif.equals("LIKE")) { + String s2 = "select count(*) from " + s + " where" + " " + cif + + " " + "like" + " " + "'%" + qvalue + "%'"; + return s2; + } + if (ccif.equals("ALL")) { + String s3 = "select count(*) from " + s; + return s3; + } + if (ccif.equals("<")) { + String s4 = "select count(*) from " + s + " where " + cif + " < '" + + qvalue + "'"; + return s4; + } else { + return null; + } + } + + public String getXSCount(String s) { + if (ccif.equals("=")) { + String s1 = "select count(*) from " + s + " where" + " " + cif + + "=" + "'" + qvalue + "' and whether=''"; + return s1; + } + if (ccif.equals("LIKE")) { + String s2 = "select count(*) from " + s + " where" + " " + cif + + " " + "like" + " " + "'%" + qvalue + "%' and whether=''"; + return s2; + } else { + return null; + } + } + + /** + * ݲͬͲͬʼںͽòͬļ¼SQL + */ + public String getDateCount(String s, String s1) { + if (ccif.equals("=")) { //sdateedateʱноȷѯ + String s2 = "select count(*) from " + s + " where " + cif + " = '" + + qvalue + "'" + andor + " " + s1 + " between '" + sdate + + "' and '" + edate + "'"; + return s2; + } + if (ccif.equals("LIKE")) {//sdateedateʱнģѯ + String s3 = "select count(*) from " + s + " where " + cif + + " like '%" + qvalue + "%'" + andor + " " + s1 + + " between '" + sdate + "' and '" + edate + "'"; + return s3; + } + if (ccif.equals("ALL")) {//ȡм¼ + String s4 = "select count(*) from " + s; + return s4; + } else { + return null; + } + } + + /** + * ݲͬͲͬʼںͽòͬIJѯǰNSQL + */ + public String getDateString(String s, String s1) { + if (ccif.equals("=")) { + String s2 = "select top " + pageSize * curPage + " * from " + s + + " where " + cif + " = '" + qvalue + "'" + andor + " " + + s1 + " between '" + sdate + "' and '" + edate + "'"; + return s2; + } + if (ccif.equals("LIKE")) { + String s3 = "select top " + pageSize * curPage + " * from " + s + + " where " + cif + " like '%" + qvalue + "%'" + andor + + " " + s1 + " between '" + sdate + "' and '" + edate + "'"; + return s3; + } + if (ccif.equals("ALL")) { + String s4 = "select top " + pageSize * curPage + " * from " + s; + return s4; + } else { + return null; + } + } + + /** + * Ӳѯеõʼڵʱвظspid(Ʒid)زظspid + */ + + public String getOrderCount(String s, String s1) { + String s2 = "select count(*) from (select spid from " + s + " where " + + s1 + " between '" + sdate + "' and '" + edate + + "' group by spid) as aa"; + return s2; + } + + /** + * ϲѯѯijһдʼڼвظspid(Ʒid) + * ҽͬspidµsl()je()ͣijһƷ ijһʱڵܶ + * ͨϲѯtb_brand(ƷϢ)нspidӦƷһЩϢѯ + */ + + public String getOrderString(String s, String s1) { + String s2 = "select top " + + pageSize + * curPage + + "* from tb_brand a inner join (select spid,sum(sl) as sl,sum(je) as je" + + " from " + s + " where " + s1 + " between '" + sdate + + "' and '" + edate + "' group by spid ) as b" + + " on a.id=b.spid order by " + orderby + " " + paixu; + return s2; + } +} diff --git a/16/src/com/mingri/info/SpRegist.java b/16/src/com/mingri/info/SpRegist.java new file mode 100644 index 0000000..3c9448f --- /dev/null +++ b/16/src/com/mingri/info/SpRegist.java @@ -0,0 +1,49 @@ +package com.mingri.info; + +import com.mingri.dbconn.DBResult; +import java.sql.*; + +public class SpRegist +{ + private SpinfoBean spinfo; + DBResult rst=new DBResult(); + + public void setSpinfo(SpinfoBean spinfo) + { + this.spinfo=spinfo; + } + + public void regist() throws Exception + { + String sql="insert into tb_brand values(?,?,?,?,?,?,?,?,?,?,?)"; + String str="select max(id) as maxint from tb_brand"; + ResultSet rs=rst.getResult(str); + String newmax=null; + while(rs.next()) + { + String max = rs.getString("maxint"); //ֶ + String maxi = max.substring(2, max.length()); //ȡַ + newmax = "SP" + String.valueOf(Integer.parseInt(maxi) + 1); + } + try + { + PreparedStatement pstmt = rst.getPreparedStatement(sql); + pstmt.setString(1, newmax); + pstmt.setString(2, spinfo.getSpname()); + pstmt.setString(3, spinfo.getJc()); + pstmt.setString(4, spinfo.getCd()); + pstmt.setString(5, spinfo.getDw()); + pstmt.setString(6, spinfo.getGg()); + pstmt.setString(7, spinfo.getBz()); + pstmt.setString(8, spinfo.getPh()); + pstmt.setString(9, spinfo.getPzwh()); + pstmt.setString(10, spinfo.getGysname()); + pstmt.setString(11, spinfo.getMemo()); + pstmt.executeUpdate(); + } + catch (Exception e) { + e.printStackTrace(); + throw e; + } + } +} diff --git a/16/src/com/mingri/info/SpinfoBean.java b/16/src/com/mingri/info/SpinfoBean.java new file mode 100644 index 0000000..a153fe0 --- /dev/null +++ b/16/src/com/mingri/info/SpinfoBean.java @@ -0,0 +1,76 @@ +package com.mingri.info; + +public class SpinfoBean +{ + private String spname;//Ʒ + private String jc;// + private String cd;// + private String dw;//λ + private String gg;// + private String bz;//װ + private String ph;// + private String pzwh;//׼ĺ + private String gysname;//Ӧȫ + private String memo;//ע + public String getSpname() { + return spname; + } + public void setSpname(String spname) { + this.spname = spname; + } + public String getJc() { + return jc; + } + public void setJc(String jc) { + this.jc = jc; + } + public String getCd() { + return cd; + } + public void setCd(String cd) { + this.cd = cd; + } + public String getDw() { + return dw; + } + public void setDw(String dw) { + this.dw = dw; + } + public String getGg() { + return gg; + } + public void setGg(String gg) { + this.gg = gg; + } + public String getBz() { + return bz; + } + public void setBz(String bz) { + this.bz = bz; + } + public String getPh() { + return ph; + } + public void setPh(String ph) { + this.ph = ph; + } + public String getPzwh() { + return pzwh; + } + public void setPzwh(String pzwh) { + this.pzwh = pzwh; + } + public String getGysname() { + return gysname; + } + public void setGysname(String gysname) { + this.gysname = gysname; + } + public String getMemo() { + return memo; + } + public void setMemo(String memo) { + this.memo = memo; + } + +} diff --git a/16/src/com/mingri/showtime/CalendarBean.java b/16/src/com/mingri/showtime/CalendarBean.java new file mode 100644 index 0000000..234c200 --- /dev/null +++ b/16/src/com/mingri/showtime/CalendarBean.java @@ -0,0 +1,120 @@ +// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov. +// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html +// Decompiler options: packimports(3) fieldsfirst ansi +// Source File Name: CalendarBean.java + +package com.mingri.showtime; + +import java.util.*; + +public class CalendarBean +{ + + Calendar calendar; + + public CalendarBean() + { + calendar = null; + calendar = Calendar.getInstance(TimeZone.getTimeZone("PST")); + Date date = new Date(); + calendar.setTime(date); + } + + public int getYear() + { + return calendar.get(1); + } + + public String getMonth() + { + int i = Integer.parseInt(getMonthInt()); + String as[] = { + "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", + "November", "December" + }; + if(i > 12) + return "Unknown to Month"; + else + return as[i - 1]; + } + + public String getMonthInt() + { + String s = ""; + int i = calendar.get(2) + 1; + if(i < 10) + return s = "0" + String.valueOf(i); + else + return String.valueOf(i); + } + + public String getDay() + { + int i = getDayOfWeek(); + String as[] = { + "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" + }; + if(i > 7) + return "Unknown to Day"; + else + return as[i - 1]; + } + + public int getDayOfWeek() + { + return calendar.get(7); + } + + public String getDate() + { + return getYear() + "-" + getMonthInt() + "-" + getDayOfMonth(); + } + + public String getDayOfMonth() + { + String s = ""; + int i = calendar.get(5); + if(i < 10) + { + String s1 = "0" + String.valueOf(i); + return s1; + } else + { + return String.valueOf(calendar.get(5)); + } + } + + public String getTime() + { + return getHour() + ":" + getMinute() + ":" + getSecond(); + } + + public int getHour() + { + return calendar.get(11); + } + + public int getMinute() + { + return calendar.get(12); + } + + public String getSecond() + { + String s = ""; + int i = calendar.get(13); + if(i < 10) + { + String s1 = "0" + String.valueOf(i); + return s1; + } else + { + return String.valueOf(i); + } + } + + public String getDateString() + { + return getYear() + getMonthInt() + getDayOfMonth(); + } +} diff --git a/16/src/com/mingri/showtime/ShowTime.java b/16/src/com/mingri/showtime/ShowTime.java new file mode 100644 index 0000000..2a4ad68 --- /dev/null +++ b/16/src/com/mingri/showtime/ShowTime.java @@ -0,0 +1,38 @@ +package com.mingri.showtime; + +import java.util.*; + +public class ShowTime { + private Date date = null; + private int yy; // DategetYear()صֵ + private int mm; // DategetMonth()صֵ + private int dd; // DategetDate()صֵ + private String sy; + private String sm; + private String sd; + + public ShowTime() { + date = new Date(); + yy = date.getYear() + 1900; // ֻм1900ϵͳǰ + mm = date.getMonth() + 1; // ֻм1ϵͳǰ· + dd = date.getDate(); + sy = String.valueOf(yy); // yyתΪַ + sm = String.valueOf(mm); // mmתΪַ + sd = String.valueOf(dd); // ddתΪַ + // ·1λǰ"0"1·ôʾľ"01" + if (sm.length() == 1) { + sm = "0" + sm; + } + if (sd.length() == 1) { + sd = "0" + sd; + } + } + + public String getDateString() { + return sy + sm + sd; + } + + public String getDate() { + return sy + "-" + sm + "-" + sd; + } +} diff --git "a/16/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/16/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..cf0fa22 Binary files /dev/null and "b/16/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/17/.classpath b/17/.classpath new file mode 100644 index 0000000..a96bc6f --- /dev/null +++ b/17/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/17/.mymetadata b/17/.mymetadata new file mode 100644 index 0000000..2689ca0 --- /dev/null +++ b/17/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/17/.project b/17/.project new file mode 100644 index 0000000..4fe4a81 --- /dev/null +++ b/17/.project @@ -0,0 +1,50 @@ + + + 17 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/17/.settings/.jsdtscope b/17/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/17/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/17/.settings/org.eclipse.wst.jsdt.ui.superType.container b/17/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/17/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/17/.settings/org.eclipse.wst.jsdt.ui.superType.name b/17/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/17/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/17/WebRoot/BookSort.jsp b/17/WebRoot/BookSort.jsp new file mode 100644 index 0000000..905eb2d --- /dev/null +++ b/17/WebRoot/BookSort.jsp @@ -0,0 +1,128 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + +<% +ResultSet rs_Type=connDB.executeQuery("select Type from tb_bookinfo group by Type"); +String PType=""; +if (request.getParameter("Type")!=null){ + PType=chStr.chStr(request.getParameter("Type")); +}else{ + if(rs_Type.next()){ + PType=rs_Type.getString("Type"); + }else{ + response.sendRedirect("index.jsp"); + } +} +ResultSet rs_book=connDB.executeQuery("select * from tb_bookinfo where Type='"+PType+"'"); +%> + + +ͼ鳬 + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + + + + +
      + + + + +
     ͼб
      + <%rs_Type.first(); + do{ //˴do...whileһ¼ + String Type=rs_Type.getString("Type"); + %> + + + + + +
     <%=Type%>
    + <%}while (rs_Type.next());%> +
    +
    + + + + + + + +
    + +
    + + + + + +
    + + + + + + +
    ͼ[ <%=PType%> ]
    + + + + + + + +
     
    + <%while(rs_book.next()){ + String ISBN=rs_book.getString("ISBN"); + String BookName=rs_book.getString("BookName"); + String publisher=rs_book.getString("publisher"); + %> + + + + + + + +
    <%=BookName%><%=publisher%> + <%if(session.getAttribute("UserName")!=null){%> + + <%}else{ + out.println("ȵ¼"); + }%> +
    + <%}%> +
    +
     
    + +
    +
    + + diff --git a/17/WebRoot/CSS/style.css b/17/WebRoot/CSS/style.css new file mode 100644 index 0000000..af97541 --- /dev/null +++ b/17/WebRoot/CSS/style.css @@ -0,0 +1,102 @@ + + \ No newline at end of file diff --git a/17/WebRoot/DataBase/db_bookmanage_Data.MDF b/17/WebRoot/DataBase/db_bookmanage_Data.MDF new file mode 100644 index 0000000..3b4645e Binary files /dev/null and b/17/WebRoot/DataBase/db_bookmanage_Data.MDF differ diff --git a/17/WebRoot/DataBase/db_bookmanage_Log.LDF b/17/WebRoot/DataBase/db_bookmanage_Log.LDF new file mode 100644 index 0000000..c219148 Binary files /dev/null and b/17/WebRoot/DataBase/db_bookmanage_Log.LDF differ diff --git a/17/WebRoot/Images/Cen_separate.gif b/17/WebRoot/Images/Cen_separate.gif new file mode 100644 index 0000000..398612b Binary files /dev/null and b/17/WebRoot/Images/Cen_separate.gif differ diff --git a/17/WebRoot/Images/Nav_separate.gif b/17/WebRoot/Images/Nav_separate.gif new file mode 100644 index 0000000..b68fb72 Binary files /dev/null and b/17/WebRoot/Images/Nav_separate.gif differ diff --git a/17/WebRoot/Images/T_mrbook.gif b/17/WebRoot/Images/T_mrbook.gif new file mode 100644 index 0000000..5de8afb Binary files /dev/null and b/17/WebRoot/Images/T_mrbook.gif differ diff --git a/17/WebRoot/Images/bg.gif b/17/WebRoot/Images/bg.gif new file mode 100644 index 0000000..d4c887e Binary files /dev/null and b/17/WebRoot/Images/bg.gif differ diff --git a/17/WebRoot/Images/bg_Navigate.GIF b/17/WebRoot/Images/bg_Navigate.GIF new file mode 100644 index 0000000..1f875fa Binary files /dev/null and b/17/WebRoot/Images/bg_Navigate.GIF differ diff --git a/17/WebRoot/Images/bg_booksort.gif b/17/WebRoot/Images/bg_booksort.gif new file mode 100644 index 0000000..2e22a2a Binary files /dev/null and b/17/WebRoot/Images/bg_booksort.gif differ diff --git a/17/WebRoot/Images/boardlist.gif b/17/WebRoot/Images/boardlist.gif new file mode 100644 index 0000000..5fa7058 Binary files /dev/null and b/17/WebRoot/Images/boardlist.gif differ diff --git a/17/WebRoot/Images/cart.gif b/17/WebRoot/Images/cart.gif new file mode 100644 index 0000000..4b3799f Binary files /dev/null and b/17/WebRoot/Images/cart.gif differ diff --git a/17/WebRoot/Images/checkout.GIF b/17/WebRoot/Images/checkout.GIF new file mode 100644 index 0000000..f11e0f8 Binary files /dev/null and b/17/WebRoot/Images/checkout.GIF differ diff --git a/17/WebRoot/Images/del.gif b/17/WebRoot/Images/del.gif new file mode 100644 index 0000000..7c7da16 Binary files /dev/null and b/17/WebRoot/Images/del.gif differ diff --git a/17/WebRoot/Images/enforce.gif b/17/WebRoot/Images/enforce.gif new file mode 100644 index 0000000..52ab062 Binary files /dev/null and b/17/WebRoot/Images/enforce.gif differ diff --git a/17/WebRoot/Images/folder.gif b/17/WebRoot/Images/folder.gif new file mode 100644 index 0000000..f43d38a Binary files /dev/null and b/17/WebRoot/Images/folder.gif differ diff --git a/17/WebRoot/Images/freeze.gif b/17/WebRoot/Images/freeze.gif new file mode 100644 index 0000000..dae63d0 Binary files /dev/null and b/17/WebRoot/Images/freeze.gif differ diff --git a/17/WebRoot/Images/greendot.gif b/17/WebRoot/Images/greendot.gif new file mode 100644 index 0000000..a1c78c3 Binary files /dev/null and b/17/WebRoot/Images/greendot.gif differ diff --git a/17/WebRoot/Images/ico01.gif b/17/WebRoot/Images/ico01.gif new file mode 100644 index 0000000..9f38f36 Binary files /dev/null and b/17/WebRoot/Images/ico01.gif differ diff --git a/17/WebRoot/Images/ico_booksort.gif b/17/WebRoot/Images/ico_booksort.gif new file mode 100644 index 0000000..57d8eb6 Binary files /dev/null and b/17/WebRoot/Images/ico_booksort.gif differ diff --git a/17/WebRoot/Images/ico_cart.gif b/17/WebRoot/Images/ico_cart.gif new file mode 100644 index 0000000..3df882f Binary files /dev/null and b/17/WebRoot/Images/ico_cart.gif differ diff --git a/17/WebRoot/Images/ico_order.gif b/17/WebRoot/Images/ico_order.gif new file mode 100644 index 0000000..e36cefb Binary files /dev/null and b/17/WebRoot/Images/ico_order.gif differ diff --git a/17/WebRoot/Images/index_03.gif b/17/WebRoot/Images/index_03.gif new file mode 100644 index 0000000..f13b692 Binary files /dev/null and b/17/WebRoot/Images/index_03.gif differ diff --git a/17/WebRoot/Images/index_06.gif b/17/WebRoot/Images/index_06.gif new file mode 100644 index 0000000..b491101 Binary files /dev/null and b/17/WebRoot/Images/index_06.gif differ diff --git a/17/WebRoot/Images/index_06.jpg b/17/WebRoot/Images/index_06.jpg new file mode 100644 index 0000000..fcf3064 Binary files /dev/null and b/17/WebRoot/Images/index_06.jpg differ diff --git a/17/WebRoot/Images/index_09.gif b/17/WebRoot/Images/index_09.gif new file mode 100644 index 0000000..3d03f68 Binary files /dev/null and b/17/WebRoot/Images/index_09.gif differ diff --git a/17/WebRoot/Images/index_10.gif b/17/WebRoot/Images/index_10.gif new file mode 100644 index 0000000..e3b5d0d Binary files /dev/null and b/17/WebRoot/Images/index_10.gif differ diff --git a/17/WebRoot/Images/index_12.gif b/17/WebRoot/Images/index_12.gif new file mode 100644 index 0000000..3595c3f Binary files /dev/null and b/17/WebRoot/Images/index_12.gif differ diff --git a/17/WebRoot/Images/index_14.gif b/17/WebRoot/Images/index_14.gif new file mode 100644 index 0000000..8a5c459 Binary files /dev/null and b/17/WebRoot/Images/index_14.gif differ diff --git a/17/WebRoot/Images/index_16.gif b/17/WebRoot/Images/index_16.gif new file mode 100644 index 0000000..3a3b889 Binary files /dev/null and b/17/WebRoot/Images/index_16.gif differ diff --git a/17/WebRoot/Images/index_18.gif b/17/WebRoot/Images/index_18.gif new file mode 100644 index 0000000..e3a8795 Binary files /dev/null and b/17/WebRoot/Images/index_18.gif differ diff --git a/17/WebRoot/Images/index_ht.gif b/17/WebRoot/Images/index_ht.gif new file mode 100644 index 0000000..e3fc51e Binary files /dev/null and b/17/WebRoot/Images/index_ht.gif differ diff --git a/17/WebRoot/Images/login_M.jpg b/17/WebRoot/Images/login_M.jpg new file mode 100644 index 0000000..9fcc7c4 Binary files /dev/null and b/17/WebRoot/Images/login_M.jpg differ diff --git a/17/WebRoot/Images/modify.gif b/17/WebRoot/Images/modify.gif new file mode 100644 index 0000000..dd6ed04 Binary files /dev/null and b/17/WebRoot/Images/modify.gif differ diff --git a/17/WebRoot/Images/reg.gif b/17/WebRoot/Images/reg.gif new file mode 100644 index 0000000..d101604 Binary files /dev/null and b/17/WebRoot/Images/reg.gif differ diff --git a/17/WebRoot/Images/thaw.gif b/17/WebRoot/Images/thaw.gif new file mode 100644 index 0000000..2830565 Binary files /dev/null and b/17/WebRoot/Images/thaw.gif differ diff --git a/17/WebRoot/JS/check.jsp b/17/WebRoot/JS/check.jsp new file mode 100644 index 0000000..083d621 --- /dev/null +++ b/17/WebRoot/JS/check.jsp @@ -0,0 +1,66 @@ +//жûǷϷ +function check(){ + if (myform.UserName.value==""){ + alert("û");myform.UserName.focus();return; + } + if (myform.TrueName.value==""){ + alert("ʵ");myform.TrueName.focus();return; + } + if (myform.PWD1.value==""){ + alert("룡");myform.PWD1.focus();return; + } + if (myform.PWD1.value.length<6){ + alert("Ϊ6λ룡");myform.PWD1.focus();return; + } + if (myform.PWD2.value==""){ + alert("ȷ룡");myform.PWD2.focus();return; + } + if (myform.PWD1.value!=myform.PWD2.value){ + alert("벻һ£룡");myform.PWD1.focus();return; + } + if(myform.cardNO.value==""){ + alert("֤룡");myform.cardNO.focus();return; + } + if (myform.Email.value==""){ + alert("Emailַ");myform.Email.focus();return; + } + var i=myform.Email.value.indexOf("@"); + var j=myform.Email.value.indexOf("."); + if((i<0)||(i-j>0)||(j<0)){ + alert("Emailַȷ룡");myform.Email.value="";myform.Email.focus();return; + } + myform.submit(); +} +//жûǷϷ +function check_m(){ + if (myform.TrueName.value==""){ + alert("ʵ");myform.TrueName.focus();return; + } + if (myform.PWD1.value==""){ + alert("ԭ룡");myform.PWD1.focus();return; + } + if (myform.PWD1.value!=myform.oldPWD.value){ + alert("ԭ벻ȷ룡");myform.PWD1.focus();return; + } + if (myform.PWD2.value==""){ + alert("룡");myform.PWD2.focus();return; + } + if (myform.PWD3.value==""){ + alert("ȷ룡");myform.PWD3.focus();return; + } + if (myform.PWD2.value!=myform.PWD3.value){ + alert("벻һ£룡");myform.PWD2.focus();return; + } + if(myform.cardNO.value==""){ + alert("֤룡");myform.cardNO.focus();return; + } + if (myform.Email.value==""){ + alert("Emailַ");myform.Email.focus();return; + } + var i=myform.Email.value.indexOf("@"); + var j=myform.Email.value.indexOf("."); + if((i<0)||(i-j>0)||(j<0)){ + alert("Emailַȷ룡");myform.Email.value="";myform.Email.focus();return; + } + myform.submit(); +} \ No newline at end of file diff --git a/17/WebRoot/Login_U.jsp b/17/WebRoot/Login_U.jsp new file mode 100644 index 0000000..d55447d --- /dev/null +++ b/17/WebRoot/Login_U.jsp @@ -0,0 +1,22 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String username=chStr.chStr(request.getParameter("username"));//˴бתûʱ +try{ + ResultSet rs=connDB.executeQuery("select * from tb_Member where username='"+username+"' and freeze=0"); + if(rs.next()){ + String PWD=request.getParameter("PWD"); + if(PWD.equals(rs.getString("password"))){ + session.setAttribute("UserName",username); + response.sendRedirect("index.jsp"); + }else{ + out.println(""); + } + }else{ + out.println(""); + } +}catch(Exception e){ + out.println(""); +} +%> diff --git a/17/WebRoot/META-INF/MANIFEST.MF b/17/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/17/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/17/WebRoot/Top.jsp b/17/WebRoot/Top.jsp new file mode 100644 index 0000000..209ac35 --- /dev/null +++ b/17/WebRoot/Top.jsp @@ -0,0 +1,39 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    ҳϼͼѯ 
    IndexNew BooksBook SortShopping BagOrder SearchSell Sort
     
    diff --git a/17/WebRoot/WEB-INF/classes/beans/bookelement.class b/17/WebRoot/WEB-INF/classes/beans/bookelement.class new file mode 100644 index 0000000..3e4d617 Binary files /dev/null and b/17/WebRoot/WEB-INF/classes/beans/bookelement.class differ diff --git a/17/WebRoot/WEB-INF/classes/beans/chStr.class b/17/WebRoot/WEB-INF/classes/beans/chStr.class new file mode 100644 index 0000000..7c0a6ee Binary files /dev/null and b/17/WebRoot/WEB-INF/classes/beans/chStr.class differ diff --git a/17/WebRoot/WEB-INF/classes/beans/connDB.class b/17/WebRoot/WEB-INF/classes/beans/connDB.class new file mode 100644 index 0000000..362c5cb Binary files /dev/null and b/17/WebRoot/WEB-INF/classes/beans/connDB.class differ diff --git a/17/WebRoot/WEB-INF/lib/sqljdbc.jar b/17/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/17/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/17/WebRoot/WEB-INF/web.xml b/17/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..73a8b9c --- /dev/null +++ b/17/WebRoot/WEB-INF/web.xml @@ -0,0 +1,8 @@ + + + + welcome to Tomcat + + Welcome to Tomcat + + diff --git a/17/WebRoot/book_detail.jsp b/17/WebRoot/book_detail.jsp new file mode 100644 index 0000000..6d1f7b5 --- /dev/null +++ b/17/WebRoot/book_detail.jsp @@ -0,0 +1,104 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + +<% +ResultSet rs=connDB.executeQuery("select * from tb_bookinfo where ISBN='"+request.getParameter("ISBN")+"'"); +%> + + +ͼ鳬 + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + + + + +
    +
    + + <% + if(rs.next()){ + //ע:˴ֶֻܰε˳ȡ + String ISBN=rs.getString("ISBN"); + String bookname=rs.getString("BookName"); + String publisher=rs.getString("publisher"); + String writer=rs.getString("writer"); + String Introduce=chStr.convertStr(rs.getString("Introduce")); + int price=rs.getInt("Price"); + String pDate=rs.getString("pDate"); + String cover=rs.getString("cover"); + %> + + + <% }%> + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      ţ<%=ISBN%>
      <%=bookname%>
    <%=publisher%>
      ߣ<%=writer%>
     ۣ<%=price%>Ԫ
    ڣ<%=pDate%>
    <%=Introduce%>
    <%if(session.getAttribute("UserName")!=null){%> + + <%}%> + +
    +
     
    + +
    +
    + + diff --git a/17/WebRoot/cart_Add.jsp b/17/WebRoot/cart_Add.jsp new file mode 100644 index 0000000..c456337 --- /dev/null +++ b/17/WebRoot/cart_Add.jsp @@ -0,0 +1,43 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.util.Vector"%> +<%@ page import="beans.bookelement"%> + + + + + +ӹﳵ + + + +<% +String ISBN=chStr.chStr(request.getParameter("ISBN")); +String sql="select * from tb_bookinfo where ISBN='"+ISBN+"'"; +ResultSet rs=connDB.executeQuery(sql); +float price=0; +if(rs.next()){ + price=rs.getInt("price"); +} +bookelement mybookelement=new bookelement(); +mybookelement.ISBN=ISBN; +mybookelement.price=price; +mybookelement.number=1; +boolean Flag=true; +Vector cart=(Vector)session.getAttribute("cart"); +if(cart==null){ + cart=new Vector(); +}else{ + for(int i=0;i diff --git a/17/WebRoot/cart_checkout.jsp b/17/WebRoot/cart_checkout.jsp new file mode 100644 index 0000000..524d69e --- /dev/null +++ b/17/WebRoot/cart_checkout.jsp @@ -0,0 +1,170 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + +<% +if(session.getAttribute("cart")==""){ + out.println(""); +} +String Username=""; +Username=(String)session.getAttribute("UserName"); +if (Username!=""){ +try{ +ResultSet rs_user=connDB.executeQuery("select * from tb_Member where username='"+Username+"'"); +if(!rs_user.next()){ + session.invalidate(); + out.println(""); + return; +}else{ + String Truename=rs_user.getString("Truename"); + String address=rs_user.getString("address"); + String postcode=rs_user.getString("postcode"); + String tel=rs_user.getString("tel"); + String email=rs_user.getString("email"); +%> + + +ͼ鳬 + + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + +
    + + + + + +
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      ע⣺ҪǷύɲҪ鷳
    + *
    ʵ + *
    ϵַ + *
    + *
    ϵ绰 + *
    ʽ + *
    ͷʽ + *
    Emailַ + *
        ע
    +   +
    +
    +
    +
     
    + +
    +
    + + +<%} +}catch(Exception e){ +out.println(e.toString()); +} +}else{ + session.invalidate(); + out.println(""); +} +%> \ No newline at end of file diff --git a/17/WebRoot/cart_clear.jsp b/17/WebRoot/cart_clear.jsp new file mode 100644 index 0000000..8b306e2 --- /dev/null +++ b/17/WebRoot/cart_clear.jsp @@ -0,0 +1,5 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<% +session.removeAttribute("cart"); +response.sendRedirect("cart_null.jsp"); +%> diff --git a/17/WebRoot/cart_modify.jsp b/17/WebRoot/cart_modify.jsp new file mode 100644 index 0000000..5b15761 --- /dev/null +++ b/17/WebRoot/cart_modify.jsp @@ -0,0 +1,26 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.util.Vector"%> +<%@ page import="beans.bookelement"%> +<% +Vector cart=(Vector)session.getAttribute("cart"); +Vector newcart=new Vector(); +for(int i=0;ialert('Ϊ0!');history.back();"); + return; + } + if(number.equals("")){ + out.println(""); + return; + } + bookelement mybookelement=(bookelement)cart.elementAt(i); + String num=request.getParameter("num"+i); + int newnum=Integer.parseInt(num); + mybookelement.number=newnum; + if(newnum!=0){ + newcart.addElement(mybookelement);} +} +session.setAttribute("cart",newcart); +response.sendRedirect("cart_see.jsp"); +%> diff --git a/17/WebRoot/cart_move.jsp b/17/WebRoot/cart_move.jsp new file mode 100644 index 0000000..96c640d --- /dev/null +++ b/17/WebRoot/cart_move.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.util.Vector"%> +<%@ page import="beans.bookelement"%> +<% +Vector cart=(Vector)session.getAttribute("cart"); +try{ + String ID=request.getParameter("ID"); + int id=Integer.parseInt(ID); + cart.removeElementAt(id); + session.setAttribute("cart",cart); + response.sendRedirect("cart_see.jsp"); + }catch(Exception e){ +} +%> diff --git a/17/WebRoot/cart_null.jsp b/17/WebRoot/cart_null.jsp new file mode 100644 index 0000000..77a28ab --- /dev/null +++ b/17/WebRoot/cart_null.jsp @@ -0,0 +1,62 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + + + + + + + + + + + + +
     
    ĹﳵΪգ
     
    +
     
    + +
    +
    + + diff --git a/17/WebRoot/cart_order.jsp b/17/WebRoot/cart_order.jsp new file mode 100644 index 0000000..ac49187 --- /dev/null +++ b/17/WebRoot/cart_order.jsp @@ -0,0 +1,86 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.util.Vector"%> +<%@ page import="beans.bookelement"%> + + + +<% + String username=chStr.chStr(request.getParameter("username")); + String truename=chStr.chStr(request.getParameter("truename")); + String address=chStr.chStr(request.getParameter("address")); + String postcode=request.getParameter("postcode"); + String tel=request.getParameter("tel"); + String pay=chStr.chStr(request.getParameter("pay")); + String carry=chStr.chStr(request.getParameter("carry")); + String email=request.getParameter("email"); + String bz=chStr.chStr(request.getParameter("bz")); + int orderID=0; + // + float rebate=1; + ResultSet rs_rebate=connDB.executeQuery("select rebate from V_Member where username='"+username+"'"); + + if (rs_rebate.next()){ + rebate=rs_rebate.getFloat("rebate"); + } + Vector cart=(Vector)session.getAttribute("cart"); + int number=0; + float price=0; + float sum=0; + float Totalsum=0; + String flag="True"; + int temp=0; + //붩 + float bnumber=cart.size(); + String sql="insert into tb_Order(bnumber,username,truename,address,postcode,tel,email,pay,carry,rebate,bz) values("+bnumber+",'"+username+"','"+truename+"','"+address+"','"+postcode+"','"+tel+"','"+email+"','"+pay+"','"+carry+"','"+rebate+"','"+bz+"')"; + temp=connDB.executeUpdate_id(sql); + if (temp==0){ + flag="false"; + }else{ + orderID=temp; + //out.println(""); + } + //붩ϸ + for(int i=0;ialert('Ч');history.back();"); + }else{ + session.removeAttribute("cart"); + out.println(""); + } + connDB.close(); +%> + \ No newline at end of file diff --git a/17/WebRoot/cart_see.jsp b/17/WebRoot/cart_see.jsp new file mode 100644 index 0000000..ffc7374 --- /dev/null +++ b/17/WebRoot/cart_see.jsp @@ -0,0 +1,138 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.util.Vector"%> +<%@ page import="beans.bookelement"%> + + +<% +Vector cart=(Vector)session.getAttribute("cart"); +if(cart==null || cart.size()==0){ + response.sendRedirect("cart_null.jsp"); +}else{ +%> + + +ͼ鳬 + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + +
    +
    + + + + + + + + + + + <% + float sum=0; + float pric=0; + String ISBN=""; + String bookname=""; + String publisher=""; + for(int i=0;i + + + + + + + + + + <% + } + + %> +
    ˻
    <%=i+1%><%=ISBN%><%=bookname%><%=bookitem.price%> + <%=(bookitem.price*bookitem.number)%>
    +
    + + + + + + + + + + + + +
       
     ϼܽ<%=sum%>
    ޸ | | ȥ̨ | չﳵ
    +
    +
     
    + +
    +
    + + +<% }%> \ No newline at end of file diff --git a/17/WebRoot/checkUserName.jsp b/17/WebRoot/checkUserName.jsp new file mode 100644 index 0000000..0cc0ee1 --- /dev/null +++ b/17/WebRoot/checkUserName.jsp @@ -0,0 +1,35 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String username=chStr.chStr(request.getParameter("username")); +ResultSet rs=connDB.executeQuery("select * from tb_member where username='"+username+"'"); +%> + + + +û + + + + + + + + + + <% + if(rs.next()){ + %> + + + + + <%}else{%> + + + + <%}%> +
     
    <%out.println("ܱǸ!

    ["+username+"]ûѾע!");%>
    <%out.println("ף!

    ["+username+"]ûûбע!");%>
    + + diff --git a/17/WebRoot/copyright.jsp b/17/WebRoot/copyright.jsp new file mode 100644 index 0000000..756bf0f --- /dev/null +++ b/17/WebRoot/copyright.jsp @@ -0,0 +1,38 @@ +<%@ page contentType="text/html; charset=gb2312"%> + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     ͼ鳬ͻߣ0431-8497898184978982 棺0431-84972266 
     
    CopyRight © 2005 www.cccxy.com ʡտƼ޹˾
     
     վʹIE6.0ϰ汾 1024*768ΪʾЧ 
       
    \ No newline at end of file diff --git a/17/WebRoot/index.jsp b/17/WebRoot/index.jsp new file mode 100644 index 0000000..9098588 --- /dev/null +++ b/17/WebRoot/index.jsp @@ -0,0 +1,164 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" + import="java.sql.*" %> + + +<% +ResultSet rs_newbook=connDB.executeQuery("select top 5 * from tb_bookinfo where newbook=1 order by INTime desc"); +ResultSet rs_sort=connDB.executeQuery("select * from (select top 10 * from ( select sum(number) as amount,ISBN from tb_Order_detail group by ISBN )as tab order by amount desc) o inner join tb_bookinfo b on o.ISBN=b.ISBN order by o.amount desc"); +ResultSet rs_book=connDB.executeQuery("select * from tb_bookinfo where commend=1"); +%> + + +ͼ鳬 + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + + + + + +
    + +
    + + <% + rs_book.last(); + int RecordCount=rs_book.getRow(); //ȡ¼ + rs_book.first(); + for(int i=1;i + + + <% }else{%> + + + <% + } + rs_book.next(); + }%> + +
    + + + + +
    + + + + + + + + + + + + + +
    <%=bookname%>
    <%=publisher%>
    ߣ<%=author%>
    ۣ<%=String.valueOf(price)%>Ԫ
    <%if(session.getAttribute("UserName")!=null){%> + + <%}%> +
    + + + + +
    + + + + + + + + + + + + + + + +
    <%=bookname%>
    <%=publisher%>
    ߣ<%=author%>
    ּۣ<%=String.valueOf(price)%>Ԫ
    <%if(session.getAttribute("UserName")!=null){%> + + <%}%> +
    +
      + + + + + + +
    + <%while(rs_newbook.next()){ + String ISBN=rs_newbook.getString("ISBN"); + String BookName=rs_newbook.getString("BookName"); + %> + + + + + +
    <%=BookName%>
    + <%}%> +
    + + + + + + + +
    + <%while(rs_sort.next()){ + String ISBN=rs_sort.getString("ISBN"); + String BookName=rs_sort.getString("BookName"); + %> + + + + + +
    <%=BookName%>
    + <%}%> +
    + +
    +
    + + diff --git a/17/WebRoot/left.jsp b/17/WebRoot/left.jsp new file mode 100644 index 0000000..21600f6 --- /dev/null +++ b/17/WebRoot/left.jsp @@ -0,0 +1,149 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + +<% +ResultSet rs_bbs=connDB.executeQuery("select * from tb_BBS"); +ResultSet rs_poll=connDB.executeQuery("select * from tb_poll"); + if(session.getAttribute("UserName")==null){%> +
    + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + +
       
     û +  
        +  
      + +   +  
       
    +
    + <%}else{%> + + + + + +
      + + + + + + + + + + + + <%ResultSet rs_grade=connDB.executeQuery("select * from tb_Member where Username='"+session.getAttribute("UserName")+"'"); + int grade=0; + if(rs_grade.next()){ + grade=rs_grade.getInt("grade"); + } + %> + + + + + + + + + + + + + + + +
       
     [ <%=session.getAttribute("UserName")%>]ã 
     ûȼ<%=grade%> 
        + +  
       
    +
    + <%}%> + + + + + + + + +
      + + <%while(rs_bbs.next()){%> + + + + +
    <%=chStr.convertStr(rs_bbs.getString("content"))%>
    + <%}%> +
    +
    + + + + + + + + + + + + + +
     Ҫķ鼮
     
    + + <%int f=0; + while(rs_poll.next()){%> + + + + <%f++; + }%> + + + +
    "<%if(f==0){out.print(" checked");}%> > + <%=rs_poll.getString("optionName")%>
    +
    + \ No newline at end of file diff --git a/17/WebRoot/logout.jsp b/17/WebRoot/logout.jsp new file mode 100644 index 0000000..0e66cd8 --- /dev/null +++ b/17/WebRoot/logout.jsp @@ -0,0 +1,18 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +Untitled Document + + + + +<% +//String sessionname=request.getParameter("SN"); +//session.removeAttribute(sessionname); //Session +session.invalidate(); +response.sendRedirect("index.jsp"); +//out.println(""); +%> + + diff --git a/17/WebRoot/manage/BBSManage.jsp b/17/WebRoot/manage/BBSManage.jsp new file mode 100644 index 0000000..8bbbb81 --- /dev/null +++ b/17/WebRoot/manage/BBSManage.jsp @@ -0,0 +1,84 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + +<% +ResultSet rs=connDB.executeQuery("select * from tb_BBS order by INTime Desc"); + +%> + + +ͼ鳬 + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ӹϢ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     
    • Ϣ޸ģֻӺɾ
    • +
    • ӹϢӹϢӿԽйϢӡ
    • +
    • ɾϢÿϢġɾťɾϢ
    • +
    + + + +
     
    + + + + + +<% +int ID=0; +String content=""; +while(rs.next()){ + ID=rs.getInt("ID"); + content=rs.getString("content"); +%> + + + + +<% +} +%> +
    ɾ
    <%=chStr.convertStr(content)%>
    +
    + +
    +
    + + diff --git a/17/WebRoot/manage/BBS_add.jsp b/17/WebRoot/manage/BBS_add.jsp new file mode 100644 index 0000000..ee0ceb0 --- /dev/null +++ b/17/WebRoot/manage/BBS_add.jsp @@ -0,0 +1,99 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + +<% +if(request.getParameter("content")!="" && request.getParameter("content")!=null){ + String content=chStr.chStr(request.getParameter("content")); + int ret=connDB.executeUpdate("insert into tb_BBS (content) values('"+content+"')"); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> + + + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ӹϢ
      +
    • Ϣ޸ģֻӺɾ
    • +
    • ӹϢӹϢӿԽйϢӡ
    • +
    • ɾͼϢÿͼϢġɾťɾͼϢ
    • +
    + + + + + + +
     
    +
    + + + + + + + + +
     ݣ +
    + +  + +   + +
    +
    +
    + +
    +
    + + diff --git a/17/WebRoot/manage/BBS_del.jsp b/17/WebRoot/manage/BBS_del.jsp new file mode 100644 index 0000000..ca7db60 --- /dev/null +++ b/17/WebRoot/manage/BBS_del.jsp @@ -0,0 +1,95 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +if (request.getParameter("ID")!=null){ + int ID=Integer.parseInt(request.getParameter("ID")); + ResultSet rs=connDB.executeQuery("select * from tb_BBS where ID='"+ID+"'"); + String content=""; + if(!rs.next()){ + out.println(""); + }else{ + content=rs.getString("content"); + } +%> + + + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ɾϢ
    • Ϣ޸ģֻӺɾ
    • +
    • ӹϢӹϢӿԽйϢӡ
    • +
    • ɾͼϢÿͼϢġɾťɾͼϢ
    • +
    + + + + + + +
     
    +
    + + + + + + + + +
     ݣ + +
    + +  +   + +
    +
    +
    + +
    +
    + + +<% +}else{ + out.println(""); +}%> \ No newline at end of file diff --git a/17/WebRoot/manage/BBS_del_deal.jsp b/17/WebRoot/manage/BBS_del_deal.jsp new file mode 100644 index 0000000..69d461f --- /dev/null +++ b/17/WebRoot/manage/BBS_del_deal.jsp @@ -0,0 +1,29 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.lang.*"%> + + + + + +Untitled Document + + + + +<% +if(request.getParameter("hID")!=null){ + int ID=Integer.parseInt(request.getParameter("hID")); + String sql="delete from tb_BBS where ID="+ID; + int ret=0; + ret=connDB.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +}else{ + out.println(""); +} +%> + + diff --git a/17/WebRoot/manage/Login_M.jsp b/17/WebRoot/manage/Login_M.jsp new file mode 100644 index 0000000..f55d6e8 --- /dev/null +++ b/17/WebRoot/manage/Login_M.jsp @@ -0,0 +1,38 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> + + +̨! + + + + + + + + + + + + + +
     
    + + + + + + + + + + + + +
     û +
       룺 +
      + +   +
    + + diff --git a/17/WebRoot/manage/Login_M_deal.jsp b/17/WebRoot/manage/Login_M_deal.jsp new file mode 100644 index 0000000..d1f7db4 --- /dev/null +++ b/17/WebRoot/manage/Login_M_deal.jsp @@ -0,0 +1,22 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String manager=chStr.chStr(request.getParameter("manager"));//˴бתûʱ +try{ + ResultSet rs=connDB.executeQuery("select * from tb_manager where manager='"+manager+"'"); + if(rs.next()){ + String PWD=request.getParameter("PWD"); + if(PWD.equals(rs.getString("PWD"))){ + session.setAttribute("manager",manager); + response.sendRedirect("index.jsp"); + }else{ + out.println(""); + } + }else{ + out.println(""); + } +}catch(Exception e){ + out.println(""); +} +%> diff --git a/17/WebRoot/manage/Top.jsp b/17/WebRoot/manage/Top.jsp new file mode 100644 index 0000000..1563526 --- /dev/null +++ b/17/WebRoot/manage/Top.jsp @@ -0,0 +1,34 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
     ͼûͶƱ ˳ 
    Books ManageMember ManageOrder ManageBBS Manage Poll manage  Quit 
    + \ No newline at end of file diff --git a/17/WebRoot/manage/book_add.jsp b/17/WebRoot/manage/book_add.jsp new file mode 100644 index 0000000..4d33b76 --- /dev/null +++ b/17/WebRoot/manage/book_add.jsp @@ -0,0 +1,162 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + +ͼ鳬 + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ͼ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ͼϢ
      +
    • ţͼISBNȷ޸ġ
    • +
    • ڣ״ηеڣ200510¡
    • +
    • ļȽͼķļ浽վmanage\coverļ£ļɣչ磺JSPxxxtkfaljx.jpg
    • +
    • ǷƼѡǡͼϢʾվҳС
    • +
    • Ƿ飺ѡǡͼϢʾڡϼܡС
    • +
    + + + + + + +
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     顡ţ  + + 顡  + +
     ߣ  + +  ƣ  + +
       磺  + +  ڣ  + +
     ļ  + +  ۡ  + + (Ԫ)
     ǷƼ  + + + Ƿ飺 + + +
     ͼ飺  +
    + +  + +   + +
    +
    +
    + +
    +
    + + diff --git a/17/WebRoot/manage/book_add_deal.jsp b/17/WebRoot/manage/book_add_deal.jsp new file mode 100644 index 0000000..4196a08 --- /dev/null +++ b/17/WebRoot/manage/book_add_deal.jsp @@ -0,0 +1,45 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.lang.*"%> + + + + + +Untitled Document + + + + +<% +if(request.getParameter("ISBN")!=""){ + String ISBN=chStr.chStr(request.getParameter("ISBN")); + String bookname=chStr.chStr(request.getParameter("bookname")); + String writer=chStr.chStr(request.getParameter("writer")); + String type=chStr.chStr(request.getParameter("type")); + String TPI=chStr.chStr(request.getParameter("TPI")); + String pDate=chStr.chStr(request.getParameter("pDate")); + String cover=chStr.chStr(request.getParameter("cover")); + float price=Float.valueOf(request.getParameter("price")).floatValue(); + int commend=Integer.parseInt(request.getParameter("commend")); + int newbook=Integer.parseInt(request.getParameter("newbook")); + String introduce=chStr.chStr(request.getParameter("introduce")); + if(introduce.equals("")) introduce=""; + ResultSet rs=connDB.executeQuery("select * from tb_bookinfo where ISBN='"+ISBN+"'"); + if(rs.next()){ + out.println(""); + }else{ + String sql="Insert into tb_bookinfo (ISBN,BookName,Type,publisher,writer,Introduce,price,pDate,cover,newbook,commend) values('"+ISBN+"','"+bookname+"','"+type+"','"+TPI+"','"+writer+"','"+introduce+"',"+price+",'"+pDate+"','"+cover+"',"+newbook+","+commend+")"; + int ret=0; + ret=connDB.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } + } +}else{ + out.println(""); +} +%> + + diff --git a/17/WebRoot/manage/book_del.jsp b/17/WebRoot/manage/book_del.jsp new file mode 100644 index 0000000..1f044e3 --- /dev/null +++ b/17/WebRoot/manage/book_del.jsp @@ -0,0 +1,167 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +if (request.getParameter("ISBN")!=null){ + String ISBN=request.getParameter("ISBN"); + ResultSet rs=connDB.executeQuery("select * from tb_bookinfo where ISBN='"+ISBN+"'"); + String bookname=""; + String Type=""; + String TPI=""; + String author=""; + String intro=""; + String pDate=""; + String cover=""; + float price=0; + int commend=0; + int newbook=0; + if(!rs.next()){ + out.println(""); + }else{ + bookname=rs.getString("bookname"); + Type=rs.getString("Type"); + TPI=rs.getString("publisher"); + author=rs.getString("writer"); + intro=rs.getString("introduce"); + price=rs.getFloat("Price"); + pDate=rs.getString("pDate"); + cover=rs.getString("cover"); + newbook=rs.getInt("newbook"); + commend=rs.getInt("commend"); + } +%> + + +ͼ鳬 + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ͼ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ɾͼϢ
      +
    • ţͼISBNȷ޸ġ
    • +
    • ڣ״ηеڣ200510¡
    • +
    • ļȽͼķļ浽վmanage\coverļ£ļɣչ磺JSPxxxtkfaljx.jpg
    • +
    • ǷƼѡǡͼϢʾվҳС
    • +
    • Ƿ飺ѡǡͼϢʾڡϼܡС
    • +
    + + + + + + +
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     顡ţ  + + 顡  + +
     ߣ  + +  ƣ  + +
       磺  + +  ڣ  + +
     ļ  + +  ۡ  + + (Ԫ)
     ǷƼ  > + + > + Ƿ飺> + + > +
     ͼ飺  +
    + +  +   + +
    +
    +
    + +
    +
    + + +<% +}else{ + out.println(""); +}%> \ No newline at end of file diff --git a/17/WebRoot/manage/book_del_deal.jsp b/17/WebRoot/manage/book_del_deal.jsp new file mode 100644 index 0000000..e012b3d --- /dev/null +++ b/17/WebRoot/manage/book_del_deal.jsp @@ -0,0 +1,18 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.lang.*"%> + + + +<% +if(request.getParameter("ISBN")!=""){ + String ISBN=chStr.chStr(request.getParameter("ISBN")); + String sql="delete from tb_bookinfo where ISBN='"+ISBN+"'"; + int ret=0; + ret=connDB.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> diff --git a/17/WebRoot/manage/book_detail.jsp b/17/WebRoot/manage/book_detail.jsp new file mode 100644 index 0000000..1c4a5b8 --- /dev/null +++ b/17/WebRoot/manage/book_detail.jsp @@ -0,0 +1,150 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +if (request.getParameter("ISBN")!=null){ + String ISBN=request.getParameter("ISBN"); + ResultSet rs=connDB.executeQuery("select * from tb_bookinfo where ISBN='"+ISBN+"'"); + String bookname=""; + String Type=""; + String TPI=""; + String author=""; + String intro=""; + String pDate=""; + String cover=""; + float price=0; + String commend=""; + String newbook=""; + if(!rs.next()){ + out.println(""); + }else{ + bookname=rs.getString("bookname"); + Type=rs.getString("Type"); + TPI=rs.getString("publisher"); + author=rs.getString("writer"); + intro=rs.getString("introduce"); + price=rs.getFloat("Price"); + pDate=rs.getString("pDate"); + cover=rs.getString("cover"); + newbook=rs.getInt("newbook")==0 ? "":""; + commend=rs.getInt("commend")==0 ? "":""; + } +%> + + + + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ͼ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ͼϸϢ
      +
    • ţͼISBNȷ޸ġ
    • +
    • ڣ״ηеڣ200510¡
    • +
    • ļȽͼķļ浽վmanage\coverļ£ļɣչ磺JSPxxxtkfaljx.jpg
    • +
    • ǷƼѡǡͼϢʾվҳС
    • +
    • Ƿ飺ѡǡͼϢʾڡϼܡС
    • +
    + + + + + + +
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     顡ţ  <%=ISBN%> + 顡 <%=bookname%> +
     ߣ <%=author%> +  ƣ <%=Type%> +
       磺 <%=TPI%> +  ڣ <%=pDate%> +
     ļ <%=cover%> +  ۡ <%=price%> + (Ԫ)
     ǷƼ <%=commend%> Ƿ飺<%=newbook%>
     ͼ飺<%=chStr.convertStr(intro)%>
    + +
    +
    +
    + +
    +
    + + +<% +}else{ + out.println(""); +}%> \ No newline at end of file diff --git a/17/WebRoot/manage/book_modify.jsp b/17/WebRoot/manage/book_modify.jsp new file mode 100644 index 0000000..964adb3 --- /dev/null +++ b/17/WebRoot/manage/book_modify.jsp @@ -0,0 +1,197 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +if (request.getParameter("ISBN")!=null){ + String ISBN=request.getParameter("ISBN"); + ResultSet rs=connDB.executeQuery("select * from tb_bookinfo where ISBN='"+ISBN+"'"); + String bookname=""; + String Type=""; + String TPI=""; + String author=""; + String intro=""; + String pDate=""; + String cover=""; + float price=0; + int commend=0; + int newbook=0; + if(!rs.next()){ + out.println(""); + }else{ + bookname=rs.getString("bookname"); + Type=rs.getString("Type"); + TPI=rs.getString("publisher"); + author=rs.getString("writer"); + intro=rs.getString("introduce"); + price=rs.getFloat("Price"); + pDate=rs.getString("pDate"); + cover=rs.getString("cover"); + newbook=rs.getInt("newbook"); + commend=rs.getInt("commend"); + } +%> + + +ͼ鳬 + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ͼ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ޸ͼϢ
      +
    • ţͼISBNȷ޸ġ
    • +
    • ڣ״ηеڣ200510¡
    • +
    • ļȽͼķļ浽վmanage\coverļ£ļɣչ磺JSPxxxtkfaljx.jpg
    • +
    • ǷƼѡǡͼϢʾվҳС
    • +
    • Ƿ飺ѡǡͼϢʾڡϼܡС
    • +
    + + + + + + +
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     顡ţ  + + 顡  + +
     ߣ  + +  ƣ  + +
       磺  + +  ڣ  + +
     ļ  + +  ۡ  + + (Ԫ)
     ǷƼ  > + + > + Ƿ飺> + + > +
     ͼ飺  +
    + +  + +   + +
    +
    +
    + +
    +
    + + +<% +}else{ + out.println(""); +}%> \ No newline at end of file diff --git a/17/WebRoot/manage/book_modify_deal.jsp b/17/WebRoot/manage/book_modify_deal.jsp new file mode 100644 index 0000000..7df6c1e --- /dev/null +++ b/17/WebRoot/manage/book_modify_deal.jsp @@ -0,0 +1,39 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.lang.*"%> + + + + + +Untitled Document + + + + +<% +if(request.getParameter("ISBN")!=""){ + String ISBN=chStr.chStr(request.getParameter("ISBN")); + String bookname=chStr.chStr(request.getParameter("bookname")); + String writer=chStr.chStr(request.getParameter("writer")); + String type=chStr.chStr(request.getParameter("type")); + String TPI=chStr.chStr(request.getParameter("TPI")); + String pDate=chStr.chStr(request.getParameter("pDate")); + String cover=chStr.chStr(request.getParameter("cover")); + float price=Float.valueOf(request.getParameter("price")).floatValue(); + int commend=Integer.parseInt(request.getParameter("commend")); + int newbook=Integer.parseInt(request.getParameter("newbook")); + String introduce=chStr.chStr(request.getParameter("introduce")); + if(introduce.equals("")) introduce=""; + String sql="update tb_bookinfo set BookName='"+bookname+"',Type='"+type+"',publisher='"+TPI+"',writer='"+writer+"',Introduce='"+introduce+"',price="+price+",pDate='"+pDate+"',cover='"+cover+"',newbook="+newbook+",commend="+commend+" where ISBN='"+ISBN+"'"; + out.println(sql); + int ret=0; + ret=connDB.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> + + diff --git a/17/WebRoot/manage/copyright.jsp b/17/WebRoot/manage/copyright.jsp new file mode 100644 index 0000000..17ed461 --- /dev/null +++ b/17/WebRoot/manage/copyright.jsp @@ -0,0 +1,38 @@ +<%@ page contentType="text/html; charset=gb2312"%> + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     ͼ鳬пͻߣ0431-49789814978982 棺0431-4972266 
     
    CopyRight © 2005 www.cccxy.com ʡտƼ޹˾
     
     վʹIE6.0ϰ汾 1024*768ΪʾЧ 
       
    \ No newline at end of file diff --git a/17/WebRoot/manage/cover/ASPgcyyysj.gif b/17/WebRoot/manage/cover/ASPgcyyysj.gif new file mode 100644 index 0000000..ba1da23 Binary files /dev/null and b/17/WebRoot/manage/cover/ASPgcyyysj.gif differ diff --git a/17/WebRoot/manage/cover/ASPsjkkfsljx.gif b/17/WebRoot/manage/cover/ASPsjkkfsljx.gif new file mode 100644 index 0000000..e9b63b6 Binary files /dev/null and b/17/WebRoot/manage/cover/ASPsjkkfsljx.gif differ diff --git a/17/WebRoot/manage/cover/ASPxxxtkfsljx.gif b/17/WebRoot/manage/cover/ASPxxxtkfsljx.gif new file mode 100644 index 0000000..3acc47d Binary files /dev/null and b/17/WebRoot/manage/cover/ASPxxxtkfsljx.gif differ diff --git a/17/WebRoot/manage/cover/Delphigcyyysj.gif b/17/WebRoot/manage/cover/Delphigcyyysj.gif new file mode 100644 index 0000000..7b3d043 Binary files /dev/null and b/17/WebRoot/manage/cover/Delphigcyyysj.gif differ diff --git a/17/WebRoot/manage/cover/Delphisjkkfgjjsyslyy.jpg b/17/WebRoot/manage/cover/Delphisjkkfgjjsyslyy.jpg new file mode 100644 index 0000000..e21530e Binary files /dev/null and b/17/WebRoot/manage/cover/Delphisjkkfgjjsyslyy.jpg differ diff --git a/17/WebRoot/manage/cover/Delphisjkkfsljx.gif b/17/WebRoot/manage/cover/Delphisjkkfsljx.gif new file mode 100644 index 0000000..31d2fa1 Binary files /dev/null and b/17/WebRoot/manage/cover/Delphisjkkfsljx.gif differ diff --git a/17/WebRoot/manage/cover/Delphixxxtkfsljx.jpg b/17/WebRoot/manage/cover/Delphixxxtkfsljx.jpg new file mode 100644 index 0000000..880a765 Binary files /dev/null and b/17/WebRoot/manage/cover/Delphixxxtkfsljx.jpg differ diff --git a/17/WebRoot/manage/cover/JSPgcyyysj.gif b/17/WebRoot/manage/cover/JSPgcyyysj.gif new file mode 100644 index 0000000..613aeb2 Binary files /dev/null and b/17/WebRoot/manage/cover/JSPgcyyysj.gif differ diff --git a/17/WebRoot/manage/cover/PB200l.jpg b/17/WebRoot/manage/cover/PB200l.jpg new file mode 100644 index 0000000..31b55bb Binary files /dev/null and b/17/WebRoot/manage/cover/PB200l.jpg differ diff --git a/17/WebRoot/manage/cover/PBglxxxtwzxmslpx.jpg b/17/WebRoot/manage/cover/PBglxxxtwzxmslpx.jpg new file mode 100644 index 0000000..b3a2c4b Binary files /dev/null and b/17/WebRoot/manage/cover/PBglxxxtwzxmslpx.jpg differ diff --git a/17/WebRoot/manage/cover/PBsjkkfgjjsyslyy.jpg b/17/WebRoot/manage/cover/PBsjkkfgjjsyslyy.jpg new file mode 100644 index 0000000..a1bbb58 Binary files /dev/null and b/17/WebRoot/manage/cover/PBsjkkfgjjsyslyy.jpg differ diff --git a/17/WebRoot/manage/cover/PBsjkkfsljx.gif b/17/WebRoot/manage/cover/PBsjkkfsljx.gif new file mode 100644 index 0000000..21b1f1a Binary files /dev/null and b/17/WebRoot/manage/cover/PBsjkkfsljx.gif differ diff --git a/17/WebRoot/manage/cover/VB200l.jpg b/17/WebRoot/manage/cover/VB200l.jpg new file mode 100644 index 0000000..5ca3205 Binary files /dev/null and b/17/WebRoot/manage/cover/VB200l.jpg differ diff --git a/17/WebRoot/manage/cover/VBgcyyysj.gif b/17/WebRoot/manage/cover/VBgcyyysj.gif new file mode 100644 index 0000000..dbc39d1 Binary files /dev/null and b/17/WebRoot/manage/cover/VBgcyyysj.gif differ diff --git a/17/WebRoot/manage/cover/VBglxxxtwzxmslpx.jpg b/17/WebRoot/manage/cover/VBglxxxtwzxmslpx.jpg new file mode 100644 index 0000000..bb41831 Binary files /dev/null and b/17/WebRoot/manage/cover/VBglxxxtwzxmslpx.jpg differ diff --git a/17/WebRoot/manage/cover/VBsjkkfgjjsyslyy.jpg b/17/WebRoot/manage/cover/VBsjkkfgjjsyslyy.jpg new file mode 100644 index 0000000..c68e212 Binary files /dev/null and b/17/WebRoot/manage/cover/VBsjkkfgjjsyslyy.jpg differ diff --git a/17/WebRoot/manage/cover/VBsjkkfsljx.gif b/17/WebRoot/manage/cover/VBsjkkfsljx.gif new file mode 100644 index 0000000..83a0c91 Binary files /dev/null and b/17/WebRoot/manage/cover/VBsjkkfsljx.gif differ diff --git a/17/WebRoot/manage/cover/VBxxxtkfsljx.gif b/17/WebRoot/manage/cover/VBxxxtkfsljx.gif new file mode 100644 index 0000000..2bebfbd Binary files /dev/null and b/17/WebRoot/manage/cover/VBxxxtkfsljx.gif differ diff --git a/17/WebRoot/manage/cover/VCgcyyysj.gif b/17/WebRoot/manage/cover/VCgcyyysj.gif new file mode 100644 index 0000000..9fba174 Binary files /dev/null and b/17/WebRoot/manage/cover/VCgcyyysj.gif differ diff --git a/17/WebRoot/manage/cover/VCglxxxtwzxmslpx.jpg b/17/WebRoot/manage/cover/VCglxxxtwzxmslpx.jpg new file mode 100644 index 0000000..83fe8f3 Binary files /dev/null and b/17/WebRoot/manage/cover/VCglxxxtwzxmslpx.jpg differ diff --git a/17/WebRoot/manage/cover/VFP200l.gif b/17/WebRoot/manage/cover/VFP200l.gif new file mode 100644 index 0000000..f75e5e0 Binary files /dev/null and b/17/WebRoot/manage/cover/VFP200l.gif differ diff --git a/17/WebRoot/manage/cover/VFPsjkkfgjjsyslyy.jpg b/17/WebRoot/manage/cover/VFPsjkkfgjjsyslyy.jpg new file mode 100644 index 0000000..dde5216 Binary files /dev/null and b/17/WebRoot/manage/cover/VFPsjkkfgjjsyslyy.jpg differ diff --git a/17/WebRoot/manage/cover/VFPsjkkfsljx.gif b/17/WebRoot/manage/cover/VFPsjkkfsljx.gif new file mode 100644 index 0000000..9d173b1 Binary files /dev/null and b/17/WebRoot/manage/cover/VFPsjkkfsljx.gif differ diff --git a/17/WebRoot/manage/cover/Visual FoxProglxxxtwzxmslpx.jpg b/17/WebRoot/manage/cover/Visual FoxProglxxxtwzxmslpx.jpg new file mode 100755 index 0000000..0bc2759 Binary files /dev/null and b/17/WebRoot/manage/cover/Visual FoxProglxxxtwzxmslpx.jpg differ diff --git a/17/WebRoot/manage/index.jsp b/17/WebRoot/manage/index.jsp new file mode 100644 index 0000000..ee78de2 --- /dev/null +++ b/17/WebRoot/manage/index.jsp @@ -0,0 +1,136 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + +<% +ResultSet rs=connDB.executeQuery("select * from tb_bookinfo order by INTime Desc"); +%> + + +ͼ鳬 + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ͼϢ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ͼ
      +
    • ͼϢͼϢӿԽͼϢӡ
    • +
    • ޸ͼϢÿͼϢġ޸ġť޸ͼϢ
    • +
    • ɾͼϢÿͼϢġɾťɾͼϢ
    • +
    • Ƽͼ飺Ƽͼ飬Եָͼġ޸ġť
    • +
    • Ƿ飺뽫ͼϢϼУԵָͼġ޸ġť
    • +
    + + + +
     
    + + + + + + + + + + +<% +String str=(String)request.getParameter("Page"); +if(str==null){ + str="0"; +} +int pagesize=10; +rs.last(); +int RecordCount=rs.getRow(); +//out.println(String.valueOf(RecordCount)); +int maxPage=0; +maxPage=(RecordCount%pagesize==0)?(RecordCount/pagesize):(RecordCount/pagesize+1); + +int Page=Integer.parseInt(str); +if(Page<1){ + Page=1; +}else{ + if(Page>maxPage){ + Page=maxPage; + } +} +rs.absolute((Page-1)*pagesize+1); +for(int i=1;i<=pagesize;i++){ + String ISBN=rs.getString("ISBN"); + String BookName=rs.getString("BookName"); + String publisher=rs.getString("publisher"); + String newbook=rs.getInt("newbook")==0 ? "":""; + String commend=rs.getInt("commend")==0 ? "":""; + %> + + + + + + + + + + +<% + try{ + if(!rs.next()){break;} + }catch(Exception e){} +} +%> +
    + Ƽ޸ɾ
    <%=ISBN%><%=BookName%><%=publisher%><%=newbook%><%=commend%>
    + + + + +
    ǰҳ[<%=Page%>/<%=maxPage%>]  + <%if(Page>1){%> + һҳһҳ + <% + } + if(Page + һҳһҳ  + <%} + %> +
    + +
    +
    + + diff --git a/17/WebRoot/manage/memberManage.jsp b/17/WebRoot/manage/memberManage.jsp new file mode 100644 index 0000000..20900e2 --- /dev/null +++ b/17/WebRoot/manage/memberManage.jsp @@ -0,0 +1,147 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + +<% +ResultSet rs=connDB.executeQuery("select * from tb_Member"); + +%> + + +ͼ鳬 + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ûϢ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ûϢ
      +
    • ûϢ/ⶳûϢԱⶳӡ޸ĺɾ/ⶳеġͷͼԶû/ⶳеġԿסͼԽⶳû
    • +
    • ûϢ鿴Բ鿴ûĻϢԲ鿴û롣
    • +
    + + + +
     
    + + + + + + + + + + +<% +String str=(String)request.getParameter("Page"); +if(str==null){ + str="0"; +} +int pagesize=10; +rs.last(); +int RecordCount=rs.getRow(); +int maxPage=0; +maxPage=(RecordCount%pagesize==0)?(RecordCount/pagesize):(RecordCount/pagesize+1); + +int Page=Integer.parseInt(str); +if(Page<1){ + Page=1; +}else{ + if(((Page-1)*pagesize+1)>RecordCount){ + Page=maxPage; + } +} +rs.absolute((Page-1)*pagesize+1); +for(int i=1;i<=pagesize;i++){ + int ID=rs.getInt("ID"); + String username=rs.getString("username"); + String Truename=rs.getString("Truename"); + String city=rs.getString("city"); + if(city==null||city.equals("")){ + city=" "; + } + String CardNO=rs.getString("CardNO"); + String CardType=rs.getString("CardType"); + float Amount=rs.getFloat("Amount"); + String Tel=rs.getString("Tel"); + if(Tel==null||Tel.equals("")){ + Tel = " "; + } + String Email=rs.getString("Email"); + int freeze=rs.getInt("freeze"); + %> + + + + + + + + + + +<% + try{ + if(!rs.next()){break;} + }catch(Exception e){} +} +%> +
    + ûʵEmailѶ/ⶳ
    <%=username%><%=Truename%><%=city%><%=Tel%><%=Email%><%=Amount%><%if(freeze==0){%> + <%}%> + <%if(freeze==1){%>ⶳ + <%}%>
    + + + + +
    ǰҳ[<%=Page%>/<%=maxPage%>]  + <%if(Page>1){%> + һҳһҳ + <% + } + if(Page + һҳһҳ  + <%} + %> +
    + +
    +
    + + diff --git a/17/WebRoot/manage/member_detail.jsp b/17/WebRoot/manage/member_detail.jsp new file mode 100644 index 0000000..10e6456 --- /dev/null +++ b/17/WebRoot/manage/member_detail.jsp @@ -0,0 +1,147 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +if (request.getParameter("ID")!=null){ + int ID=Integer.parseInt(request.getParameter("ID")); + ResultSet rs=connDB.executeQuery("select * from tb_member where ID="+ID); + String username=""; + String Truename=""; + String city=""; + String address=""; + String postcode=""; + String CardNO=""; + String CardType=""; + float Amount=0; + String Tel=""; + String Email=""; + if(!rs.next()){ + out.println(""); + }else{ + username=rs.getString("username"); + Truename=rs.getString("Truename"); + city=rs.getString("city"); + address=rs.getString("address"); + postcode=rs.getString("postcode"); + CardNO=rs.getString("CardNO"); + CardType=rs.getString("CardType"); + Amount=rs.getFloat("Amount"); + Tel=rs.getString("Tel"); + Email=rs.getString("Email"); + } +%> + + + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ Ա ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ԱϸϢ
      +
    • ԱϢ/ⶳԱϢԱⶳӡ޸ĺɾ
    • +
    • ԱϢ鿴Բ鿴ԱĻϢԲ鿴Ա롣
    • +
    + + + + + + +
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       <%=username%>
     ʵ <%=Truename%>
         У <%=city%> +
         ַ <%=address%>
     룺 <%=postcode%> +
     ֤ͣ <%=CardType%>
     ֤룺 <%=CardNO%> +
          <%=Tel%>
     Email <%=Email%>
       <%=Amount%> (Ԫ)
    + +
    +
    +
    + +
    +
    + + +<% +}else{ + out.println(""); +}%> \ No newline at end of file diff --git a/17/WebRoot/manage/member_freeze.jsp b/17/WebRoot/manage/member_freeze.jsp new file mode 100644 index 0000000..2e90465 --- /dev/null +++ b/17/WebRoot/manage/member_freeze.jsp @@ -0,0 +1,19 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.lang.*"%> + + + + +<% +if(request.getParameter("ID")!=""){ + int ID=Integer.parseInt(request.getParameter("ID")); + String sql="update tb_member set freeze=1 where ID="+ID; + int ret=0; + ret=connDB.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> diff --git a/17/WebRoot/manage/member_thaw.jsp b/17/WebRoot/manage/member_thaw.jsp new file mode 100644 index 0000000..ec5278c --- /dev/null +++ b/17/WebRoot/manage/member_thaw.jsp @@ -0,0 +1,27 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.lang.*"%> + + + + + +Untitled Document + + + + +<% +if(request.getParameter("ID")!=""){ + int ID=Integer.parseInt(request.getParameter("ID")); + String sql="update tb_member set freeze=0 where ID="+ID; + int ret=0; + ret=connDB.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> + + diff --git a/17/WebRoot/manage/orderManage.jsp b/17/WebRoot/manage/orderManage.jsp new file mode 100644 index 0000000..149398e --- /dev/null +++ b/17/WebRoot/manage/orderManage.jsp @@ -0,0 +1,149 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + +<% +ResultSet rs=connDB.executeQuery("select * from tb_order"); +int orderID=0; +String username=""; +int bnumber=0; +String truename=""; +String address=""; +String postcode=""; +String tel=""; +String pay=""; +String carry=""; +String email=""; +float rebate=1; +String orderDate=""; +String bz=""; +int enforce=0; +%> + + +ͼ鳬 + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     
      +
    • ִУִСеġִСͼִд˶
    • +
    • Ϣ鿴Բ鿴ϸϢ޸ĶϢ
    • +
    + + + +
     
    + + + + + + + + + + + +<% +String str=(String)request.getParameter("Page"); +if(str==null){ + str="0"; +} +int pagesize=10; +rs.last(); +int RecordCount=rs.getRow(); +int maxPage=0; +maxPage=(RecordCount%pagesize==0)?(RecordCount/pagesize):(RecordCount/pagesize+1); + +int Page=Integer.parseInt(str); +if(Page<1){ + Page=1; +}else{ + if(((Page-1)*pagesize+1)>RecordCount){ + Page=maxPage; + } +} +rs.absolute((Page-1)*pagesize+1); +for(int i=1;i<=pagesize;i++){ + orderID=rs.getInt("orderID"); + bnumber=rs.getInt("bnumber"); + truename=rs.getString("truename"); + pay=rs.getString("pay"); + carry=rs.getString("carry"); + rebate=rs.getFloat("rebate"); + orderDate=rs.getString("orderDate"); + enforce=rs.getInt("enforce"); + %> + + + + + + + + + + +<% + try{ + if(!rs.next()){break;} + }catch(Exception e){} +} +%> +
    Ʒʵʽͷʽۿִ
    <%=orderID%><%=bnumber%><%=truename%><%=pay%><%=carry%><%=rebate*100%>%<%=orderDate%><%if(enforce==0){%><%}else{%>ִ<%}%>
    + + + + +
    ǰҳ[<%=Page%>/<%=maxPage%>]  + <%if(Page>1){%> + һҳһҳ + <% + } + if(Page + һҳһҳ  + <%} + %> +
    + +
    +
    + + diff --git a/17/WebRoot/manage/order_detail.jsp b/17/WebRoot/manage/order_detail.jsp new file mode 100644 index 0000000..34eb107 --- /dev/null +++ b/17/WebRoot/manage/order_detail.jsp @@ -0,0 +1,163 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +if (request.getParameter("ID")!=null){ +int ID=Integer.parseInt(request.getParameter("ID")); +ResultSet rs_main=connDB.executeQuery("select * from tb_order where orderID="+ID); +int orderID=0; +String username=""; +String Truename=""; +String address=""; +String postcode=""; +String tel=""; +String email=""; +String bz=""; +String ISBN=""; +String bookname=""; +String publisher=""; +float price=0; +int number=0; +float rebate=0; +String time=""; +if(rs_main.next()){ +orderID=rs_main.getInt("orderID"); +username=rs_main.getString("username"); +Truename=rs_main.getString("Truename"); +address=rs_main.getString("address"); +postcode=rs_main.getString("postcode"); +tel=rs_main.getString("tel"); +email=rs_main.getString("email"); +rebate=rs_main.getFloat("rebate"); +time=rs_main.getString("OrderDate"); +bz=rs_main.getString("bz"); +if (bz.equals("")){ + bz=""; +} +} +%> + + +ѯ + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ԡԡ
    + + + + + + + +
    + + + + + + + + + + +
     
      +
    • ִУִСеġִСͼִд˶
    • +
    • Ϣ鿴Բ鿴ϸϢ޸ĶϢ
    • +
    + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ţ <%=orderID%>
     <%=username%>
    ʵ <%=Truename%>
        ַ <%=address%>
    룺 <%=postcode%>
         <%=tel%>
    Email    <%=email%>
        ۣ <%=rebate*100%>%
    ʱ    䣺 <%=time%>
        ע <%=bz%>
    + + + + + + + + + <%ResultSet rs=connDB.executeQuery("select * from V_order_detail where orderID="+ID); + while(rs.next()){ + ISBN=rs.getString("ISBN"); + bookname=rs.getString("BookName"); + publisher=rs.getString("publisher"); + price=rs.getFloat("price"); + number=rs.getInt("number"); + %> + + + + + + + + <%}%> +
    ͼISBNͼ
    <%=ISBN%><%=bookname%><%=publisher%><%=price%>(Ԫ)<%=number%>
    + + + + +
     
    +
    + +
    +
    + + + +<%}else{ + response.sendRedirect("ordersearch.jsp"); +}%> \ No newline at end of file diff --git a/17/WebRoot/manage/order_enforce.jsp b/17/WebRoot/manage/order_enforce.jsp new file mode 100644 index 0000000..454889a --- /dev/null +++ b/17/WebRoot/manage/order_enforce.jsp @@ -0,0 +1,27 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.lang.*"%> + + + + + +Untitled Document + + + + +<% +if(request.getParameter("ID")!=""){ + int ID=Integer.parseInt(request.getParameter("ID")); + String sql="update tb_order set enforce=1 where orderID="+ID; + int ret=0; + ret=connDB.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> + + diff --git a/17/WebRoot/manage/pollManage.jsp b/17/WebRoot/manage/pollManage.jsp new file mode 100644 index 0000000..c7aa60f --- /dev/null +++ b/17/WebRoot/manage/pollManage.jsp @@ -0,0 +1,87 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + +<% +ResultSet rs=connDB.executeQuery("select * from tb_poll"); +%> + + +ͼ鳬 + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ͶƱĿϢ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ͶƱ
    • ͶƱĿ޸ģֻӺɾĿ
    • +
    • ͶƱĿͶƱĿϢӿԽͶƱĿӡ
    • +
    • ɾͶƱĿÿͶƱĿϢġɾťɾͶƱĿ
    • +
    + + + +
     
    + + + + + + +<% +int ID=0; +String optionName=""; +int poll=0; +while(rs.next()){ + ID=rs.getInt("ID"); + optionName=rs.getString("optionName"); + poll=rs.getInt("poll"); +%> + + + + + +<% +} +%> +
    ͶƱĿƱɾ
    <%=optionName%><%=poll%>
    +
    + +
    +
    + + diff --git a/17/WebRoot/manage/poll_add.jsp b/17/WebRoot/manage/poll_add.jsp new file mode 100644 index 0000000..b81f1f7 --- /dev/null +++ b/17/WebRoot/manage/poll_add.jsp @@ -0,0 +1,104 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + +<% +if(request.getParameter("optionName")!="" && request.getParameter("optionName")!=null){ + String optionName=chStr.chStr(request.getParameter("optionName")); + ResultSet rs=connDB.executeQuery("select * from tb_poll where optionName='"+optionName+"'"); + if(rs.next()){ + out.println(""); + }else{ + int ret=connDB.executeUpdate("insert into tb_poll (optionName) values('"+optionName+"')"); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } + } +} +%> + + + + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ͶƱ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ͶƱĿ
      +
    • ͶƱĿ޸ģֻӺɾĿ
    • +
    • ͶƱĿͶƱĿϢӿԽͶƱĿӡ
    • +
    • ɾͶƱĿÿͶƱĿϢġɾťɾͶƱĿ
    • +
    + + + + + + +
     
    +
    + + + + + + + + +
     ͶƱĿƣ
    + +  + +   + +
    +
    +
    + +
    +
    + + diff --git a/17/WebRoot/manage/poll_del.jsp b/17/WebRoot/manage/poll_del.jsp new file mode 100644 index 0000000..bccbe50 --- /dev/null +++ b/17/WebRoot/manage/poll_del.jsp @@ -0,0 +1,98 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +if (request.getParameter("ID")!=null){ + int ID=Integer.parseInt(request.getParameter("ID")); + ResultSet rs=connDB.executeQuery("select * from tb_poll where ID='"+ID+"'"); + String optionName=""; + if(!rs.next()){ + out.println(""); + }else{ + optionName=rs.getString("optionName"); + } +%> + + + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ͶƱĿ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ɾͶƱĿ
      +
    • ͶƱĿ޸ģֻӺɾĿ
    • +
    • ͶƱĿͶƱĿϢӿԽͶƱĿӡ
    • +
    • ɾͶƱĿÿͶƱĿϢġɾťɾͶƱĿ
    • +
    + + + + + + +
     
    +
    + + + + + + + + + + + +
     ݣ +
    + +  +   + +  
    +
    +
    + +
    +
    + + +<% +}else{ + out.println(""); +}%> \ No newline at end of file diff --git a/17/WebRoot/manage/poll_del_deal.jsp b/17/WebRoot/manage/poll_del_deal.jsp new file mode 100644 index 0000000..27bdec6 --- /dev/null +++ b/17/WebRoot/manage/poll_del_deal.jsp @@ -0,0 +1,29 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.lang.*"%> + + + + + +Untitled Document + + + + +<% +if(request.getParameter("hID")!=null){ + int ID=Integer.parseInt(request.getParameter("hID")); + String sql="delete from tb_poll where ID="+ID; + int ret=0; + ret=connDB.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +}else{ + out.println(""); +} +%> + + diff --git a/17/WebRoot/manage/safe.jsp b/17/WebRoot/manage/safe.jsp new file mode 100644 index 0000000..7a160a6 --- /dev/null +++ b/17/WebRoot/manage/safe.jsp @@ -0,0 +1,4 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> +<%if (session.getAttribute("manager")==null){ + out.println(""); +}%> diff --git a/17/WebRoot/newbook.jsp b/17/WebRoot/newbook.jsp new file mode 100644 index 0000000..0fcbe0b --- /dev/null +++ b/17/WebRoot/newbook.jsp @@ -0,0 +1,89 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + +<% +ResultSet rs_newbook=connDB.executeQuery("select * from tb_bookinfo where newbook=1 order by INTime desc"); +%> + + +ͼ鳬 + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + + + + +
    + +
    + + + + + +
    + + + + + + +
    + + + + + + + +
     
    + <%while(rs_newbook.next()){ + String ISBN=rs_newbook.getString("ISBN"); + String BookName=rs_newbook.getString("BookName"); + String publisher=rs_newbook.getString("publisher"); + %> + + + + + + + +
    <%=BookName%><%=publisher%> + <%if(session.getAttribute("UserName")!=null){%> + + <%}else{ + out.println("ȵ¼"); + }%> +
    + <%}%>
    +
     
    + +
    +
    + + diff --git a/17/WebRoot/ordersearch.jsp b/17/WebRoot/ordersearch.jsp new file mode 100644 index 0000000..c828f87 --- /dev/null +++ b/17/WebRoot/ordersearch.jsp @@ -0,0 +1,103 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +ResultSet rs=connDB.executeQuery("select * from tb_order where username='"+ +(String)session.getAttribute("UserName")+"'"); +int orderID=0; +String username=""; +int bnumber=0; +String truename=""; +String address=""; +String postcode=""; +String tel=""; +String pay=""; +String carry=""; +String email=""; +float rebate=1; +String orderDate=""; +String bz=""; +%> + + +ѯ + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + +
    + + + + + + + + +
    + + + +
    + + + + + + + + + + <%rs.first(); + do{ + orderID=rs.getInt("orderID"); + bnumber=rs.getInt("bnumber"); + truename=rs.getString("truename"); + pay=rs.getString("pay"); + carry=rs.getString("carry"); + rebate=rs.getFloat("rebate"); + orderDate=rs.getString("orderDate"); + %> + + + + + + + + + + <%}while(rs.next());%> +
    Ʒʵʽͷʽۿ
    <%=orderID%><%=bnumber%><%=truename%><%=pay%><%=carry%><%=rebate*100%>%<%=orderDate%>
    +
     
    + +
    +
    + + + diff --git a/17/WebRoot/ordersearch_detail.jsp b/17/WebRoot/ordersearch_detail.jsp new file mode 100644 index 0000000..c468f53 --- /dev/null +++ b/17/WebRoot/ordersearch_detail.jsp @@ -0,0 +1,136 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +<% +if (request.getParameter("ID")!=null){ + int ID=Integer.parseInt(request.getParameter("ID")); + ResultSet rs_main=connDB.executeQuery("select * from tb_order where orderID="+ID); + int orderID=0; + String username=""; + String address=""; + String postcode=""; + String tel=""; + String email=""; + String bz=""; + String ISBN=""; + String bookname=""; + String publisher=""; + float price=0; + int number=0; + if(rs_main.next()){ + orderID=rs_main.getInt("orderID"); + address=rs_main.getString("address"); + postcode=rs_main.getString("postcode"); + tel=rs_main.getString("tel"); + email=rs_main.getString("email"); + bz=rs_main.getString("bz"); + if (bz.equals("")){ + bz=""; + } + } +%> + + +ѯ + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + +
    + + + + + + + + +
    + + + +
     
    + + + + + + + + + + + + + + + + + + + +
    ţ <%=orderID%>
        ַ <%=address%>
    룺 <%=postcode%>
         <%=tel%>
    Email    <%=email%>
        ע <%=bz%>
    + + + + + + + + + <%ResultSet rs=connDB.executeQuery("select * from V_order_detail where orderID="+ID); + while(rs.next()){ + ISBN=rs.getString("ISBN"); + bookname=rs.getString("BookName"); + publisher=rs.getString("publisher"); + price=rs.getFloat("price"); + number=rs.getInt("number"); + %> + + + + + + + + <%}%> +
    ͼISBNͼ
    <%=ISBN%><%=bookname%><%=publisher%><%=price%>(Ԫ)<%=number%>
     
    + + + + +
    + +
    +
    + + + +<%}else{ + response.sendRedirect("ordersearch.jsp"); +}%> \ No newline at end of file diff --git a/17/WebRoot/poll_deal.jsp b/17/WebRoot/poll_deal.jsp new file mode 100644 index 0000000..59ab313 --- /dev/null +++ b/17/WebRoot/poll_deal.jsp @@ -0,0 +1,20 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +if(session.getAttribute("poll")==null){ + if (!request.getParameter("optionname").equals("")){ + String opt=chStr.chStr(request.getParameter("optionname")); + int temp=connDB.executeUpdate("update tb_poll set poll=poll+1 where optionName='"+opt+"'"); + if (temp==0){ + out.println(""); + }else{ + out.println(""); + session.setAttribute("poll","ok"); + } + } +}else{ + out.println(""); +} +%> + diff --git a/17/WebRoot/poll_result.jsp b/17/WebRoot/poll_result.jsp new file mode 100644 index 0000000..ce394fe --- /dev/null +++ b/17/WebRoot/poll_result.jsp @@ -0,0 +1,103 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +int sum=0; +ResultSet rs_sum=connDB.executeQuery("select sum(poll) as sumpoll from tb_poll"); +if (rs_sum.next()){ + sum=rs_sum.getInt("sumpoll"); +} +ResultSet rs=connDB.executeQuery("select * from tb_poll"); +String optionname=""; +int poll=0; +float percent=0; +%> + + +ѯ + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + +
    + + + + + + + + +
    + + + +
    +
    + + + <%rs.last(); + int rowsize=rs.getRow(); + rs.first(); + do{ + optionname=rs.getString("optionName"); + poll=rs.getInt("poll"); + percent=(float)poll/sum*100; //˴ǿת + %> + + <%}while(rs.next());%> + +
    + + + + + + +
    <%=optionname%>
    +
    + + <%rs.first(); + do{ + optionname=rs.getString("optionName"); + poll=rs.getInt("poll"); + percent=(float)poll/sum*100; //˴ǿת + %> + + + + + + <%} while(rs.next());%> +
     <%=rs.getString("optionName")%>[<%=rs.getInt("poll")%>]ͶƱռ <%=percent%>%
     
    + +
    +
    + + + + diff --git a/17/WebRoot/register.jsp b/17/WebRoot/register.jsp new file mode 100644 index 0000000..b556ea9 --- /dev/null +++ b/17/WebRoot/register.jsp @@ -0,0 +1,138 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + +ͼ鳬 + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ ûעϢ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ע
      +
    • ûΪûжѯ֤ͨţʹӢĸֻӢĸ֡»ߵϣȿ3-20ַ֮ڡ
    • +
    • ʵ ʵԱϵΪûԷ롣
    • +
    • 룺趨6-20λ֮䣬û뼰ȷһ¡
    • +
    • ֤룺ȷ֤롣
    • +
    • EmailдЧEmailַԱϵ
    • +
    + + + + + + +
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + * [û]
    ʵ + *
        룺 + *
    ȷ룺 + *
    ֤ ֤  + + ֤ + +ѧ֤
    ֤룺 + *
    ϵ绰
    ڳУ
    Email + *
    ϵַ
      + +
    +
    +
    + +
    +
    + + diff --git a/17/WebRoot/register_deal.jsp b/17/WebRoot/register_deal.jsp new file mode 100644 index 0000000..ae0265c --- /dev/null +++ b/17/WebRoot/register_deal.jsp @@ -0,0 +1,37 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +ûעɹ! + + + + +<% +request.setCharacterEncoding("gb2312"); +String username=request.getParameter("UserName"); +String truename=request.getParameter("TrueName"); +String PWD=request.getParameter("PWD1"); +String cardNO=request.getParameter("cardNO"); +String CardType=request.getParameter("CardType"); +String tel=request.getParameter("tel"); +String city=request.getParameter("city"); +String address=request.getParameter("address"); +String postcode=request.getParameter("postcode"); +String Email=request.getParameter("Email"); +ResultSet rs=connDB.executeQuery("select * from tb_Member where username='"+username+"'"); +if (rs.next()){ + out.println(""); +}else{ + String sql="Insert into tb_Member (username,truename,password,city,address,postcode,cardNO,CardType,tel,Email) values('"+username+"','"+truename+"','"+PWD+"','"+city+"','"+address+"','"+postcode+"','"+cardNO+"','"+CardType+"','"+tel+"','"+Email+"')"; + int ret=0; + ret=connDB.executeUpdate(sql); + if (ret!=0){ + out.println(""); + }else{ + out.println(""); + } +} +%> + + diff --git a/17/WebRoot/safe.jsp b/17/WebRoot/safe.jsp new file mode 100644 index 0000000..7ab72a0 --- /dev/null +++ b/17/WebRoot/safe.jsp @@ -0,0 +1,4 @@ +<%@ page contentType="text/html; charset=gb2312" language="java"%> +<%if (session.getAttribute("UserName")==null){ + out.println(""); +}%> diff --git a/17/WebRoot/search.jsp b/17/WebRoot/search.jsp new file mode 100644 index 0000000..aef1578 --- /dev/null +++ b/17/WebRoot/search.jsp @@ -0,0 +1,17 @@ +<%@ page contentType="text/html; charset=gb2312" %> +
    + + + + + + + + + + + +
       
      + +
    +
    diff --git a/17/WebRoot/search_deal.jsp b/17/WebRoot/search_deal.jsp new file mode 100644 index 0000000..d1b110d --- /dev/null +++ b/17/WebRoot/search_deal.jsp @@ -0,0 +1,152 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + +<% +String key=""; +String sql=""; +if(request.getParameter("bookkey")!=null){ + key=chStr.chStr(request.getParameter("bookkey")); + sql="select * from tb_bookinfo where bookname like '%"+key+"%'"; +}else{ + if(request.getParameter("key")==null){ + key=""; + sql="select * from tb_bookinfo"; + }else{ + key=chStr.chStr(request.getParameter("key")); + sql="select * from tb_bookinfo where bookname like '%"+key+"%'"; + } +} +ResultSet rs_search=connDB.executeQuery(sql); +%> + + + + + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + + + + +
    +
    + + + + + +
    + + + + + + +
      IJѯؼΪ[<%=key%>]
    + + + + + + + +
     
    +<% +if(!(rs_search.next())){ + out.println("
    ޷!
    "); +}else{ +String str=(String)request.getParameter("Page"); +if(str==null){ + str="0"; +} +int pagesize=10; +rs_search.last(); +int RecordCount=rs_search.getRow(); +//out.println(String.valueOf(RecordCount)); +int maxPage=0; +maxPage=(RecordCount%pagesize==0)?(RecordCount/pagesize):(RecordCount/pagesize+1); + +int Page=Integer.parseInt(str); +if(Page<1){ + Page=1; +}else{ + if(((Page-1)*pagesize+1)>RecordCount){ + Page=maxPage; + } +} +rs_search.absolute((Page-1)*pagesize+1); +for(int i=1;i<=pagesize;i++){ + String ISBN=rs_search.getString("ISBN"); + String BookName=rs_search.getString("BookName"); + String publisher=rs_search.getString("publisher"); + %> + + + + + + + +
    <%=BookName%><%=publisher%> + <%if(session.getAttribute("UserName")!=null){%> + + <%}else{ + out.println("ȵ¼"); + }%> +
    + <% + try{ + if(!rs_search.next()){break;} + }catch(Exception e){} +} +%> +
    + + + + +
    ǰҳ[<%=Page%>/<%=maxPage%>]  + <%if(Page>1){%> + һһҳ + <% + } + if(Page + һҳһҳ  + <%} + }%> +
    +
    +
     
    + +
    +
    + + diff --git a/17/WebRoot/sort.jsp b/17/WebRoot/sort.jsp new file mode 100644 index 0000000..2df2365 --- /dev/null +++ b/17/WebRoot/sort.jsp @@ -0,0 +1,89 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + +<% +ResultSet rs_sort=connDB.executeQuery("select * from (select top 10 * from ( select sum(number) as amount,ISBN from tb_Order_detail group by ISBN )as tab order by amount desc) o inner join tb_bookinfo b on o.ISBN=b.ISBN order by o.amount desc"); +%> + + +ͼ鳬 + + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + + + + + + + +
    + +
    + + + + + +
    + + + + + + +
    + + + + + + + +
     
    + <%while(rs_sort.next()){ + String ISBN=rs_sort.getString("ISBN"); + String BookName=rs_sort.getString("BookName"); + String publisher=rs_sort.getString("publisher"); + %> + + + + + + + +
    <%=BookName%><%=publisher%> + <%if(session.getAttribute("UserName")!=null){%> + + <%}else{ + out.println("ȵ¼"); + }%> +
    + <%}%>
    +
     
    + +
    +
    + + diff --git a/17/WebRoot/usermodify.jsp b/17/WebRoot/usermodify.jsp new file mode 100644 index 0000000..8ffd2d4 --- /dev/null +++ b/17/WebRoot/usermodify.jsp @@ -0,0 +1,154 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + +<% +ResultSet rs=connDB.executeQuery("select * from tb_Member where username='"+session.getAttribute("UserName")+"'"); +if(rs.next()){ + String username=rs.getString("UserName"); + String truename=rs.getString("TrueName"); + String PWD=rs.getString("password"); + String cardNO=rs.getString("cardNO"); + String CardType=rs.getString("CardType"); + String tel=rs.getString("tel"); + String city=rs.getString("city"); + String address=rs.getString("address"); + String postcode=rs.getString("postcode"); + String Email=rs.getString("Email"); +%> + + + + + + + + + + + + + +
    + + + + +
    + + + + + +
    ԡԡ Ա޸ ԡԡ
    + + + + + + +
    + + + + + + + + + + +
     ޸
      +
    • ûΪûжѯ֤ͨţ޸ģʹӢĸֻӢĸ֡»ߵϣȿ3-20ַ֮ڡ
    • +
    • ʵ ʵԱϵΪûԷ롣
    • +
    • 룺趨6-20λ֮䣬û뼰ȷһ¡
    • +
    • ֤룺ȷ֤롣
    • +
    • EmailдЧEmailַԱϵ
    • +
    + + + + + + +
     
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + *
    ʵ + *
        룺 + * +
     룺 +*
    ȷ룺 + *
    ֤ checked<%}%>> + ֤  + checked<%}%>> + ֤ + checked<%}%>> +ѧ֤
    ֤룺 + *
    ϵ绰
    ڳУ
    Email + *
    ϵַ
      + +
    +
    +
    + +
    +
    + + +<%}else{ + out.println(""); +}%> \ No newline at end of file diff --git a/17/WebRoot/usermodify_deal.jsp b/17/WebRoot/usermodify_deal.jsp new file mode 100644 index 0000000..fff5385 --- /dev/null +++ b/17/WebRoot/usermodify_deal.jsp @@ -0,0 +1,38 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + + + +ûעɹ! + + + + +<% +String username=chStr.chStr(request.getParameter("UserName")); +if (username!=null && username.length()>0 ){ + String truename=chStr.chStr(request.getParameter("TrueName")); + String PWD=chStr.chStr(request.getParameter("PWD2")); + String cardNO=chStr.chStr(request.getParameter("cardNO")); + String CardType=chStr.chStr(request.getParameter("CardType")); + String tel=chStr.chStr(request.getParameter("tel")); + String city=chStr.chStr(request.getParameter("city")); + String address=chStr.chStr(request.getParameter("address")); + String postcode=chStr.chStr(request.getParameter("postcode")); + String Email=chStr.chStr(request.getParameter("Email")); + int ret=0; + String sql="update tb_Member set Truename='"+truename+"',password='"+PWD+"',cardNO='"+cardNO+"',CardType='"+CardType+"',tel='"+tel+"',city='"+city+"',address='"+address+"',postcode='"+postcode+"',email='"+Email+"' where username='"+username+"'"; + ret=connDB.executeUpdate(sql); + if(ret!=0){ + out.println(""); + }else{ + out.println(""); + } +}else{ + response.sendRedirect("index.jsp"); +} + +%> + + diff --git a/17/src/beans/bookelement.java b/17/src/beans/bookelement.java new file mode 100644 index 0000000..2074a1b --- /dev/null +++ b/17/src/beans/bookelement.java @@ -0,0 +1,19 @@ +// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov. +// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html +// Decompiler options: packimports(3) fieldsfirst ansi +// Source File Name: bookelement.java + +package beans; + + +public class bookelement +{ + + public String ISBN; + public float price; + public int number; + + public bookelement() + { + } +} diff --git a/17/src/beans/chStr.java b/17/src/beans/chStr.java new file mode 100644 index 0000000..72dbd88 --- /dev/null +++ b/17/src/beans/chStr.java @@ -0,0 +1,48 @@ +// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov. +// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html +// Decompiler options: packimports(3) fieldsfirst ansi +// Source File Name: chStr.java + +package beans; + + +public class chStr +{ + + public chStr() + { + } + + public String chStr(String str) + { + if(str == null) + str = ""; + else + try + { + str = (new String(str.getBytes("iso-8859-1"), "GB2312")).trim(); + } + catch(Exception e) + { + e.printStackTrace(System.err); + } + return str; + } + + public String convertStr(String str1) + { + if(str1 == null) + str1 = ""; + else + try + { + str1 = str1.replaceAll(" ", " "); + str1 = str1.replaceAll("\r\n", "
    "); + } + catch(Exception e) + { + e.printStackTrace(System.err); + } + return str1; + } +} diff --git a/17/src/beans/connDB.java b/17/src/beans/connDB.java new file mode 100644 index 0000000..3eb59d5 --- /dev/null +++ b/17/src/beans/connDB.java @@ -0,0 +1,92 @@ +package beans; + +import java.io.PrintStream; +import java.sql.*; + +public class connDB +{ + + private static Connection conn = null; + private static Statement stmt = null; + private static ResultSet rs = null; + private static final String driverClass = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; + private static final String URL = "jdbc:sqlserver://localhost:1433;DatabaseName=db_bookmanage"; + private static final String user = "sa"; + private static final String pwd = "111"; + public connDB() + { + try { + Class.forName(driverClass); + conn = DriverManager.getConnection(URL,user,pwd); + } catch (Exception e) { + + e.printStackTrace(); + } + } + public ResultSet executeQuery(String sql) + { + try { + stmt = conn.createStatement(1004, 1007); + rs = stmt.executeQuery(sql); + } + catch(SQLException ex) + { + System.err.println(ex.getMessage()); + } + return rs; + } + + public int executeUpdate(String sql) + { + int result = 0; + try + { + stmt = conn.createStatement(1004, 1007); + result = stmt.executeUpdate(sql); + } + catch(SQLException ex) + { + result = 0; + } + return result; + } + + public int executeUpdate_id(String sql) + { + int result = 0; + try + { + stmt = conn.createStatement(1004, 1007); + result = stmt.executeUpdate(sql); + String ID = "select @@IDENTITY as id"; + rs = stmt.executeQuery(ID); + if(rs.next()) + { + int autoID = rs.getInt("id"); + result = autoID; + } + } + catch(SQLException ex) + { + result = 0; + } + return result; + } + + public void close() + { + try + { + if(rs != null) + rs.close(); + if(stmt != null) + stmt.close(); + if(conn != null) + conn.close(); + } + catch(Exception e) + { + e.printStackTrace(System.err); + } + } +} diff --git "a/17/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/17/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..363ff2f Binary files /dev/null and "b/17/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/18/.classpath b/18/.classpath new file mode 100644 index 0000000..a0437c9 --- /dev/null +++ b/18/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/18/.mymetadata b/18/.mymetadata new file mode 100644 index 0000000..76c685e --- /dev/null +++ b/18/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/18/.project b/18/.project new file mode 100644 index 0000000..ce679cd --- /dev/null +++ b/18/.project @@ -0,0 +1,50 @@ + + + 18 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/18/.settings/.jsdtscope b/18/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/18/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/18/.settings/org.eclipse.jdt.core.prefs b/18/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..5659e3a --- /dev/null +++ b/18/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Wed Mar 23 15:53:27 GMT+08:00 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.source=1.3 diff --git a/18/.settings/org.eclipse.wst.jsdt.ui.superType.container b/18/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/18/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/18/.settings/org.eclipse.wst.jsdt.ui.superType.name b/18/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/18/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/18/WebRoot/Flash/banner.bak b/18/WebRoot/Flash/banner.bak new file mode 100644 index 0000000..ec4d26a Binary files /dev/null and b/18/WebRoot/Flash/banner.bak differ diff --git a/18/WebRoot/Flash/banner.fla b/18/WebRoot/Flash/banner.fla new file mode 100644 index 0000000..d27effa Binary files /dev/null and b/18/WebRoot/Flash/banner.fla differ diff --git a/18/WebRoot/Flash/banner.swf b/18/WebRoot/Flash/banner.swf new file mode 100644 index 0000000..fc2f065 Binary files /dev/null and b/18/WebRoot/Flash/banner.swf differ diff --git a/18/WebRoot/Flash/banner.swi b/18/WebRoot/Flash/banner.swi new file mode 100644 index 0000000..0fcb5b0 Binary files /dev/null and b/18/WebRoot/Flash/banner.swi differ diff --git a/18/WebRoot/Flash/banner1.swf b/18/WebRoot/Flash/banner1.swf new file mode 100644 index 0000000..2b77988 Binary files /dev/null and b/18/WebRoot/Flash/banner1.swf differ diff --git a/18/WebRoot/Flash/banner_bbs.swf b/18/WebRoot/Flash/banner_bbs.swf new file mode 100644 index 0000000..ace1fee Binary files /dev/null and b/18/WebRoot/Flash/banner_bbs.swf differ diff --git a/18/WebRoot/Flash/banner_word.bak b/18/WebRoot/Flash/banner_word.bak new file mode 100644 index 0000000..821b22e Binary files /dev/null and b/18/WebRoot/Flash/banner_word.bak differ diff --git a/18/WebRoot/Flash/banner_word.swf b/18/WebRoot/Flash/banner_word.swf new file mode 100644 index 0000000..86925c2 Binary files /dev/null and b/18/WebRoot/Flash/banner_word.swf differ diff --git a/18/WebRoot/Flash/banner_word.swi b/18/WebRoot/Flash/banner_word.swi new file mode 100644 index 0000000..e68c9b9 Binary files /dev/null and b/18/WebRoot/Flash/banner_word.swi differ diff --git a/18/WebRoot/Flash/bbs.bak b/18/WebRoot/Flash/bbs.bak new file mode 100644 index 0000000..7ce8843 Binary files /dev/null and b/18/WebRoot/Flash/bbs.bak differ diff --git a/18/WebRoot/Flash/bbs.swi b/18/WebRoot/Flash/bbs.swi new file mode 100644 index 0000000..1c822cc Binary files /dev/null and b/18/WebRoot/Flash/bbs.swi differ diff --git a/18/WebRoot/Flash/bbs_detail_02.gif b/18/WebRoot/Flash/bbs_detail_02.gif new file mode 100644 index 0000000..12fe3e2 Binary files /dev/null and b/18/WebRoot/Flash/bbs_detail_02.gif differ diff --git a/18/WebRoot/Flash/main.swf b/18/WebRoot/Flash/main.swf new file mode 100644 index 0000000..fcab64c Binary files /dev/null and b/18/WebRoot/Flash/main.swf differ diff --git a/18/WebRoot/H_navigation.jsp b/18/WebRoot/H_navigation.jsp new file mode 100644 index 0000000..6704e2b --- /dev/null +++ b/18/WebRoot/H_navigation.jsp @@ -0,0 +1,6 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + + + +
    ۵Ǽ |۲ѯ | | û | | Ʒ | Թ | Ʒ | ҳ
    \ No newline at end of file diff --git a/18/WebRoot/Images/Top.GIF b/18/WebRoot/Images/Top.GIF new file mode 100644 index 0000000..52afc4a Binary files /dev/null and b/18/WebRoot/Images/Top.GIF differ diff --git a/18/WebRoot/Images/del.gif b/18/WebRoot/Images/del.gif new file mode 100644 index 0000000..24343e3 Binary files /dev/null and b/18/WebRoot/Images/del.gif differ diff --git a/18/WebRoot/Images/index/before_board.GIF b/18/WebRoot/Images/index/before_board.GIF new file mode 100644 index 0000000..addcddd Binary files /dev/null and b/18/WebRoot/Images/index/before_board.GIF differ diff --git a/18/WebRoot/Images/index/before_chain.GIF b/18/WebRoot/Images/index/before_chain.GIF new file mode 100644 index 0000000..e1407dd Binary files /dev/null and b/18/WebRoot/Images/index/before_chain.GIF differ diff --git a/18/WebRoot/Images/index/before_contact.GIF b/18/WebRoot/Images/index/before_contact.GIF new file mode 100644 index 0000000..f1c6a3f Binary files /dev/null and b/18/WebRoot/Images/index/before_contact.GIF differ diff --git a/18/WebRoot/Images/index/before_introduce.GIF b/18/WebRoot/Images/index/before_introduce.GIF new file mode 100644 index 0000000..3d94644 Binary files /dev/null and b/18/WebRoot/Images/index/before_introduce.GIF differ diff --git a/18/WebRoot/Images/index/before_produce.GIF b/18/WebRoot/Images/index/before_produce.GIF new file mode 100644 index 0000000..4f39819 Binary files /dev/null and b/18/WebRoot/Images/index/before_produce.GIF differ diff --git a/18/WebRoot/Images/index/index_01.gif b/18/WebRoot/Images/index/index_01.gif new file mode 100644 index 0000000..fa92fa9 Binary files /dev/null and b/18/WebRoot/Images/index/index_01.gif differ diff --git a/18/WebRoot/Images/index/index_02.gif b/18/WebRoot/Images/index/index_02.gif new file mode 100644 index 0000000..7c76c54 Binary files /dev/null and b/18/WebRoot/Images/index/index_02.gif differ diff --git a/18/WebRoot/Images/index/index_03.gif b/18/WebRoot/Images/index/index_03.gif new file mode 100644 index 0000000..41f438b Binary files /dev/null and b/18/WebRoot/Images/index/index_03.gif differ diff --git a/18/WebRoot/Images/index/index_04.gif b/18/WebRoot/Images/index/index_04.gif new file mode 100644 index 0000000..42d8a57 Binary files /dev/null and b/18/WebRoot/Images/index/index_04.gif differ diff --git a/18/WebRoot/Images/index/index_05.gif b/18/WebRoot/Images/index/index_05.gif new file mode 100644 index 0000000..96041e4 Binary files /dev/null and b/18/WebRoot/Images/index/index_05.gif differ diff --git a/18/WebRoot/Images/index/index_051.gif b/18/WebRoot/Images/index/index_051.gif new file mode 100644 index 0000000..5075ad7 Binary files /dev/null and b/18/WebRoot/Images/index/index_051.gif differ diff --git a/18/WebRoot/Images/index/index_06.gif b/18/WebRoot/Images/index/index_06.gif new file mode 100644 index 0000000..0d3d3cb Binary files /dev/null and b/18/WebRoot/Images/index/index_06.gif differ diff --git a/18/WebRoot/Images/index/index_07.gif b/18/WebRoot/Images/index/index_07.gif new file mode 100644 index 0000000..71baa14 Binary files /dev/null and b/18/WebRoot/Images/index/index_07.gif differ diff --git a/18/WebRoot/Images/index/index_08.gif b/18/WebRoot/Images/index/index_08.gif new file mode 100644 index 0000000..1d093f5 Binary files /dev/null and b/18/WebRoot/Images/index/index_08.gif differ diff --git a/18/WebRoot/Images/index/index_09.gif b/18/WebRoot/Images/index/index_09.gif new file mode 100644 index 0000000..8200c8e Binary files /dev/null and b/18/WebRoot/Images/index/index_09.gif differ diff --git a/18/WebRoot/Images/index/index_10.gif b/18/WebRoot/Images/index/index_10.gif new file mode 100644 index 0000000..e93ca6e Binary files /dev/null and b/18/WebRoot/Images/index/index_10.gif differ diff --git a/18/WebRoot/Images/index/index_11.gif b/18/WebRoot/Images/index/index_11.gif new file mode 100644 index 0000000..a094b1c Binary files /dev/null and b/18/WebRoot/Images/index/index_11.gif differ diff --git a/18/WebRoot/Images/index/index_12.gif b/18/WebRoot/Images/index/index_12.gif new file mode 100644 index 0000000..233524f Binary files /dev/null and b/18/WebRoot/Images/index/index_12.gif differ diff --git a/18/WebRoot/Images/index/top.GIF b/18/WebRoot/Images/index/top.GIF new file mode 100644 index 0000000..cd87fd5 Binary files /dev/null and b/18/WebRoot/Images/index/top.GIF differ diff --git a/18/WebRoot/Images/list.gif b/18/WebRoot/Images/list.gif new file mode 100644 index 0000000..a1c78c3 Binary files /dev/null and b/18/WebRoot/Images/list.gif differ diff --git a/18/WebRoot/Images/modify.gif b/18/WebRoot/Images/modify.gif new file mode 100644 index 0000000..ba15f87 Binary files /dev/null and b/18/WebRoot/Images/modify.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_addbbs.gif b/18/WebRoot/Images/tiring-room/h_addbbs.gif new file mode 100644 index 0000000..b3707ba Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_addbbs.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_addgoods.gif b/18/WebRoot/Images/tiring-room/h_addgoods.gif new file mode 100644 index 0000000..c09fd89 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_addgoods.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_addproduct.gif b/18/WebRoot/Images/tiring-room/h_addproduct.gif new file mode 100644 index 0000000..aece241 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_addproduct.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_bbs.gif b/18/WebRoot/Images/tiring-room/h_bbs.gif new file mode 100644 index 0000000..5db657e Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_bbs.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_broad.gif b/18/WebRoot/Images/tiring-room/h_broad.gif new file mode 100644 index 0000000..5f7f02c Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_broad.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_goods.gif b/18/WebRoot/Images/tiring-room/h_goods.gif new file mode 100644 index 0000000..87eaf78 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_goods.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_manager.gif b/18/WebRoot/Images/tiring-room/h_manager.gif new file mode 100644 index 0000000..a41b00d Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_manager.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_modifybbs.gif b/18/WebRoot/Images/tiring-room/h_modifybbs.gif new file mode 100644 index 0000000..83ea7af Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_modifybbs.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_modifychain.gif b/18/WebRoot/Images/tiring-room/h_modifychain.gif new file mode 100644 index 0000000..17b9ede Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_modifychain.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_modifygoods.gif b/18/WebRoot/Images/tiring-room/h_modifygoods.gif new file mode 100644 index 0000000..bd845b4 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_modifygoods.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_modifyproduct.gif b/18/WebRoot/Images/tiring-room/h_modifyproduct.gif new file mode 100644 index 0000000..4702fb4 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_modifyproduct.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_newchain.gif b/18/WebRoot/Images/tiring-room/h_newchain.gif new file mode 100644 index 0000000..360f673 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_newchain.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_product.gif b/18/WebRoot/Images/tiring-room/h_product.gif new file mode 100644 index 0000000..75f5d7a Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_product.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_sell.gif b/18/WebRoot/Images/tiring-room/h_sell.gif new file mode 100644 index 0000000..88a70c4 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_sell.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_sellquery.gif b/18/WebRoot/Images/tiring-room/h_sellquery.gif new file mode 100644 index 0000000..17edab2 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_sellquery.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_sort.gif b/18/WebRoot/Images/tiring-room/h_sort.gif new file mode 100644 index 0000000..ba49599 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_sort.gif differ diff --git a/18/WebRoot/Images/tiring-room/h_user.gif b/18/WebRoot/Images/tiring-room/h_user.gif new file mode 100644 index 0000000..ffb85fc Binary files /dev/null and b/18/WebRoot/Images/tiring-room/h_user.gif differ diff --git a/18/WebRoot/Images/tiring-room/tiring-room_01.gif b/18/WebRoot/Images/tiring-room/tiring-room_01.gif new file mode 100644 index 0000000..61eaf60 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/tiring-room_01.gif differ diff --git a/18/WebRoot/Images/tiring-room/tiring-room_02.gif b/18/WebRoot/Images/tiring-room/tiring-room_02.gif new file mode 100644 index 0000000..e2069a7 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/tiring-room_02.gif differ diff --git a/18/WebRoot/Images/tiring-room/tiring-room_03.gif b/18/WebRoot/Images/tiring-room/tiring-room_03.gif new file mode 100644 index 0000000..528fd59 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/tiring-room_03.gif differ diff --git a/18/WebRoot/Images/tiring-room/tiring-room_04.gif b/18/WebRoot/Images/tiring-room/tiring-room_04.gif new file mode 100644 index 0000000..f5e3c62 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/tiring-room_04.gif differ diff --git a/18/WebRoot/Images/tiring-room/tiring-room_05.gif b/18/WebRoot/Images/tiring-room/tiring-room_05.gif new file mode 100644 index 0000000..c61194a Binary files /dev/null and b/18/WebRoot/Images/tiring-room/tiring-room_05.gif differ diff --git a/18/WebRoot/Images/tiring-room/tiring-room_06.gif b/18/WebRoot/Images/tiring-room/tiring-room_06.gif new file mode 100644 index 0000000..fd3475a Binary files /dev/null and b/18/WebRoot/Images/tiring-room/tiring-room_06.gif differ diff --git a/18/WebRoot/Images/tiring-room/tiring-room_07.gif b/18/WebRoot/Images/tiring-room/tiring-room_07.gif new file mode 100644 index 0000000..38c4836 Binary files /dev/null and b/18/WebRoot/Images/tiring-room/tiring-room_07.gif differ diff --git a/18/WebRoot/Images/tiring-room/tiring-room_08.gif b/18/WebRoot/Images/tiring-room/tiring-room_08.gif new file mode 100644 index 0000000..dedf76d Binary files /dev/null and b/18/WebRoot/Images/tiring-room/tiring-room_08.gif differ diff --git a/18/WebRoot/META-INF/MANIFEST.MF b/18/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/18/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Dbmess.class b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbmess.class new file mode 100644 index 0000000..4516dd7 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbmess.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Dbnews.class b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbnews.class new file mode 100644 index 0000000..0946f95 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbnews.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Dbproduct.class b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbproduct.class new file mode 100644 index 0000000..ef870aa Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbproduct.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Dbsell.class b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbsell.class new file mode 100644 index 0000000..0ad4ac7 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbsell.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Dbshop.class b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbshop.class new file mode 100644 index 0000000..fde32c8 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbshop.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Dbware.class b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbware.class new file mode 100644 index 0000000..e4fba57 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/Dbware.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/MessNotFoundException.class b/18/WebRoot/WEB-INF/classes/electric/dbs/MessNotFoundException.class new file mode 100644 index 0000000..bc9e96f Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/MessNotFoundException.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Messdb.class b/18/WebRoot/WEB-INF/classes/electric/dbs/Messdb.class new file mode 100644 index 0000000..87920fe Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/Messdb.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/MotifBean.class b/18/WebRoot/WEB-INF/classes/electric/dbs/MotifBean.class new file mode 100644 index 0000000..71f2b65 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/MotifBean.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/NewsNotFoundException.class b/18/WebRoot/WEB-INF/classes/electric/dbs/NewsNotFoundException.class new file mode 100644 index 0000000..f7c0ad7 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/NewsNotFoundException.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Newsdb.class b/18/WebRoot/WEB-INF/classes/electric/dbs/Newsdb.class new file mode 100644 index 0000000..8a5931c Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/Newsdb.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Newsdb.java~1~ b/18/WebRoot/WEB-INF/classes/electric/dbs/Newsdb.java~1~ new file mode 100644 index 0000000..21ebcf7 --- /dev/null +++ b/18/WebRoot/WEB-INF/classes/electric/dbs/Newsdb.java~1~ @@ -0,0 +1,62 @@ +package electric.dbs; +import electric.dbs.Dbnews; +import java.util.Collection; +import java.util.ArrayList; +import java.sql.SQLException; +import java.sql.ResultSet; +import java.util.Iterator; +import java.sql.*; +import javax.servlet.http.*; +import electric.electricUtils.*; +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ +public class Newsdb { + public Newsdb() { + } + + public Collection select(int step, int page) { + Collection coll = new ArrayList(); + Connection con=null; + ResultSet rs=null; + PreparedStatement pstmt=null; + int tip = step * (page - 1); + try { + String sql="SELECT * FROM [NEWS] WHERE STATUS<>1"; + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = pstmt.executeQuery(); + System.out.print(tip); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= step; i++) { + Dbnews news = new Dbnews(); + news.setId(rs.getInt(1)); + news.setMotif(rs.getString(2)); + news.setKithepeople(rs.getString(3)); + news.setContent(rs.getString(4)); + news.setCreateDate(rs.getString(5)); + news.setCreatepeople(rs.getInt(6)); + news.setModifyDate(rs.getString(7)); + news.setModifypeople(rs.getInt(8)); + news.setStatus(rs.getInt(9)); + System.out.print(rs.getString(5)+"333"); + coll.add(news); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + return coll; + } + } +} \ No newline at end of file diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/ProductNotFoundException.class b/18/WebRoot/WEB-INF/classes/electric/dbs/ProductNotFoundException.class new file mode 100644 index 0000000..d56eb3f Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/ProductNotFoundException.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Productdb.class b/18/WebRoot/WEB-INF/classes/electric/dbs/Productdb.class new file mode 100644 index 0000000..9e3013f Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/Productdb.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/SellNotFoundException.class b/18/WebRoot/WEB-INF/classes/electric/dbs/SellNotFoundException.class new file mode 100644 index 0000000..1416f4e Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/SellNotFoundException.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Selldb.class b/18/WebRoot/WEB-INF/classes/electric/dbs/Selldb.class new file mode 100644 index 0000000..0749664 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/Selldb.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/ShopNotFoundException.class b/18/WebRoot/WEB-INF/classes/electric/dbs/ShopNotFoundException.class new file mode 100644 index 0000000..8e95eb5 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/ShopNotFoundException.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/Shopdb.class b/18/WebRoot/WEB-INF/classes/electric/dbs/Shopdb.class new file mode 100644 index 0000000..f188478 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/Shopdb.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/WareNotFoundException.class b/18/WebRoot/WEB-INF/classes/electric/dbs/WareNotFoundException.class new file mode 100644 index 0000000..652e7d2 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/WareNotFoundException.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/mess.class b/18/WebRoot/WEB-INF/classes/electric/dbs/mess.class new file mode 100644 index 0000000..4cdb78f Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/mess.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/news.class b/18/WebRoot/WEB-INF/classes/electric/dbs/news.class new file mode 100644 index 0000000..b606dcd Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/news.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/product.class b/18/WebRoot/WEB-INF/classes/electric/dbs/product.class new file mode 100644 index 0000000..b39076b Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/product.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/sell.class b/18/WebRoot/WEB-INF/classes/electric/dbs/sell.class new file mode 100644 index 0000000..586279e Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/sell.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/sell.jbx b/18/WebRoot/WEB-INF/classes/electric/dbs/sell.jbx new file mode 100644 index 0000000..f048405 --- /dev/null +++ b/18/WebRoot/WEB-INF/classes/electric/dbs/sell.jbx @@ -0,0 +1,26 @@ +[PropertyInfo] +craetedate,String,false,false, , ,true, +Createdate,String,false,false, , ,false, +id,int,false,false, , ,true, +Id,int,false,false, , ,false, +procolor,String,false,false, , ,true, +Procolor,String,false,false, , ,false, +productid,int,false,false, , ,true, +Productid,int,false,false, , ,false, +pronumber,int,false,false, , ,true, +Pronumber,int,false,false, , ,false, +propeople,String,false,false, , ,true, +Propeople,String,false,false, , ,false, +protype,int,false,false, , ,true, +Protype,int,false,false, , ,false, +ptime,String,false,false, , ,true, +Ptime,String,false,false, , ,false, +shopid,int,false,false, , ,true, +Shopid,int,false,false, , ,false, +status,int,false,false, , ,true, +Status,int,false,false, , ,false, +[IconNames] + + + + diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/shop.class b/18/WebRoot/WEB-INF/classes/electric/dbs/shop.class new file mode 100644 index 0000000..1081aa0 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/shop.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/ware.class b/18/WebRoot/WEB-INF/classes/electric/dbs/ware.class new file mode 100644 index 0000000..7aef056 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/ware.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/dbs/waredb.class b/18/WebRoot/WEB-INF/classes/electric/dbs/waredb.class new file mode 100644 index 0000000..a1158df Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/dbs/waredb.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/electricUtils/DbConnectionManager.class b/18/WebRoot/WEB-INF/classes/electric/electricUtils/DbConnectionManager.class new file mode 100644 index 0000000..5d109d7 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/electricUtils/DbConnectionManager.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/electricUtils/DbSequenceManager.class b/18/WebRoot/WEB-INF/classes/electric/electricUtils/DbSequenceManager.class new file mode 100644 index 0000000..6234d8b Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/electricUtils/DbSequenceManager.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/electricUtils/FinalConstants.class b/18/WebRoot/WEB-INF/classes/electric/electricUtils/FinalConstants.class new file mode 100644 index 0000000..8a0a8a2 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/electricUtils/FinalConstants.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/electricUtils/ParamUtils.class b/18/WebRoot/WEB-INF/classes/electric/electricUtils/ParamUtils.class new file mode 100644 index 0000000..5585374 Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/electricUtils/ParamUtils.class differ diff --git a/18/WebRoot/WEB-INF/classes/electric/electricUtils/StringUtils.class b/18/WebRoot/WEB-INF/classes/electric/electricUtils/StringUtils.class new file mode 100644 index 0000000..ec786fc Binary files /dev/null and b/18/WebRoot/WEB-INF/classes/electric/electricUtils/StringUtils.class differ diff --git a/18/WebRoot/WEB-INF/lib/jspSmartUpload.jar b/18/WebRoot/WEB-INF/lib/jspSmartUpload.jar new file mode 100644 index 0000000..e297164 Binary files /dev/null and b/18/WebRoot/WEB-INF/lib/jspSmartUpload.jar differ diff --git a/18/WebRoot/WEB-INF/lib/sqljdbc.jar b/18/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/18/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/18/WebRoot/WEB-INF/lib/tools.jar b/18/WebRoot/WEB-INF/lib/tools.jar new file mode 100644 index 0000000..3ba5f4a Binary files /dev/null and b/18/WebRoot/WEB-INF/lib/tools.jar differ diff --git a/18/WebRoot/WEB-INF/web.xml b/18/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..64819a4 --- /dev/null +++ b/18/WebRoot/WEB-INF/web.xml @@ -0,0 +1,3 @@ + + + diff --git a/18/WebRoot/banner.htm b/18/WebRoot/banner.htm new file mode 100644 index 0000000..fffafee --- /dev/null +++ b/18/WebRoot/banner.htm @@ -0,0 +1,5 @@ + + + + +
     
    diff --git a/18/WebRoot/chain.jsp b/18/WebRoot/chain.jsp new file mode 100644 index 0000000..abc6a23 --- /dev/null +++ b/18/WebRoot/chain.jsp @@ -0,0 +1,117 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbshop"%> +<%@ page import="electric.dbs.shop"%> +<%@ page import="electric.dbs.Shopdb"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + Shopdb shopdb=new Shopdb(); + int countpage=shopdb.selectsql(5); + int a=0; + int i=0; +%> + + +°¼ҵģ + + + + + + + + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + +
    ǰλã >>>
    + + + + +
    + + + + +
    + + + + + + + <% + int pa=ParamUtils.getIntParameter(request,"pa",1); + int spa=pa-1; + if(spa<1) + { + spa=1; + } + int xpa=pa+1; + if(xpa>countpage) + { + xpa=countpage; + } + Shopdb shopdb2=new Shopdb(); + Collection coll=shopdb2.select_chain(5,pa); + if (coll == null || coll.isEmpty()) { + System.out.println("coll is null"); + } else { + Iterator it = coll.iterator(); + while (it.hasNext()) { + shop b2 = (shop) it.next(); + %> + + + + + + + + + <%}}%> +
    ˵绰
    <%=b2.getShopname()%><%=b2.getArea()%><%=b2.getPeopleman()%><%=b2.getMantel()%><%=b2.getShoptel()%>
    + + + + + +
     
    + <%if(pa>1){%> + һҳ + һҳ + <%} + if(pa + һҳ + һҳ + <%}%>
    +
    + + + diff --git a/18/WebRoot/checkmess.jsp b/18/WebRoot/checkmess.jsp new file mode 100644 index 0000000..70d1366 --- /dev/null +++ b/18/WebRoot/checkmess.jsp @@ -0,0 +1,119 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbmess"%> +<%@ page import="electric.dbs.Messdb"%> +<%@ page import="electric.dbs.mess"%> +<%@ page import="electric.dbs.Dbshop"%> +<%@ page import="electric.dbs.Shopdb"%> +<%@ page import="electric.dbs.shop"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + Messdb mess=new Messdb(); + int countpage=mess.selectsql(5); + shop pt=(shop)session.getAttribute("USERPO"); + if(pt==null) + { + response.sendRedirect("login.jsp"); + } +%> + + +Թ + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      + + + + + + + + <% + int pa=ParamUtils.getIntParameter(request,"pa",1); + int spa=pa-1; + if(spa<1) + { + spa=1; + } + int xpa=pa+1; + if(xpa>countpage) + { + xpa=countpage; + } + Messdb messdb=new Messdb(); + Collection coll=messdb.select(5,pa); + if (coll == null || coll.isEmpty()) { + System.out.println("coll is null"); + }else { + Iterator it = coll.iterator(); + while (it.hasNext()) { + mess b2 = (mess) it.next(); + %> + + + + + + + <% + } + } + %> +
    ʱɾ
    <%=b2.getCreateDate().substring(0,4)%><%=b2.getCreateDate().substring(4,6)%><%=b2.getCreateDate().substring(6,8)%><%=b2.getMname()%><%=b2.getMtext()%> + +
    + + + + + +
     
    + <%if(pa>1){%> + һҳ + һҳ + <%} + if(pa + һҳ + һҳ + <%}%> +
    + +
    + + + diff --git a/18/WebRoot/checksell.jsp b/18/WebRoot/checksell.jsp new file mode 100644 index 0000000..6836ba9 --- /dev/null +++ b/18/WebRoot/checksell.jsp @@ -0,0 +1,299 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.*"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.*"%> +<%@ page import="java.sql.ResultSet"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + String Ayear = ParamUtils.getEscapeHTMLParameter(request, "Ayear","2000"); + String Amonth = ParamUtils.getEscapeHTMLParameter(request, "Amonth","01"); + String Aday = ParamUtils.getEscapeHTMLParameter(request, "Aday","01"); + String Byear = ParamUtils.getEscapeHTMLParameter(request, "Byear","2000"); + String Bmonth = ParamUtils.getEscapeHTMLParameter(request, "Bmonth","01"); + String Bday = ParamUtils.getEscapeHTMLParameter(request, "Bday","01"); + int Dqid=0; + Dqid = ParamUtils.getIntParameter(request, "Dqid",0); + int Proid = ParamUtils.getIntParameter(request, "Proid",0); + String Atime=Ayear+Amonth+Aday; + String Btime=Byear+Bmonth+Bday; + String sql=""; + if((Dqid==0) && (Proid==0)){ + sql="SELECT * FROM SELL WHERE STATUS<>"+new Integer(1).toString()+" AND PTIME BETWEEN '"+Atime+"'AND'"+Btime+"' order by Ptime"; + } + if((Dqid==0) && (Proid!=0)){ + sql="SELECT * FROM SELL WHERE STATUS<>"+new Integer(1).toString()+" AND PTIME BETWEEN '"+Atime+"'AND'"+Btime+"' AND PRODUCTID="+Proid+" order by Ptime"; + } + if((Dqid!=0) && (Proid==0)){ + sql="SELECT * FROM SELL WHERE STATUS<>"+new Integer(1).toString()+" AND PTIME BETWEEN '"+Atime+"'AND'"+Btime+"' AND SHOPID="+Dqid+" order by Ptime"; + } + if((Dqid!=0) && (Proid!=0)){ + sql="SELECT * FROM SELL WHERE STATUS<>"+new Integer(1).toString()+" AND PTIME BETWEEN '"+Atime+"'AND'"+Btime+"' AND SHOPID="+Dqid+" AND PRODUCTID="+Proid+" order by Ptime"; + } + shop pt=(shop)session.getAttribute("USERPO"); + if(pt==null){ + response.sendRedirect("login.jsp"); + } +%> + + +۲ѯ + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      + + + + + +
    +
    + + + + + + +
    ۻ:
    ѡ꣺ ѡƷ: + +
    +
    +
    +
    <%=Atime.substring(0,4)%>.<%=Atime.substring(4,6)%>.<%=Atime.substring(6,8)%>--<%=Btime.substring(0,4)%>.<%=Btime.substring(4,6)%>.<%=Btime.substring(6,8)%> + <% + Dbshop dbs=new Dbshop(Dqid); + if(Dqid==0){ + out.print(" "); + }else{ + out.print(dbs.getShopname()); + }if(Proid==0){ + out.print("Ʒ"); + }else{ + Dbware dbware=new Dbware(Proid); + out.print(dbware.getPname()); + } + %>£ + + + + + + <% + Connection con = null; + PreparedStatement pstmt = null; + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + %> + + + + + + + <% + } + %> +
    ۻʱۻ
    <%=rs.getString(8).substring(0,4)%><%=rs.getString(8).substring(4,6)%><%=rs.getString(8).substring(6,8)%><%=rs.getString(6)%> + <% + String gmz=""; + if(rs.getInt(5)==1){ + gmz=""; + }else if(rs.getInt(5)==2){ + gmz="˽Ӫҵ"; + }else if(rs.getInt(5)==3){ + gmz="ҵ"; + }else if(rs.getInt(5)==4){ + gmz="ҵ"; + }else{ + gmz="ҵ"; + } + %><%=gmz%> + <%int userid=rs.getInt(2); + Dbshop dbshop=new Dbshop(userid); + out.print(dbshop.getShopname());%> +
    + + + + +
     
    +
    + + + \ No newline at end of file diff --git a/18/WebRoot/chklogin.jsp b/18/WebRoot/chklogin.jsp new file mode 100644 index 0000000..e829162 --- /dev/null +++ b/18/WebRoot/chklogin.jsp @@ -0,0 +1,62 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbshop"%> +<%@ page import="electric.dbs.Shopdb"%> +<%@ page import="electric.dbs.shop"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.StringUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<%@ page import="java.sql.SQLException"%> +<%@ page import="java.sql.ResultSet"%> + + + + +cklogin + + + + +<% +shop shop=null; +int userid=0; +String Username = StringUtils.toChinese(ParamUtils.getEscapeHTMLParameter(request, "username")); +String Password = ParamUtils.getEscapeHTMLParameter(request, "password"); +Connection con=null; +ResultSet rs=null; +PreparedStatement pstmt=null; +String sql="SELECT * FROM [USER] WHERE [STATUS]=0"+" AND [USERNAME]='" + Username + "' AND [PASSWORD]='" + Password + "'" ; + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = pstmt.executeQuery(); +if(rs.next()==true) +{ + shop=new shop(); + shop.setId(rs.getInt(1)); + shop.setUsername(rs.getString(2)); + shop.setShopname(rs.getString(4)); + shop.setUsertypee(rs.getInt(9)); + session.setAttribute("USERPO",shop); + response.sendRedirect("checkmess.jsp"); +} + + + + //response.sendRedirect("work.jsp"); + // out.print(Username); + // out.print(Password); + //out.print(1); + +else +{ + response.sendRedirect("index.jsp"); + out.print(Username); + out.print(Password); + out.print(2); +} +%> + + diff --git a/18/WebRoot/contact.jsp b/18/WebRoot/contact.jsp new file mode 100644 index 0000000..0c2850b --- /dev/null +++ b/18/WebRoot/contact.jsp @@ -0,0 +1,102 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbnews"%> +<%@ page import="electric.dbs.news"%> +<%@ page import="electric.dbs.Newsdb"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + Newsdb newse=new Newsdb(); + int countpage=newse.selectsql(5); + int a=0; + int i=0; +%> + + +°¼ҵģ + + + + + + + + + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + +
    ǰλãϵ >>>
    + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ˾ƣʡտƼ޹˾
        ַжʢ89
    绰룺0431-4978981
    + 0431-4978982
        棺0431-4972266
    mingrisoft@mingrisoft.com
    + mingrisoft@vip.sina.com
        ַhttp://www.mingrisoft.com
    + http://www.cccxy.com
    QQ  룺3642159
    130031
    +
    + + + diff --git a/18/WebRoot/copyright.htm b/18/WebRoot/copyright.htm new file mode 100644 index 0000000..f60fc19 --- /dev/null +++ b/18/WebRoot/copyright.htm @@ -0,0 +1,16 @@ + + + + + + + + +
    + + + + + + +
    վʹIE5.0ϰ汾 1024*768ΪʾЧ
    CopyRight © 2005 ʡտƼ޹˾
    \ No newline at end of file diff --git a/18/WebRoot/database/YWW_Data.MDF b/18/WebRoot/database/YWW_Data.MDF new file mode 100644 index 0000000..c6eb9b9 Binary files /dev/null and b/18/WebRoot/database/YWW_Data.MDF differ diff --git a/18/WebRoot/database/YWW_Log.LDF b/18/WebRoot/database/YWW_Log.LDF new file mode 100644 index 0000000..bcffc47 Binary files /dev/null and b/18/WebRoot/database/YWW_Log.LDF differ diff --git a/18/WebRoot/emiction.jsp b/18/WebRoot/emiction.jsp new file mode 100644 index 0000000..ec61c6c --- /dev/null +++ b/18/WebRoot/emiction.jsp @@ -0,0 +1,188 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.*"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.*"%> +<%@ page import="java.sql.ResultSet"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + String Ayear = ParamUtils.getEscapeHTMLParameter(request, "Ayear","2000"); + String Amonth = ParamUtils.getEscapeHTMLParameter(request, "Amonth","01"); + String Aday = ParamUtils.getEscapeHTMLParameter(request, "Aday","01"); + String Byear = ParamUtils.getEscapeHTMLParameter(request, "Byear","2000"); + String Bmonth = ParamUtils.getEscapeHTMLParameter(request, "Bmonth","01"); + String Bday = ParamUtils.getEscapeHTMLParameter(request, "Bday","01"); + String Atime=Ayear+Amonth+Aday; + String Btime=Byear+Bmonth+Bday; + int Proid = ParamUtils.getIntParameter(request, "Proid",-1); + String sql=""; + if(Proid==-1){ + sql=" SELECT SUM(PRONUMBER)AS PRONUMBER,SHOPID FROM SELL WHERE PTIME BETWEEN '"+Atime+"' AND '" +Btime+"' GROUP BY SHOPID ORDER BY PRONUMBER DESC"; + }else{ + sql=" SELECT SUM(PRONUMBER)AS PRONUMBER,SHOPID FROM SELL WHERE PTIME BETWEEN '"+Atime+"' AND '" +Btime+"' AND PRODUCTID=" + Proid + " GROUP BY SHOPID ORDER BY PRONUMBER DESC"; + } + int i=0; + shop pt=(shop)session.getAttribute("USERPO"); + if(pt==null){ + response.sendRedirect("login.jsp"); + } +%> + + + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      + + + + + +
    +
    + + + + + + + + + +
    ۻ + + + + + + + + + + +
    ѡƷ + +
    +
    +
      <%=Atime.substring(0,4)%>.<%=Atime.substring(4,6)%>.<%=Atime.substring(6,8)%>--<%=Btime.substring(0,4)%>.<%=Btime.substring(4,6)%>.<%=Btime.substring(6,8)%> + <% + if(Proid==-1) + { + out.print("Ʒ"); + } + else + { + Dbware dbware=new Dbware(Proid); + out.print(dbware.getPname()); + + } + %> +
    + + + + + <% + ResultSet rs=null; + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql); + rs = pstmt.executeQuery(); + } + catch (SQLException sqle) { + System.err.println("λ: Dbchfph-" + sqle); + sqle.printStackTrace(); + } + int j=0; + while(rs.next()) + { + j=j+1; + + %> + + + + + + <%}%> +
    <%=j%><%=rs.getInt(1)%> + <%int userid=rs.getInt(2); + Dbshop dbshop=new Dbshop(userid); + out.print(dbshop.getShopname());%>
    +
    + + + diff --git a/18/WebRoot/image/del.gif b/18/WebRoot/image/del.gif new file mode 100644 index 0000000..24343e3 Binary files /dev/null and b/18/WebRoot/image/del.gif differ diff --git a/18/WebRoot/image/modify.gif b/18/WebRoot/image/modify.gif new file mode 100644 index 0000000..ba15f87 Binary files /dev/null and b/18/WebRoot/image/modify.gif differ diff --git a/18/WebRoot/index.jsp b/18/WebRoot/index.jsp new file mode 100644 index 0000000..c946234 --- /dev/null +++ b/18/WebRoot/index.jsp @@ -0,0 +1,122 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbnews"%> +<%@ page import="electric.dbs.news"%> +<%@ page import="electric.dbs.Newsdb"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + Newsdb newse=new Newsdb(); + int countpage=newse.selectsql(10); + int a=0; + int i=0; +%> + + +°¼ҵģ + + + + + + + + + + + + +
    + + + + +
    +
    + + + + +
    + + + + +
    + + + +
    ǰλãҳ >>>
    + + + + +
    + + <% + int pa=ParamUtils.getIntParameter(request,"pa",1); + int spa=pa-1; + if(spa<1) + { + spa=1; + } + int xpa=pa+1; + if(xpa>countpage) + { + xpa=countpage; + } + Newsdb newsdb=new Newsdb(); + Collection coll=newsdb.select(10,pa); + if (coll == null || coll.isEmpty()) { + System.out.println("coll is null"); + } else { + Iterator it = coll.iterator(); + while (it.hasNext()) { + i=i+1; + news b2 = (news) it.next(); + if((a==0)&&(i==1)) + { + a=b2.getId(); + } + %> + + + + <%}}%> +
     <%=b2.getMotif()%>  [ ʱ䣺<%=b2.getCreateDate().substring(0,4)%>-<%=b2.getCreateDate().substring(4,6)%>-<%=b2.getCreateDate().substring(6,8)%> ]
    + + + + +
    + <%if(pa>1){%> + һҳ + һҳ + <%} + if(pa + һҳ + һҳ + <%}%> +
    + + + diff --git a/18/WebRoot/introduce.jsp b/18/WebRoot/introduce.jsp new file mode 100644 index 0000000..b5cd40c --- /dev/null +++ b/18/WebRoot/introduce.jsp @@ -0,0 +1,68 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbnews"%> +<%@ page import="electric.dbs.news"%> +<%@ page import="electric.dbs.Newsdb"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + Newsdb newse=new Newsdb(); + int countpage=newse.selectsql(5); + int a=0; + int i=0; +%> + + +°¼ҵģ + + + + + + + + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + +
    ǰλã˾ >>>
    + + + + +
    + + + + +
        ʡտƼ޹˾һԼΪĵĸ߿Ƽҵ˾200012£רҵӦ̺ͷṩ̡ʼҵֻ↑ϵͳۺӦáҵվȣȺɹ漰ơӪĶҵӦӦƽ̨˾ӵĿʵʩרҺѧϰͼŶӣΪָ˼뽨з۷ϵ˾ڳзͶͷḻҵ飬šÿͻɹͬͻͬɹķܶĿ꣬Ŭ רҵáЧIJƷƣ߳ΪûṩʵIJƷͷ
    +
    +     ҵּΪҵ񣬴ҵܹƽ̨ҵḶ́ҵЧʣ͹ɱǿҵľΪҵٷչṩԴ

    +     ҵĻ ͡¡ѧ
    +
    + + + diff --git a/18/WebRoot/left.htm b/18/WebRoot/left.htm new file mode 100644 index 0000000..e0c0fa8 --- /dev/null +++ b/18/WebRoot/left.htm @@ -0,0 +1,104 @@ + + + + + + + + + + + + +
     
    + + + + +
     վ̨
    + + + + + + + + + + + + + + +
    + û +
    +  룺 + +
    + +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     ۵Ǽ
     ۲ѯ
     
     û
     
     Ʒչʾ
     Բ
     Ʒ
    \ No newline at end of file diff --git a/18/WebRoot/mdifyshop.jsp b/18/WebRoot/mdifyshop.jsp new file mode 100644 index 0000000..d96dd59 --- /dev/null +++ b/18/WebRoot/mdifyshop.jsp @@ -0,0 +1,47 @@ +<%@ page contentType="text/html; charset=GBK" %> + + +

    û

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       û
               + 룺
         ƣ
          
       긺:
         ˵绰:
         绰
               
    +

    + +
    +

    + diff --git a/18/WebRoot/mess.jsp b/18/WebRoot/mess.jsp new file mode 100644 index 0000000..3b964e6 --- /dev/null +++ b/18/WebRoot/mess.jsp @@ -0,0 +1,68 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + +Ʒչʾ + + + + + + + + + + + +
    + + + + + +
    +
    + + + + +
    + + + + +
    + + + +
    ǰλãԲ >>>
    + + + + +
    + + + + + + + + + + + + + + + + + +
         + +
        ⣺
    ݣ
      +
    +
    +
    + + + diff --git a/18/WebRoot/mess_add.jsp b/18/WebRoot/mess_add.jsp new file mode 100644 index 0000000..4a5ae57 --- /dev/null +++ b/18/WebRoot/mess_add.jsp @@ -0,0 +1,40 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="electric.electricUtils.*"%> +<%@ page import="electric.dbs.Dbmess"%> + +<% + String pageAction=ParamUtils.getEscapeHTMLParameter(request,"pageaction","goback"); + String responsePage=ParamUtils.getEscapeHTMLParameter(request,"responsepage",""); + pageAction=pageAction.trim().toUpperCase(); + if(pageAction.equals("CREATE")) + { + Dbmess mess=new Dbmess(request); + } + else if(pageAction.equals("MODIFY")) + { + int id=ParamUtils.getIntParameter(request,"Id",0); + } + else if(pageAction.equals("DELETE")) + { + int id2=ParamUtils.getIntParameter(request,"id",0); + if(id2>0) + { + Dbmess messb=new Dbmess(id2); + messb.setStatus(1); + } + } + if(!responsePage.trim().equals("")) + { + response.sendRedirect(responsePage); + } + else + { + %> + + <% + } +%> \ No newline at end of file diff --git a/18/WebRoot/messs.jsp b/18/WebRoot/messs.jsp new file mode 100644 index 0000000..70c7513 --- /dev/null +++ b/18/WebRoot/messs.jsp @@ -0,0 +1,83 @@ +<%@ page contentType="text/html; charset=GBK" %> + + +԰ + + + + + + + + "; + } + } + catch(SQLException ex){ + ex.printStackTrace(); + } + show="
    + + "; + table=table+""; + table=table+"
    + + + + + +
    + + + + + + + + + + + + + + + + +
      
    +
    + + + +
    + + + + +
      + + + + +
    + + + + +
    + + + + + +
     
    + + + + + + +
      +
    +

    ԰棺

    +

        

    + + +

             ⣺

    +

         ݣ

    +

                   +

    +
    + +
     
    + diff --git a/18/WebRoot/messshow.jsp b/18/WebRoot/messshow.jsp new file mode 100644 index 0000000..b0256a8 --- /dev/null +++ b/18/WebRoot/messshow.jsp @@ -0,0 +1,78 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="electric.dbs.Messdb"%> +<%@ page import="electric.dbs.mess"%> +<%@ page import="electric.electricUtils.ParamUtils"%> + + + + + + + + + + +<% + int id=ParamUtils.getIntParameter(request,"id",0); + Messdb me=new Messdb(); + mess mes=null; + if(id>0){ + mes=me.show(id); + } +%> + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      + + + + + + + + + + + + + + + + + + + + +
     <%=mes.getMname()%>
        ⣺ <%=mes.getMtext()%>
    ʱ    䣺 <%=mes.getCreateDate().substring(0,4)%><%=mes.getCreateDate().substring(4,6)%><%=mes.getCreateDate().substring(6,8)%>
    ݣ <%=mes.getMnote()%>
      +
    +
    + + + diff --git a/18/WebRoot/modifyadmin.jsp b/18/WebRoot/modifyadmin.jsp new file mode 100644 index 0000000..0897cbd --- /dev/null +++ b/18/WebRoot/modifyadmin.jsp @@ -0,0 +1,77 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.dbs.Dbshop"%> +<% + int id=ParamUtils.getIntParameter(request,"id",0); + Dbshop shop=new Dbshop(id); +%> + + + + + + +޸ĹԱϢ + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      +
    + + + + + + + + + + + + + + + + + + + + + +
    û
    +     +
    +
    +
    + + + + diff --git a/18/WebRoot/modifynews.jsp b/18/WebRoot/modifynews.jsp new file mode 100644 index 0000000..c29e6e7 --- /dev/null +++ b/18/WebRoot/modifynews.jsp @@ -0,0 +1,83 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.dbs.Dbnews"%> +<% + int id=ParamUtils.getIntParameter(request,"id",0); + Dbnews news=new Dbnews(id); +%> + + +޸Ĺ + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      +
    + + + + + + + + + + + + + + + + + + + + + +
      ⣺
    +
    ˣ
     ݣ
    +
    + +
    +
    +
    + + + diff --git a/18/WebRoot/modifyproduct.jsp b/18/WebRoot/modifyproduct.jsp new file mode 100644 index 0000000..afb91a1 --- /dev/null +++ b/18/WebRoot/modifyproduct.jsp @@ -0,0 +1,94 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.dbs.Dbproduct"%> +<% + int id=ParamUtils.getIntParameter(request,"id",0); + Dbproduct product=new Dbproduct(id); +%> + + +޸IJƷϢ + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ʒƣ
    Ʒۣ >
    ң >
    Ʒܣ + + +
    +   + +   +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/18/WebRoot/modifyshop.jsp b/18/WebRoot/modifyshop.jsp new file mode 100644 index 0000000..74cdcaa --- /dev/null +++ b/18/WebRoot/modifyshop.jsp @@ -0,0 +1,121 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.dbs.Dbshop"%> +<% + int id=ParamUtils.getIntParameter(request,"id",0); + Dbshop shop=new Dbshop(id); +%> + + +޸ + + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
             û>
               룺>
         ƣ>
           >
       긺: + >
         ˵绰: + >
         绰>
    +
    +
    + + + \ No newline at end of file diff --git a/18/WebRoot/modifyware.jsp b/18/WebRoot/modifyware.jsp new file mode 100644 index 0000000..97702c1 --- /dev/null +++ b/18/WebRoot/modifyware.jsp @@ -0,0 +1,127 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.dbs.Dbware"%> +<% + int id=ParamUtils.getIntParameter(request,"id",0); + Dbware ware=new Dbware(id); +%> + + + + + + + +޸ƷϢ + + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ʒƣ
    Ʒͺţ
    Ʒۣ
    Ʒ +
    Ʒң
    Ʒ˵
    +   + +    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/18/WebRoot/motif.jsp b/18/WebRoot/motif.jsp new file mode 100644 index 0000000..ce38b26 --- /dev/null +++ b/18/WebRoot/motif.jsp @@ -0,0 +1,23 @@ +<%@ page contentType="text/html; charset=GBK" %> + + + +motif + + + + + +

    +JBuilder Generated JSP +

    +
    +
    Enter new value :
    +

    + + +
    +Value of Bean property is : + + + diff --git a/18/WebRoot/navigation.htm b/18/WebRoot/navigation.htm new file mode 100644 index 0000000..4c10546 --- /dev/null +++ b/18/WebRoot/navigation.htm @@ -0,0 +1,6 @@ + + + + + +
    ҳ | Ʒչʾ | ˾ | | ϵ | Բ
    diff --git a/18/WebRoot/news.jsp b/18/WebRoot/news.jsp new file mode 100644 index 0000000..b5c3585 --- /dev/null +++ b/18/WebRoot/news.jsp @@ -0,0 +1,161 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbnews"%> +<%@ page import="electric.dbs.news"%> +<%@ page import="electric.dbs.Newsdb"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + Newsdb newse=new Newsdb(); + int countpage=newse.selectsql(5); + int a=0; + int i=0; + a=ParamUtils.getIntParameter(request,"a",0); +%> + + + + + + + + + + + + +
    + + + +
    + + + + +
    + + + + + + + + + + + + +
     
     
    +
    + + + + +
    + + + + + + +
    +
    + + + + + + +
    + + + + + + + +
      
    + + <% + int pa=ParamUtils.getIntParameter(request,"pa",1); + int spa=pa-1; + if(spa<1) + { + spa=1; + } + int xpa=pa+1; + if(xpa>countpage) + { + xpa=countpage; + } + Newsdb newsdb=new Newsdb(); + Collection coll=newsdb.select(5,pa); + if (coll == null || coll.isEmpty()) { + System.out.println("coll is null"); + } else { + Iterator it = coll.iterator(); + while (it.hasNext()) { + i=i+1; + news b2 = (news) it.next(); + if((a==0)&&(i==1)) + { + a=b2.getId(); + } + %> + + + + <%}}%> + +
    + + <%=b2.getMotif()%>
    +
    + + + + +
    + һҳ + һҳ + һҳ + һҳ +  
    +
    + + + + +
    +
    + + + + <%Dbnews news_2=new Dbnews(a);%> + + + + + + + +
     <%=news_2.getContent()%> 
    <%=news_2.getKithepeople()%>
    ڣ<%=news_2.getCreateDate().substring(0,4)%><%=news_2.getCreateDate().substring(4,6)%><%=news_2.getCreateDate().substring(6,8)%>
    +
     
    + + + + +
     
    + + + + +
    +
    Copyright?ʡտƼ޹˾ Emailmingrisoft@mingrisoft.com ַжʢ89̩㳡C
    +
    + + \ No newline at end of file diff --git a/18/WebRoot/news_add.jsp b/18/WebRoot/news_add.jsp new file mode 100644 index 0000000..cc64928 --- /dev/null +++ b/18/WebRoot/news_add.jsp @@ -0,0 +1,76 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + +ӹ + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      +
    + + + + + + + + + + + + + + + + + + + + +
      ⣺
    +
    ˣ
     ݣ
    +
    + +
    +
    +
    + + + \ No newline at end of file diff --git a/18/WebRoot/news_add2.jsp b/18/WebRoot/news_add2.jsp new file mode 100644 index 0000000..6689704 --- /dev/null +++ b/18/WebRoot/news_add2.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="electric.electricUtils.*"%> +<%@ page import="electric.dbs.*"%> + +<% + String pageAction=ParamUtils.getEscapeHTMLParameter(request,"pageaction","goback"); + String responsePage=ParamUtils.getEscapeHTMLParameter(request,"responsepage",""); + pageAction=pageAction.trim().toUpperCase(); + if(pageAction.equals("CREATE")) + { + Dbnews news=new Dbnews(request); + } + else if(pageAction.equals("MODIFY")) + { + int id=ParamUtils.getIntParameter(request,"Id",0); + if(id>0) + { + Dbnews news1=new Dbnews(id); + news1.modify(request); + } + + } + else if(pageAction.equals("DELETE")) + { + int id2=ParamUtils.getIntParameter(request,"id",0); + if(id2>0) + { + Dbnews news2=new Dbnews(id2); + + news2.setStatus(1); + } + } + if(!responsePage.trim().equals("")) + { + response.sendRedirect(responsePage); + } + else + { + %> + + <% + } + + +%> + diff --git a/18/WebRoot/news_detail.jsp b/18/WebRoot/news_detail.jsp new file mode 100644 index 0000000..80d98f6 --- /dev/null +++ b/18/WebRoot/news_detail.jsp @@ -0,0 +1,59 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbnews"%> +<%@ page import="electric.dbs.news"%> +<%@ page import="electric.dbs.Newsdb"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + Newsdb newse=new Newsdb(); + int countpage=newse.selectsql(5); + int a=0; + //int i=0; + a=ParamUtils.getIntParameter(request,"a",0); +%> + + +ϸ + + + +<%Dbnews news_2=new Dbnews(a);%> + + + + + + + + + + +
     <%=news_2.getMotif()%>
    + + + + + + + + +
    + + + + + + + + + + + + +
    <%=news_2.getContent()%> 
    <%=news_2.getKithepeople()%>
    ڣ<%=news_2.getCreateDate().substring(0,4)%><%=news_2.getCreateDate().substring(4,6)%><%=news_2.getCreateDate().substring(6,8)%>
     
     
    + + diff --git a/18/WebRoot/newsman.jsp b/18/WebRoot/newsman.jsp new file mode 100644 index 0000000..e666d3e --- /dev/null +++ b/18/WebRoot/newsman.jsp @@ -0,0 +1,135 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbnews"%> +<%@ page import="electric.dbs.news"%> +<%@ page import="electric.dbs.Newsdb"%> +<%@ page import="electric.dbs.Dbshop"%> +<%@ page import="electric.dbs.Shopdb"%> +<%@ page import="electric.dbs.shop"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + + Newsdb newse=new Newsdb(); + int countpage=newse.selectsql(5); + shop pt=(shop)session.getAttribute("USERPO"); + if(pt==null) + { + response.sendRedirect("login.jsp"); + } + int type=pt.getUsertype(); + if(type==1) + { + out.print("ԲûȨޣ"); + } + else + { + + +%> + + + + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      + + + + + + +
    + +
    ӹ 
    + + + + + + + <% + int pa=ParamUtils.getIntParameter(request,"pa",1); + int spa=pa-1; + if(spa<1) + { + spa=1; + } + int xpa=pa+1; + if(xpa>countpage) + { + xpa=countpage; + } + Newsdb newsdb=new Newsdb(); + Collection coll=newsdb.select(5,pa); + if (coll == null || coll.isEmpty()) { + System.out.println("coll is null"); + } else { + Iterator it = coll.iterator(); + while (it.hasNext()) { + news b2 = (news) it.next(); + %> + + + + + + + + + + <%}}%> +
    ʱ޸/ɾ
    <%=b2.getId()%><%=b2.getMotif()%><%=b2.getKithepeople()%><%=b2.getCreateDate().substring(0,4)%><%=b2.getCreateDate().substring(4,6)%><%=b2.getCreateDate().substring(6,8)%> +     + +
    + + + + + +
     
    + һҳ + һҳ + һҳ + һҳ
    +
    + +<%}%> + + diff --git a/18/WebRoot/pro.jsp b/18/WebRoot/pro.jsp new file mode 100644 index 0000000..aa5d063 --- /dev/null +++ b/18/WebRoot/pro.jsp @@ -0,0 +1,78 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbproduct"%> +<%@ page import="electric.dbs.Productdb"%> +<%@ page import="electric.dbs.product"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + int id=ParamUtils.getIntParameter(request,"id",0); + Dbproduct pro=null; + if(id>0) + { + pro=new Dbproduct(id); + } +%> + + +Ʒչʾϸҳ + + + + + + + + + + + + + + +
      Ʒչʾϸҳ
    + + + + + + + + + + +
    + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + +
    Ʒƣ<%=pro.getProductname()%>
    Ʒۣ<%=pro.getProductprice()%>
    ̣<%=pro.getProductform()%>
    Ʒܣ<%=pro.getProductnote()%>
    +
     
    + + \ No newline at end of file diff --git a/18/WebRoot/product.jsp b/18/WebRoot/product.jsp new file mode 100644 index 0000000..e4741c0 --- /dev/null +++ b/18/WebRoot/product.jsp @@ -0,0 +1,112 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + + +²Ʒ + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ʒƣ + *
    Ʒۣ + *
    ̣ + *
    Ʒܣ + + + *
    ƷͼƬ + +* + +(뵥ϴťϴͼƬ) +
    + +   +  
    +
    +
    + + + \ No newline at end of file diff --git a/18/WebRoot/product_add.jsp b/18/WebRoot/product_add.jsp new file mode 100644 index 0000000..d2630d8 --- /dev/null +++ b/18/WebRoot/product_add.jsp @@ -0,0 +1,49 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="electric.electricUtils.*"%> +<%@ page import="electric.dbs.*"%> + +<% + String pageAction=ParamUtils.getEscapeHTMLParameter(request,"pageaction","goback"); + String responsePage=ParamUtils.getEscapeHTMLParameter(request,"responsepage",""); + pageAction=pageAction.trim().toUpperCase(); + if(pageAction.equals("CREATE")) + { + Dbproduct product=new Dbproduct(request); + } + else if(pageAction.equals("MODIFY")) + { + int id=ParamUtils.getIntParameter(request,"Id",0); + if(id>0) + { + Dbproduct product1=new Dbproduct(id); + product1.modify(request); + } + + } + else if(pageAction.equals("DELETE")) + { + int id2=ParamUtils.getIntParameter(request,"id",0); + if(id2>0) + { + Dbproduct product2=new Dbproduct(id2); + product2.setStatus(1); + } + } + if(!responsePage.trim().equals("")) + { + response.sendRedirect(responsePage); + } + else + { + %> + + <% + } + + +%> + diff --git a/18/WebRoot/productman.jsp b/18/WebRoot/productman.jsp new file mode 100644 index 0000000..2180562 --- /dev/null +++ b/18/WebRoot/productman.jsp @@ -0,0 +1,141 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbproduct"%> +<%@ page import="electric.dbs.Productdb"%> +<%@ page import="electric.dbs.product"%> +<%@ page import="electric.dbs.Dbshop"%> +<%@ page import="electric.dbs.Shopdb"%> +<%@ page import="electric.dbs.shop"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + Productdb product=new Productdb(); + int countpage=product.selectsql(5); + shop pt=(shop)session.getAttribute("USERPO"); + if(pt==null) + { + response.sendRedirect("login.jsp"); + } + int type=pt.getUsertype(); + if(type==1) + { + out.print("ԲûȨޣ"); + } +else +{ +%> + + +ƷϢ + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      + + + + + + +
    + +
    + + + + + + + + + <% + int pa=ParamUtils.getIntParameter(request,"pa",1); + int spa=pa-1; + if(spa<1) + { + spa=1; + } + int xpa=pa+1; + if(xpa>countpage) + { + xpa=countpage; + } + Productdb productdb=new Productdb(); + Collection coll=productdb.select(5,pa); + if (coll == null || coll.isEmpty()) { + System.out.println("coll is null"); + } else { + Iterator it = coll.iterator(); + while (it.hasNext()) { + product b2 = (product) it.next(); + %> + + + + + + + + + <%}}%> +
    Ʒ
    Ʒ
    Ʒ
    ޸/ɾ
    <%=b2.getProductname()%>
    <%=b2.getProductprice()%><%=b2.getProductform()%><%=b2.getProductnote()%> + +
    + + + + + +
     
    + <%if(pa>1){%> + һҳ + һҳ + <%} + if(pa + һҳ + һҳ + <%}%>
    +
    + +<%}%> + + \ No newline at end of file diff --git a/18/WebRoot/productusher.jsp b/18/WebRoot/productusher.jsp new file mode 100644 index 0000000..e99aeb3 --- /dev/null +++ b/18/WebRoot/productusher.jsp @@ -0,0 +1,118 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbproduct"%> +<%@ page import="electric.dbs.Productdb"%> +<%@ page import="electric.dbs.product"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + Productdb product=new Productdb(); + int countpage=product.selectsql(6); +%> + + +Ʒչʾ + + + + + + + + + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + +
    ǰλãƷչʾ >>>
    + + + + +
    + + + + <% + int i=0; + int pa=ParamUtils.getIntParameter(request,"pa",1); + int spa=pa-1; + if(spa<1) + { + spa=1; + } + int xpa=pa+1; + if(xpa>countpage) + { + xpa=countpage; + } + Productdb productdb=new Productdb(); + Collection coll=productdb.select(6,pa); + if (coll == null || coll.isEmpty()) { + System.out.println("coll is null"); + } else { + Iterator it = coll.iterator(); + while (it.hasNext()) { + i=i+1; + product b2 = (product) it.next(); + if(i==4) + { + out.print(""); + out.print("");} + %> + + <%}}%> + +
    + + + + +
    +
    + + + + +
    + <%if(pa>1){%> + һҳ һҳ + <%} + if(pa +  һҳ һҳ  + <%}%> +
    + +
    + diff --git a/18/WebRoot/sell.jsp b/18/WebRoot/sell.jsp new file mode 100644 index 0000000..af38999 --- /dev/null +++ b/18/WebRoot/sell.jsp @@ -0,0 +1,156 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbware"%> +<%@ page import="electric.dbs.waredb"%> +<%@ page import="electric.dbs.ware"%> +<%@ page import="electric.dbs.Dbshop"%> +<%@ page import="electric.dbs.shop"%> +<%@ page import="electric.dbs.Shopdb"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<%@ page import="java.util.Date"%> +<% + waredb ware=new waredb(); + int countpage=ware.selectsql(5); + shop pt=(shop)session.getAttribute("USERPO"); + if(pt==null) + { + response.sendRedirect("login.jsp"); + } +%> + + +۵Ǽ + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + <% + Date date1=new Date(); + java.sql.Date date=new java.sql.Date(date1.getTime()); + %> + + + + + + + +
    ƣ + <%if(pt!=null){%> + + + + + <%}%>
    ѡƷ
    Ʒɫ +
    ͻͣ + +
         + + ̨
      ˣ +
    ۻڣ <%=date.toString()%>
      +  +
    +
    +

     

    +
    +
    + + + + + + + + diff --git a/18/WebRoot/sell_add.jsp b/18/WebRoot/sell_add.jsp new file mode 100644 index 0000000..2f44dea --- /dev/null +++ b/18/WebRoot/sell_add.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="electric.electricUtils.*"%> +<%@ page import="electric.dbs.*"%> + +<% + String pageAction=ParamUtils.getEscapeHTMLParameter(request,"pageaction","goback"); + String responsePage=ParamUtils.getEscapeHTMLParameter(request,"responsepage",""); + pageAction=pageAction.trim().toUpperCase(); + if(pageAction.equals("CREATE")) + { + Dbsell sell=new Dbsell(request); + } + else if(pageAction.equals("MODIFY")) + { + int id=ParamUtils.getIntParameter(request,"Id",0); + if(id>0) + { + Dbsell sell1=new Dbsell(id); + sell1.modify(request); + } + + } + else if(pageAction.equals("DELETE")) + { + int id2=ParamUtils.getIntParameter(request,"id",0); + if(id2>0) + { + Dbsell sell2=new Dbsell(id2); + + sell2.setStatus(1); + } + } + if(!responsePage.trim().equals("")) + { + response.sendRedirect(responsePage); + } + else + { + %> + + <% + } + + +%> + diff --git a/18/WebRoot/shop.jsp b/18/WebRoot/shop.jsp new file mode 100644 index 0000000..d346b2f --- /dev/null +++ b/18/WebRoot/shop.jsp @@ -0,0 +1,85 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + + + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
             
               룺
         ƣ
          
       긺ˣ +
         ˵绰 +
         绰
    +  + 
    +

    +
    + + + + diff --git a/18/WebRoot/shop_add.jsp b/18/WebRoot/shop_add.jsp new file mode 100644 index 0000000..cea4f65 --- /dev/null +++ b/18/WebRoot/shop_add.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="electric.electricUtils.*"%> +<%@ page import="electric.dbs.*"%> + +<% + String pageAction=ParamUtils.getEscapeHTMLParameter(request,"pageaction","goback"); + String responsePage=ParamUtils.getEscapeHTMLParameter(request,"responsepage",""); + pageAction=pageAction.trim().toUpperCase(); + if(pageAction.equals("CREATE")) + { + Dbshop shop=new Dbshop(request); + } + else if(pageAction.equals("MODIFY")) + { + int id=ParamUtils.getIntParameter(request,"id",0); + if(id>0) + { + Dbshop shop1=new Dbshop(id); + shop1.modify(request); + } + + } + else if(pageAction.equals("DELETE")) + { + int id2=ParamUtils.getIntParameter(request,"id",0); + if(id2>0) + { + Dbshop shop2=new Dbshop(id2); + + shop2.setStatus(1); + } + } + if(!responsePage.trim().equals("")) + { + response.sendRedirect(responsePage); + } + else + { + %> + + <% + } + + +%> + diff --git a/18/WebRoot/shopman.jsp b/18/WebRoot/shopman.jsp new file mode 100644 index 0000000..ea79f77 --- /dev/null +++ b/18/WebRoot/shopman.jsp @@ -0,0 +1,180 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbshop"%> +<%@ page import="electric.dbs.shop"%> +<%@ page import="electric.dbs.Shopdb"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + Shopdb shopdb=new Shopdb(); + int countpage=shopdb.selectsql(5); + shop pt=(shop)session.getAttribute("USERPO"); + if(pt==null) + { + response.sendRedirect("login.jsp"); + } + int type=pt.getUsertype(); + if(type==1) + { + out.print("ԲûȨޣ"); + } + else + { +%> + + +û + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      + + + + + + +
    + +
     
    + + + + + + + + + + + <% + int pa=ParamUtils.getIntParameter(request,"pa",1); + int spa=pa-1; + if(spa<1) + { + spa=1; + } + int xpa=pa+1; + if(xpa>countpage) + { + xpa=countpage; + } + Shopdb shopdb2=new Shopdb(); + Collection coll=shopdb2.select(5,pa); + if (coll == null || coll.isEmpty()) { + System.out.println("coll is null"); + } else { + Iterator it = coll.iterator(); + while (it.hasNext()) { + shop b2 = (shop) it.next(); + %> + + + + + + + + + + + + + <%}}%> +
    ûû˵绰޸/ɾ
    <%=b2.getId()%><%=b2.getShopname()%><%=b2.getUsername()%> + <% + int s=b2.getUsertype(); + if(s==1) + { + out.print("û"); + } + if(s==2) + { + out.print("Ա"); + } + %> +<%=b2.getArea()%><%=b2.getPeopleman()%><%=b2.getMantel()%><%=b2.getShoptel()%><% + if(b2.getUsertype()==1) + { + %> + + + <% + } + else + { + %> + + + + <% + } + if(b2.getUsertype()==1) + { + %> + + + <% + } + %> +
    + + + + + +
     
    + <%if(pa>1){%> + һҳ + һҳ + <%} + if(pa + һҳ + һҳ + <%}%>
    +
    + + + +<%}%> \ No newline at end of file diff --git a/18/WebRoot/style.css b/18/WebRoot/style.css new file mode 100644 index 0000000..2628b67 --- /dev/null +++ b/18/WebRoot/style.css @@ -0,0 +1,82 @@ + + \ No newline at end of file diff --git a/18/WebRoot/upimg.jsp b/18/WebRoot/upimg.jsp new file mode 100644 index 0000000..6641f79 --- /dev/null +++ b/18/WebRoot/upimg.jsp @@ -0,0 +1,42 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="electric.electricUtils.ParamUtils"%> +<% + String formName=ParamUtils.getEscapeHTMLParameter(request,"formname",""); + String controlName=ParamUtils.getEscapeHTMLParameter(request,"controlname",""); + String imageHandle=ParamUtils.getEscapeHTMLParameter(request,"imagename",""); +%> + + + + +ϴͼƬ + + + + + + + + + + +
    ͼƬϴ +
    +
    + ѡҪϴļ
    + +
    +
    + + + + + +   + + +
    + + + + diff --git a/18/WebRoot/upimg_upload.jsp b/18/WebRoot/upimg_upload.jsp new file mode 100644 index 0000000..179fb20 --- /dev/null +++ b/18/WebRoot/upimg_upload.jsp @@ -0,0 +1,143 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="com.jspsmart.upload.*"%> +<% + String uploadedPathName="";// + String uploadedFileName=""; + double uploadedFileSize=0; + boolean bSuccessed=false; + boolean bControl=true; + com.jspsmart.upload.SmartUpload mySmartUpload=new com.jspsmart.upload.SmartUpload(); + + + mySmartUpload.initialize(pageContext); + + + mySmartUpload.upload(); + + + for (int i=0;i + + + + + + + +ͼƬϴ + + + + + +<% + //com.ayaya.AccessLog log=new com.ayaya.AccessLog(request,session); + if(bSuccessed) + { +%> + + + + + + + + + + + + + + + <% + if(bControl) + { + %> + + <% + } + else + { + %> + + + <% + } + %> + +
    +

    ͼƬϴɹ

    ϴļ<%=uploadedFileName%>ļС(KB)<%=uploadedFileSize%>
    +<% + } + else + { +%> + ͼϴʧܣ



    + > +<% + } +%> + + + + + diff --git a/18/WebRoot/uploads/kxi_10094354197348736391134719334767.jpg b/18/WebRoot/uploads/kxi_10094354197348736391134719334767.jpg new file mode 100644 index 0000000..8df8677 Binary files /dev/null and b/18/WebRoot/uploads/kxi_10094354197348736391134719334767.jpg differ diff --git a/18/WebRoot/uploads/kxi_14369092894558853981134719097200.jpg b/18/WebRoot/uploads/kxi_14369092894558853981134719097200.jpg new file mode 100644 index 0000000..e24477e Binary files /dev/null and b/18/WebRoot/uploads/kxi_14369092894558853981134719097200.jpg differ diff --git a/18/WebRoot/uploads/kxi_15465265363617172921123126360921.JPG b/18/WebRoot/uploads/kxi_15465265363617172921123126360921.JPG new file mode 100644 index 0000000..d6547cb Binary files /dev/null and b/18/WebRoot/uploads/kxi_15465265363617172921123126360921.JPG differ diff --git a/18/WebRoot/uploads/kxi_15659218288099940941114686936601.gif b/18/WebRoot/uploads/kxi_15659218288099940941114686936601.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi_15659218288099940941114686936601.gif differ diff --git a/18/WebRoot/uploads/kxi_16633044054821350231134718248644.jpg b/18/WebRoot/uploads/kxi_16633044054821350231134718248644.jpg new file mode 100644 index 0000000..68385b2 Binary files /dev/null and b/18/WebRoot/uploads/kxi_16633044054821350231134718248644.jpg differ diff --git a/18/WebRoot/uploads/kxi_16922699061988454571133330377020.gif b/18/WebRoot/uploads/kxi_16922699061988454571133330377020.gif new file mode 100644 index 0000000..f054f6c Binary files /dev/null and b/18/WebRoot/uploads/kxi_16922699061988454571133330377020.gif differ diff --git a/18/WebRoot/uploads/kxi_17008417329482280241114568312603.gif b/18/WebRoot/uploads/kxi_17008417329482280241114568312603.gif new file mode 100644 index 0000000..b61e281 Binary files /dev/null and b/18/WebRoot/uploads/kxi_17008417329482280241114568312603.gif differ diff --git a/18/WebRoot/uploads/kxi_20871323440293598271134718685671.jpg b/18/WebRoot/uploads/kxi_20871323440293598271134718685671.jpg new file mode 100644 index 0000000..68385b2 Binary files /dev/null and b/18/WebRoot/uploads/kxi_20871323440293598271134718685671.jpg differ diff --git a/18/WebRoot/uploads/kxi_22541864632695073271123046045609.jpg b/18/WebRoot/uploads/kxi_22541864632695073271123046045609.jpg new file mode 100644 index 0000000..2ac7d5d Binary files /dev/null and b/18/WebRoot/uploads/kxi_22541864632695073271123046045609.jpg differ diff --git a/18/WebRoot/uploads/kxi_28986185057257352271114686361392.gif b/18/WebRoot/uploads/kxi_28986185057257352271114686361392.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi_28986185057257352271114686361392.gif differ diff --git a/18/WebRoot/uploads/kxi_32422115602404083791134718967408.jpg b/18/WebRoot/uploads/kxi_32422115602404083791134718967408.jpg new file mode 100644 index 0000000..9a2da50 Binary files /dev/null and b/18/WebRoot/uploads/kxi_32422115602404083791134718967408.jpg differ diff --git a/18/WebRoot/uploads/kxi_43908462706182976991123035410968.jpg b/18/WebRoot/uploads/kxi_43908462706182976991123035410968.jpg new file mode 100644 index 0000000..2ac7d5d Binary files /dev/null and b/18/WebRoot/uploads/kxi_43908462706182976991123035410968.jpg differ diff --git a/18/WebRoot/uploads/kxi_43926510713144753301114569009807.gif b/18/WebRoot/uploads/kxi_43926510713144753301114569009807.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi_43926510713144753301114569009807.gif differ diff --git a/18/WebRoot/uploads/kxi_45349147213877077291134718906239.jpg b/18/WebRoot/uploads/kxi_45349147213877077291134718906239.jpg new file mode 100644 index 0000000..d57165d Binary files /dev/null and b/18/WebRoot/uploads/kxi_45349147213877077291134718906239.jpg differ diff --git a/18/WebRoot/uploads/kxi_50430858385283695161115347218992.gif b/18/WebRoot/uploads/kxi_50430858385283695161115347218992.gif new file mode 100644 index 0000000..de13b52 Binary files /dev/null and b/18/WebRoot/uploads/kxi_50430858385283695161115347218992.gif differ diff --git a/18/WebRoot/uploads/kxi_53300690747186562901123050141546.JPG b/18/WebRoot/uploads/kxi_53300690747186562901123050141546.JPG new file mode 100644 index 0000000..72fc858 Binary files /dev/null and b/18/WebRoot/uploads/kxi_53300690747186562901123050141546.JPG differ diff --git a/18/WebRoot/uploads/kxi_55795229231262696051123126341343.JPG b/18/WebRoot/uploads/kxi_55795229231262696051123126341343.JPG new file mode 100644 index 0000000..6751a0e Binary files /dev/null and b/18/WebRoot/uploads/kxi_55795229231262696051123126341343.JPG differ diff --git a/18/WebRoot/uploads/kxi_56220440532899175051115375925070.gif b/18/WebRoot/uploads/kxi_56220440532899175051115375925070.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi_56220440532899175051115375925070.gif differ diff --git a/18/WebRoot/uploads/kxi_58583597018488113701114568287253.gif b/18/WebRoot/uploads/kxi_58583597018488113701114568287253.gif new file mode 100644 index 0000000..4137e6a Binary files /dev/null and b/18/WebRoot/uploads/kxi_58583597018488113701114568287253.gif differ diff --git a/18/WebRoot/uploads/kxi_62662796387638636551133330490325.gif b/18/WebRoot/uploads/kxi_62662796387638636551133330490325.gif new file mode 100644 index 0000000..83c33b1 Binary files /dev/null and b/18/WebRoot/uploads/kxi_62662796387638636551133330490325.gif differ diff --git a/18/WebRoot/uploads/kxi_63341278878634171141123059559609.JPG b/18/WebRoot/uploads/kxi_63341278878634171141123059559609.JPG new file mode 100644 index 0000000..72fc858 Binary files /dev/null and b/18/WebRoot/uploads/kxi_63341278878634171141123059559609.JPG differ diff --git a/18/WebRoot/uploads/kxi_65950384537806024261114568374316.htm b/18/WebRoot/uploads/kxi_65950384537806024261114568374316.htm new file mode 100644 index 0000000..f870461 --- /dev/null +++ b/18/WebRoot/uploads/kxi_65950384537806024261114568374316.htm @@ -0,0 +1,121 @@ +<%@ page contentType="text/html; charset=GBK" %> + + + + + + +з-ʾ + + + + +<%com.ayaya.AccessLog log=new com.ayaya.AccessLog(request,session);%> +
    + +
    +
    + + + + + + + + +
    +
    + + + + + + +
    +

    Ʒ

    +
    +
    + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    Ʒ

    +

    Ʒ

    +

    +

    Ʒ

    ƷͼƬ   +

    +
    +
    +

         +

    + +
    +
    +
    +
    + + + + diff --git a/18/WebRoot/uploads/kxi_70957650684275697311123126378984.JPG b/18/WebRoot/uploads/kxi_70957650684275697311123126378984.JPG new file mode 100644 index 0000000..26ab2dd Binary files /dev/null and b/18/WebRoot/uploads/kxi_70957650684275697311123126378984.JPG differ diff --git a/18/WebRoot/uploads/kxi_75649377050096477581121757622983.gif b/18/WebRoot/uploads/kxi_75649377050096477581121757622983.gif new file mode 100644 index 0000000..0395e33 Binary files /dev/null and b/18/WebRoot/uploads/kxi_75649377050096477581121757622983.gif differ diff --git a/18/WebRoot/uploads/kxi_83531497354938770411114568351730.gif b/18/WebRoot/uploads/kxi_83531497354938770411114568351730.gif new file mode 100644 index 0000000..38ba464 Binary files /dev/null and b/18/WebRoot/uploads/kxi_83531497354938770411114568351730.gif differ diff --git a/18/WebRoot/uploads/kxi_8398975948037079701114568325380.gif b/18/WebRoot/uploads/kxi_8398975948037079701114568325380.gif new file mode 100644 index 0000000..d54811b Binary files /dev/null and b/18/WebRoot/uploads/kxi_8398975948037079701114568325380.gif differ diff --git a/18/WebRoot/uploads/kxi_85616819417893112931134719257911.jpg b/18/WebRoot/uploads/kxi_85616819417893112931134719257911.jpg new file mode 100644 index 0000000..f09cfaa Binary files /dev/null and b/18/WebRoot/uploads/kxi_85616819417893112931134719257911.jpg differ diff --git a/18/WebRoot/uploads/kxi_8922397280424390091114686453094.gif b/18/WebRoot/uploads/kxi_8922397280424390091114686453094.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi_8922397280424390091114686453094.gif differ diff --git a/18/WebRoot/uploads/kxi__13975035992544654961114686136635.gif b/18/WebRoot/uploads/kxi__13975035992544654961114686136635.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi__13975035992544654961114686136635.gif differ diff --git a/18/WebRoot/uploads/kxi__14616905138749848731114568399776.gif b/18/WebRoot/uploads/kxi__14616905138749848731114568399776.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi__14616905138749848731114568399776.gif differ diff --git a/18/WebRoot/uploads/kxi__24289993278634460451115298213057.gif b/18/WebRoot/uploads/kxi__24289993278634460451115298213057.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi__24289993278634460451115298213057.gif differ diff --git a/18/WebRoot/uploads/kxi__3184916253173889091134718586238.jpg b/18/WebRoot/uploads/kxi__3184916253173889091134718586238.jpg new file mode 100644 index 0000000..960936f Binary files /dev/null and b/18/WebRoot/uploads/kxi__3184916253173889091134718586238.jpg differ diff --git a/18/WebRoot/uploads/kxi__33117701651727509591132980473062.JPG b/18/WebRoot/uploads/kxi__33117701651727509591132980473062.JPG new file mode 100644 index 0000000..d69439d Binary files /dev/null and b/18/WebRoot/uploads/kxi__33117701651727509591132980473062.JPG differ diff --git a/18/WebRoot/uploads/kxi__35781242419814016091114686515317.gif b/18/WebRoot/uploads/kxi__35781242419814016091114686515317.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi__35781242419814016091114686515317.gif differ diff --git a/18/WebRoot/uploads/kxi__38496465332523077871115796457995.gif b/18/WebRoot/uploads/kxi__38496465332523077871115796457995.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi__38496465332523077871115796457995.gif differ diff --git a/18/WebRoot/uploads/kxi__43466945871108399541134797812434.jpg b/18/WebRoot/uploads/kxi__43466945871108399541134797812434.jpg new file mode 100644 index 0000000..c1abda7 Binary files /dev/null and b/18/WebRoot/uploads/kxi__43466945871108399541134797812434.jpg differ diff --git a/18/WebRoot/uploads/kxi__4508481608020386971115984541889.JPG b/18/WebRoot/uploads/kxi__4508481608020386971115984541889.JPG new file mode 100644 index 0000000..652c501 Binary files /dev/null and b/18/WebRoot/uploads/kxi__4508481608020386971115984541889.JPG differ diff --git a/18/WebRoot/uploads/kxi__46082290800930127461123047361437.JPG b/18/WebRoot/uploads/kxi__46082290800930127461123047361437.JPG new file mode 100644 index 0000000..72fc858 Binary files /dev/null and b/18/WebRoot/uploads/kxi__46082290800930127461123047361437.JPG differ diff --git a/18/WebRoot/uploads/kxi__49802698729824328581133330570487.gif b/18/WebRoot/uploads/kxi__49802698729824328581133330570487.gif new file mode 100644 index 0000000..0932b08 Binary files /dev/null and b/18/WebRoot/uploads/kxi__49802698729824328581133330570487.gif differ diff --git a/18/WebRoot/uploads/kxi__51698979568570034411115980692107.gif b/18/WebRoot/uploads/kxi__51698979568570034411115980692107.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi__51698979568570034411115980692107.gif differ diff --git a/18/WebRoot/uploads/kxi__53406961538872917121115980710527.class b/18/WebRoot/uploads/kxi__53406961538872917121115980710527.class new file mode 100644 index 0000000..ba28542 Binary files /dev/null and b/18/WebRoot/uploads/kxi__53406961538872917121115980710527.class differ diff --git a/18/WebRoot/uploads/kxi__54251716207930571431123035499968.jpg b/18/WebRoot/uploads/kxi__54251716207930571431123035499968.jpg new file mode 100644 index 0000000..0fff1c6 Binary files /dev/null and b/18/WebRoot/uploads/kxi__54251716207930571431123035499968.jpg differ diff --git a/18/WebRoot/uploads/kxi__59491779640348528591115298131021.gif b/18/WebRoot/uploads/kxi__59491779640348528591115298131021.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi__59491779640348528591115298131021.gif differ diff --git a/18/WebRoot/uploads/kxi__67455701752890108491123046125796.jpg b/18/WebRoot/uploads/kxi__67455701752890108491123046125796.jpg new file mode 100644 index 0000000..0fff1c6 Binary files /dev/null and b/18/WebRoot/uploads/kxi__67455701752890108491123046125796.jpg differ diff --git a/18/WebRoot/uploads/kxi__69207662776669041981115347109554.gif b/18/WebRoot/uploads/kxi__69207662776669041981115347109554.gif new file mode 100644 index 0000000..11328f9 Binary files /dev/null and b/18/WebRoot/uploads/kxi__69207662776669041981115347109554.gif differ diff --git a/18/WebRoot/uploads/kxi__77443591989256511341115347300981.gif b/18/WebRoot/uploads/kxi__77443591989256511341115347300981.gif new file mode 100644 index 0000000..11328f9 Binary files /dev/null and b/18/WebRoot/uploads/kxi__77443591989256511341115347300981.gif differ diff --git a/18/WebRoot/uploads/kxi__78613693013445549361115376213005.gif b/18/WebRoot/uploads/kxi__78613693013445549361115376213005.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi__78613693013445549361115376213005.gif differ diff --git a/18/WebRoot/uploads/kxi__85533562406664559101114687019961.gif b/18/WebRoot/uploads/kxi__85533562406664559101114687019961.gif new file mode 100644 index 0000000..c0e98f8 Binary files /dev/null and b/18/WebRoot/uploads/kxi__85533562406664559101114687019961.gif differ diff --git a/18/WebRoot/uploads/kxi__88254250243709935801134719192664.jpg b/18/WebRoot/uploads/kxi__88254250243709935801134719192664.jpg new file mode 100644 index 0000000..a9b38ff Binary files /dev/null and b/18/WebRoot/uploads/kxi__88254250243709935801134719192664.jpg differ diff --git a/18/WebRoot/uploads/kxi__90219241734970041531115344303523.gif b/18/WebRoot/uploads/kxi__90219241734970041531115344303523.gif new file mode 100644 index 0000000..a1c78c3 Binary files /dev/null and b/18/WebRoot/uploads/kxi__90219241734970041531115344303523.gif differ diff --git a/18/WebRoot/uptools/upimg.jsp b/18/WebRoot/uptools/upimg.jsp new file mode 100644 index 0000000..6e87f83 --- /dev/null +++ b/18/WebRoot/uptools/upimg.jsp @@ -0,0 +1,33 @@ +<%@ page contentType="text/html; charset=GB2312" %> +<%@ page import="electric.electricUtils.ParamUtils"%> +<% + String formName=ParamUtils.getEscapeHTMLParameter(request,"formname",""); + String controlName=ParamUtils.getEscapeHTMLParameter(request,"controlname",""); + String imageHandle=ParamUtils.getEscapeHTMLParameter(request,"imagename",""); +%> + + + + + + +ϴͼƬ + + + + +
    +

     aYAYA ͼƬϴ
    +
    + ѡҪϴļ

    +

    + + + + +

    +
    + + + + diff --git a/18/WebRoot/uptools/upimg_upload.jsp b/18/WebRoot/uptools/upimg_upload.jsp new file mode 100644 index 0000000..3f1a872 --- /dev/null +++ b/18/WebRoot/uptools/upimg_upload.jsp @@ -0,0 +1,143 @@ +<%@ page contentType="text/html; charset=GB2312" %> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="com.jspsmart.upload.*"%> +<% + String uploadedPathName="";// + String uploadedFileName=""; + double uploadedFileSize=0; + boolean bSuccessed=false; + boolean bControl=true; + com.jspsmart.upload.SmartUpload mySmartUpload=new com.jspsmart.upload.SmartUpload(); + + // ʼJSPвpageContext + mySmartUpload.initialize(pageContext); + + // ִϴ + mySmartUpload.upload(); + + // ļ + for (int i=0;i + + + + + + + +ͼƬϴ + + + + + +<% + + if(bSuccessed) + { +%> + + + + + + + + + + + + + + + <% + if(bControl) + { + %> + + <% + } + else + { + %> + + + <% + } + %> + +
    +

    ͼƬϴɹ

    ϴļ<%=uploadedFileName%>ļС(KB)<%=uploadedFileSize%>
    >
    +<% + } + else + { +%> + ͼϴʧܣ



    + > +<% + } +%> + + + diff --git a/18/WebRoot/ware.jsp b/18/WebRoot/ware.jsp new file mode 100644 index 0000000..83eaa17 --- /dev/null +++ b/18/WebRoot/ware.jsp @@ -0,0 +1,113 @@ +<%@ page contentType="text/html; charset=gb2312" %> + + +Ʒ + + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ʒƣ
    Ʒͺţ
    Ʒۣ
    Ʒ +
    ң
    Ʒ˵
    +   + +    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/18/WebRoot/ware_add.jsp b/18/WebRoot/ware_add.jsp new file mode 100644 index 0000000..75cccdf --- /dev/null +++ b/18/WebRoot/ware_add.jsp @@ -0,0 +1,48 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="electric.electricUtils.*"%> +<%@ page import="electric.dbs.*"%> + +<% + String pageAction=ParamUtils.getEscapeHTMLParameter(request,"pageaction","goback"); + String responsePage=ParamUtils.getEscapeHTMLParameter(request,"responsepage",""); + pageAction=pageAction.trim().toUpperCase(); + if(pageAction.equals("CREATE")) + { + Dbware ware=new Dbware(request); + } + else if(pageAction.equals("MODIFY")) + { + int id=ParamUtils.getIntParameter(request,"id",0); + if(id>0) + { + Dbware warea=new Dbware(id); + warea.modify(request); + } + + } + else if(pageAction.equals("DELETE")) + { + int id2=ParamUtils.getIntParameter(request,"id",0); + if(id2>0) + { + Dbware wareb=new Dbware(id2); + + wareb.setStatus(1); + } + } + if(!responsePage.trim().equals("")) + { + response.sendRedirect(responsePage); + } + else + { + %> + + <% + } +%> + diff --git a/18/WebRoot/wareman.jsp b/18/WebRoot/wareman.jsp new file mode 100644 index 0000000..8d0f023 --- /dev/null +++ b/18/WebRoot/wareman.jsp @@ -0,0 +1,144 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.util.Iterator"%> +<%@ page import="java.util.Collection"%> +<%@ page import="java.sql.*"%> +<%@ page import="java.text.SimpleDateFormat"%> +<%@ page import="electric.dbs.Dbware"%> +<%@ page import="electric.dbs.waredb"%> +<%@ page import="electric.dbs.ware"%> +<%@ page import="electric.dbs.Dbshop"%> +<%@ page import="electric.dbs.Shopdb"%> +<%@ page import="electric.dbs.shop"%> +<%@ page import="electric.electricUtils.ParamUtils"%> +<%@ page import="electric.electricUtils.DbConnectionManager"%> +<% + waredb ware=new waredb(); + int countpage=ware.selectsql(5); + shop pt=(shop)session.getAttribute("USERPO"); + + if(pt==null) + { + response.sendRedirect("login.jsp"); + } + int type=pt.getUsertype(); + if(type==1) + { + out.print("ԲûȨޣ"); + } + else + { + +%> + + +ƷϢ + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
     
      + + + + + + +
    + +
    Ʒ 
    + + + + + + + + + <% + int pa=ParamUtils.getIntParameter(request,"pa",1); + int spa=pa-1; + if(spa<1) + { + spa=1; + } + int xpa=pa+1; + if(xpa>countpage) + { + xpa=countpage; + } + waredb waredb=new waredb(); + Collection coll=waredb.select(5,pa); + if (coll == null || coll.isEmpty()) { + out.println("޽"); + } else { + Iterator it = coll.iterator(); + while (it.hasNext()) { + ware b2 = (ware) it.next(); + %> + + + + + + + + + + <%}}%> +
    ƷƷƷͺƷƷ޸/ɾ
    <%=b2.getId()%><%=b2.getPname()%><%=b2.getPmodel()%><%=b2.getPcost()%><%=b2.getPheft()%><%=b2.getPfacturer()%> + +
    + + + + + +
     
    + <%if(pa>1){%> + һҳ + һҳ + <%} + if(pa + һҳ + һҳ + <%}%> +
    +
    + + + +<%}%> \ No newline at end of file diff --git a/18/src/electric/dbs/Dbmess.java b/18/src/electric/dbs/Dbmess.java new file mode 100644 index 0000000..fc03c28 --- /dev/null +++ b/18/src/electric/dbs/Dbmess.java @@ -0,0 +1,289 @@ +package electric.dbs; +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import java.text.SimpleDateFormat; +import electric.electricUtils.*; +public class Dbmess + { + + private static final String LOAD_MESS_BY_ID = + "SELECT * FROM [MESS] WHERE [ID]=?"; + + private static final String INSERT_MESS = + "INSERT INTO [MESS] ([Id],[Mname],[Mtext],[Mnote],[Createdate],[Status]) VALUES " + + "(?,?,?,?,?,?)"; + + private static final String UPDATE_MESS = + "UPDATE [MESS] SET [Mname]=?,[Mtext]=?,[Mnote]=?,[Createdate]=?," + + "[Status]=?" + " WHERE [Id]=?"; + + private static final String DEL_MESS = + "UPDATE [MESS] SET [Status]=? WHERE [Id]=?"; + + private static final String CLEAR_MESS = "DELETE FROM [MESS] WHERE STATUS=" + + FinalConstants.STATUS_DELETE; + + private int Id; + private String Mname; + private String Mtext; + private String Mnote; + private String CreateDate; + private int Status; + public Dbmess() + {} + public Dbmess(HttpServletRequest request) { + this.Id = DbSequenceManager.nextID(FinalConstants.T_MESS); + this.Mname = ParamUtils.getEscapeHTMLParameter(request, "mname"); + this.Mtext = ParamUtils.getEscapeHTMLParameter(request, "mtext"); + this.Mnote = ParamUtils.getEscapeHTMLParameter(request, "mnote"); + SimpleDateFormat simpleDate = new SimpleDateFormat("yyyyMMdd"); + String shiftDateToDate = simpleDate.format(new java.util.Date()); + this.CreateDate = shiftDateToDate; + this.Status = FinalConstants.STATUS_NORMAL; + insertIntoDb(); + } + + public Dbmess(int Id) throws MessNotFoundException { + this.Id = Id; + if (Id <= 0) { + return; + } + loadFromDb(); + +} + +protected static Dbmess getInstance(int Id) throws + MessNotFoundException { + return new Dbmess(Id); +} + +protected void delete() { + setStatus(FinalConstants.STATUS_DELETE); +} + +protected static void clear() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(CLEAR_MESS); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println( + "SQLException in DbTChatRooms.java:clearTChatRooms(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} + +///////////////////////////////////////////////////////////////// + + public int getId() { + return this.Id; + } + public String getMname() + { + return this.Mname; + } + public String getMtext() + { + return this.Mtext; + } + public String getMnote() + { + return this.Mnote; + } + public String getCreateDate() + { + return this.CreateDate; + } + public int getStatus() + { + return this.Status; + } + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; + saveToDb(); + } + public void setMname(String Mname) + { + this.Mname=Mname; + saveToDb(); + } + public void setMtext(String Mtext) + { + this.Mtext=Mtext; + saveToDb(); + } + public void setMnote(String Mnote) + { + this.Mnote=Mnote; + saveToDb(); + } + public void setCreateDate(String CreateDate) + { + this.CreateDate=CreateDate; + saveToDb(); + } + public void setStatus(int Status) + { + this.Status=Status; + DELToDb(); + } +//////////////////////////////////////////////////////////////////////////////// + private void loadFromDb() throws MessNotFoundException { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(LOAD_MESS_BY_ID); + pstmt.setInt(1,Id); + ResultSet rs = pstmt.executeQuery(); + if (!rs.next()) { + throw new MessNotFoundException("ݱ[MESS]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + this.Id = rs.getInt("ID"); + this.Mname = rs.getString("Mname"); + this.Mtext = rs.getString("Mtext"); + this.Mnote=rs.getString("Mnote"); + this.CreateDate = rs.getString("CREATEDATE"); + this.Status = rs.getInt("STATUS"); +} + catch (SQLException sqle) { + throw new MessNotFoundException("ݱ[MESS]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + +} +private void insertIntoDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(INSERT_MESS); + pstmt.setInt(1, this.Id); + pstmt.setString(2,StringUtils.toChinese(this.Mname)); + pstmt.setString(3, StringUtils.toChinese(this.Mtext)); + pstmt.setString(4, StringUtils.toChinese(this.Mnote)); + pstmt.setString(5, StringUtils.toChinese(this.CreateDate)); + pstmt.setInt(6, this.Status); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: DbMess:insertIntoDb()-" + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + } + + private void saveToDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(UPDATE_MESS); + pstmt.setString(1, StringUtils.toChinese(this.Mname)); + pstmt.setString(2, StringUtils.toChinese(this.Mtext)); + pstmt.setString(3, StringUtils.toChinese(this.Mnote)); + pstmt.setString(4, StringUtils.toChinese(this.CreateDate)); + pstmt.setInt(5, this.Status); + pstmt.setInt(6, this.Id); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: DbMess.java:saveToDb(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} +private void DELToDb() { +Connection con = null; +PreparedStatement pstmt = null; +try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(DEL_MESS); + System.out.println(DEL_MESS); + pstmt.setInt(1, this.Status); + pstmt.setInt(2, this.Id); + pstmt.executeUpdate(); +} +catch (SQLException sqle) { + System.err.println("λ: DbShop.java:DELToDb(): " + sqle); + sqle.printStackTrace(); +} +finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } +} +} + +} diff --git a/18/src/electric/dbs/Dbnews.java b/18/src/electric/dbs/Dbnews.java new file mode 100644 index 0000000..861f816 --- /dev/null +++ b/18/src/electric/dbs/Dbnews.java @@ -0,0 +1,313 @@ +package electric.dbs; +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import java.text.SimpleDateFormat; +import electric.electricUtils.*; +public class Dbnews{ + private static final String LOAD_NEWS_BY_ID = + "SELECT * FROM [NEWS] WHERE [ID]=?"; + + private static final String INSERT_NEWS = + "INSERT INTO [NEWS] ([Id],[Motif],[Kithepeople],[Content],[Createdate],[Createpeople],[Status]) VALUES " + + "(?,?,?,?,?,?,?)"; + + private static final String UPDATE_NEWS = + "UPDATE [NEWS] SET [Motif]=?,[Kithepeople]=?,[Content]=?,[Createdate]=?," + + "[Createpeople]=?,[Status]=?" + + " WHERE [Id]=?"; + + private static final String DEL_NEWS = + "UPDATE [NEWS] SET [Status]=? WHERE [Id]=?"; + + private static final String CLEAR_NEWS = "DELETE FROM [NEWS] WHERE STATUS=" + + FinalConstants.STATUS_DELETE; + + private int Id; + private String Motif; + private String Kithepeople; + private String Content; + private String CreateDate; + private int Createpeople; + private int Status; + public Dbnews() + {} + public Dbnews(HttpServletRequest request) { + this.Id = DbSequenceManager.nextID(FinalConstants.T_NEWS); + this.Motif = ParamUtils.getEscapeHTMLParameter(request, "motif"); + this.Kithepeople = ParamUtils.getEscapeHTMLParameter(request, "kithepeople"); + this.Content = ParamUtils.getEscapeHTMLParameter(request, "content"); + SimpleDateFormat simpleDate = new SimpleDateFormat("yyyyMMdd"); + String shiftDateToDate = simpleDate.format(new java.util.Date()); + this.CreateDate = shiftDateToDate; + this.Createpeople = this.Id; + this.Status = FinalConstants.STATUS_NORMAL; + insertIntoDb(); + } + + public Dbnews(int Id) throws NewsNotFoundException { + this.Id = Id; + if (Id <= 0) { + return; + } + loadFromDb(); + +} + +protected static Dbnews getInstance(int Id) throws + NewsNotFoundException { + return new Dbnews(Id); +} + +protected void delete() { + setStatus(FinalConstants.STATUS_DELETE); +} + +protected static void clear() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(CLEAR_NEWS); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println( + "SQLException in DbTChatRooms.java:clearTChatRooms(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} + +///////////////////////////////////////////////////////////////// + + public int getId() { + return this.Id; + } + public String getMotif() + { + return this.Motif; + } + public String getKithepeople() + { + return this.Kithepeople; + } + public String getContent() + { + return this.Content; + } + public String getCreateDate() + { + return this.CreateDate; + } + public int getCreatepeople() + { + return this.Createpeople; + } + public int getStatus() + { + return this.Status; + } + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; + saveToDb(); + } + public void setMotif(String Motif) + { + this.Motif=Motif; + saveToDb(); + } + public void setKithepeople(String Kithepeople) + { + this.Kithepeople=Kithepeople; + saveToDb(); + } + public void setContent(String Content) + { + this.Content=Content; + saveToDb(); + } + public void setCreateDate(String CreateDate) + { + this.CreateDate=CreateDate; + saveToDb(); + } + public void setCreatepeople(int Createpeople) + { + this.Createpeople=Createpeople; + saveToDb(); + } + public void setStatus(int Status) + { + this.Status=Status; + DELToDb(); + } +//////////////////////////////////////////////////////////////////////////////// + + public void modify(HttpServletRequest request) { + this.Id = ParamUtils.getIntParameter(request, "Id"); + this.Motif = ParamUtils.getEscapeHTMLParameter(request, "Motif"); + this.Kithepeople = ParamUtils.getEscapeHTMLParameter(request, "Kithepeople"); + this.Content = ParamUtils.getEscapeHTMLParameter(request, "Content"); + this.Createpeople =this.Id; + this.Status = FinalConstants.STATUS_NORMAL; + saveToDb(); + } + + private void loadFromDb() throws NewsNotFoundException { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(LOAD_NEWS_BY_ID); + pstmt.setInt(1,Id); + ResultSet rs = pstmt.executeQuery(); + if (!rs.next()) { + throw new NewsNotFoundException("ݱ[NEWS]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + this.Id = rs.getInt("ID"); + this.Motif = rs.getString("Motif"); + this.Kithepeople = rs.getString("Kithepeople"); + this.Content=rs.getString("Content"); + this.CreateDate = rs.getString("CREATEDATE"); + this.Createpeople = rs.getInt("CREATEPEOPLE"); + this.Status = rs.getInt("STATUS"); +} + catch (SQLException sqle) { + throw new NewsNotFoundException("ݱ[NEWS]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + +} +private void insertIntoDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(INSERT_NEWS); + pstmt.setInt(1, this.Id); + pstmt.setString(2,StringUtils.toChinese(this.Motif)); + pstmt.setString(3, StringUtils.toChinese(this.Kithepeople)); + pstmt.setString(4, StringUtils.toChinese(this.Content)); + pstmt.setString(5, StringUtils.toChinese(this.CreateDate)); + pstmt.setInt(6, this.Createpeople); + pstmt.setInt(7, this.Status); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: DbNews:insertIntoDb()-" + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + } + + private void saveToDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(UPDATE_NEWS); + pstmt.setString(1, StringUtils.toChinese(this.Motif)); + pstmt.setString(2, StringUtils.toChinese(this.Kithepeople)); + pstmt.setString(3, StringUtils.toChinese(this.Content)); + pstmt.setString(4, StringUtils.toChinese(this.CreateDate)); + pstmt.setInt(5, this.Createpeople); + pstmt.setInt(6, this.Status); + pstmt.setInt(7, this.Id); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: DbNews.java:saveToDb(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} +private void DELToDb() { +Connection con = null; +PreparedStatement pstmt = null; +try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(DEL_NEWS); + System.out.println(DEL_NEWS); + pstmt.setInt(1, this.Status); + pstmt.setInt(2, this.Id); + pstmt.executeUpdate(); +} +catch (SQLException sqle) { + System.err.println("λ: DbShop.java:DELToDb(): " + sqle); + sqle.printStackTrace(); +} +finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } +} +} + +} diff --git a/18/src/electric/dbs/Dbproduct.java b/18/src/electric/dbs/Dbproduct.java new file mode 100644 index 0000000..99f559a --- /dev/null +++ b/18/src/electric/dbs/Dbproduct.java @@ -0,0 +1,313 @@ +package electric.dbs; +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import electric.electricUtils.*; + +public class Dbproduct + { + private static final String LOAD_PRODUCT_BY_ID = + "SELECT * FROM [PRODUCT] WHERE [ID]=?"; + + private static final String INSERT_PRODUCT = + "INSERT INTO [PRODUCT] ([Id],[Productname],[Productprice],[Productform],[Productnote],[Pic],[Status]) VALUES " + + "(?,?,?,?,?,?,?)"; + + private static final String UPDATE_PRODUCT = + "UPDATE [PRODUCT] SET [Productname]=?,[Productprice]=?,[Productform]=?,[Productnote]=?," + + "[Status]=?" + + " WHERE [Id]=?"; + + private static final String Del_product = + "UPDATE [PRODUCT] SET [Status]=? WHERE [Id]=?"; + + private static final String CLEAR_PRODUCT = "DELETE FROM [PRODUCT] WHERE STATUS=" + + FinalConstants.STATUS_DELETE; + + private int Id; + private String Productname; + private String Productprice; + private String Productform; + private String Productnote; + private String Pic; + private int Status; + public Dbproduct() + {} + public Dbproduct(HttpServletRequest request) { + this.Id = DbSequenceManager.nextID(FinalConstants.T_PRODUCT); + this.Productname = ParamUtils.getEscapeHTMLParameter(request, "productname"); + this.Productprice = ParamUtils.getEscapeHTMLParameter(request, "productprice"); + this.Productform = ParamUtils.getEscapeHTMLParameter(request, "productform"); + this.Productnote = ParamUtils.getEscapeHTMLParameter(request, "productnote"); + this.Pic = ParamUtils.getEscapeHTMLParameter(request, "pic"); + this.Status = FinalConstants.STATUS_NORMAL; + insertIntoDb(); + } + + public Dbproduct(int Id) throws ProductNotFoundException { + this.Id = Id; + // System.out.print(Id); + if (Id <= 0) { + return; + } + loadFromDb(); + +} + +protected static Dbproduct getInstance(int Id) throws + ProductNotFoundException { + return new Dbproduct(Id); +} + +protected void delete() { + setStatus(FinalConstants.STATUS_DELETE); +} + +protected static void clear() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(CLEAR_PRODUCT); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println( + "SQLException in DbTChatRooms.java:clearTChatRooms(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} + +///////////////////////////////////////////////////////////////// + + public int getId() { + return this.Id; + } + public String getProductname() + { + return this.Productname; + } + public String getProductprice() + { + return this.Productprice; + } + public String getProductform() + { + return this.Productform; + } + public String getProductnote() + { + return this.Productnote; + } + public String getPic() + { + return this.Pic; + } + public int getStatus() + { + return this.Status; + } + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; + saveToDb(); + } + public void setProductname(String Productname) + { + this.Productname=Productname; + saveToDb(); + } + public void setProductprice(String Productprice) + { + this.Productprice=Productprice; + saveToDb(); + } + public void setProductform(String Productform) + { + this.Productform=Productform; + saveToDb(); + } + public void setProductnote(String Productnote) + { + this.Productnote=Productnote; + saveToDb(); + } + public void setPic(String Pic) + { + this.Pic=Pic; + saveToDb(); + } + public void setStatus(int Status) + { + this.Status=Status; + DELToDb(); + } +//////////////////////////////////////////////////////////////////////////////// + + public void modify(HttpServletRequest request) { + this.Id = ParamUtils.getIntParameter(request, "Id"); + this.Productname = ParamUtils.getEscapeHTMLParameter(request, "productname"); + this.Productprice = ParamUtils.getEscapeHTMLParameter(request, "productprice"); + this.Productform = ParamUtils.getEscapeHTMLParameter(request, "productform"); + this.Productnote = ParamUtils.getEscapeHTMLParameter(request, "productnote"); + this.Status = FinalConstants.STATUS_NORMAL; + saveToDb(); + } + + private void loadFromDb() throws ProductNotFoundException { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(LOAD_PRODUCT_BY_ID); + pstmt.setInt(1,Id); + ResultSet rs = pstmt.executeQuery(); + if (!rs.next()) { + throw new ProductNotFoundException("ݱ[PRODUCT]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + this.Id = rs.getInt("Id"); + this.Productname = rs.getString("Productname"); + this.Productprice = rs.getString("Productprice"); + this.Productform = rs.getString("Productform"); + this.Productnote = rs.getString("Productnote"); + this.Pic = rs.getString("Pic"); + this.Status = rs.getInt("Status"); +} + catch (SQLException sqle) { + throw new ProductNotFoundException("ݱ[PRODUCT]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + +} +private void insertIntoDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(INSERT_PRODUCT); + pstmt.setInt(1, this.Id); + pstmt.setString(2,StringUtils.toChinese(this.Productname)); + pstmt.setString(3, StringUtils.toChinese(this.Productprice)); + pstmt.setString(4, StringUtils.toChinese(this.Productform)); + pstmt.setString(5, StringUtils.toChinese(this.Productnote)); + pstmt.setString(6, StringUtils.toChinese(this.Pic)); + pstmt.setInt(7, this.Status); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: DbProduct:insertIntoDb()-" + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + } + + private void saveToDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(UPDATE_PRODUCT); + pstmt.setString(1,StringUtils.toChinese(this.Productname)); + pstmt.setString(2, StringUtils.toChinese(this.Productprice)); + pstmt.setString(3, StringUtils.toChinese(this.Productform)); + pstmt.setString(4, StringUtils.toChinese(this.Productnote)); + pstmt.setInt(5, this.Status); + pstmt.setInt(6, this.Id); + // System.out.print("weiwei"); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: DbProduct.java:saveToDb(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} +private void DELToDb() { +Connection con = null; +PreparedStatement pstmt = null; +try { +con = DbConnectionManager.getConnection(); +pstmt = con.prepareStatement(Del_product); +System.out.println(Del_product); +pstmt.setInt(1, this.Status); +pstmt.setInt(2, this.Id); +pstmt.executeUpdate(); +} +catch (SQLException sqle) { +System.err.println("λ: DbShop.java:DELToDb(): " + sqle); +sqle.printStackTrace(); +} +finally { +try { + pstmt.close(); +} +catch (Exception e) { + e.printStackTrace(); +} +try { + con.close(); +} +catch (Exception e) { + e.printStackTrace(); +} +} +} + +} diff --git a/18/src/electric/dbs/Dbsell.java b/18/src/electric/dbs/Dbsell.java new file mode 100644 index 0000000..fbf3cb0 --- /dev/null +++ b/18/src/electric/dbs/Dbsell.java @@ -0,0 +1,338 @@ +package electric.dbs; +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import java.text.SimpleDateFormat; +import electric.electricUtils.*; +public class Dbsell + { + + private static final String LOAD_SELL_BY_ID = + "SELECT * FROM [SELL] WHERE [Id]=?"; + + private static final String INSERT_SELL = + "INSERT INTO [SELL] ([Id],[Shopid],[Productid],[Procolor],[Protype],[Pronumber],[Propeople],[Ptime],[Createdate],[Status]) VALUES " + + "(?,?,?,?,?,?,?,?,?,?)"; + + private static final String UPDATE_SELL = + "UPDATE [SELL] SET [Shopid]=?,[Productid]=?,[Procolor]=?,[Protype]=?,[Pronumber]=?," + + "[Propeople]=?,[Ptime]=?,[Status]=?" + + " WHERE [Id]=?"; + + private static final String CLEAR_SELL = "DELETE FROM [SELL] WHERE STATUS=" + + FinalConstants.STATUS_DELETE; + + private int Id; + private int Shopid; + private int Productid; + private String Procolor; + private int Protype; + private int Pronumber; + private String Propeople; + private String Ptime; + private String Createdate; + private int Status; + public Dbsell() + {} + public Dbsell(HttpServletRequest request) { + this.Id = DbSequenceManager.nextID(FinalConstants.T_SELL); + this.Shopid = ParamUtils.getIntParameter(request, "shopid"); + this.Productid = ParamUtils.getIntParameter(request, "productid"); + this.Procolor = ParamUtils.getEscapeHTMLParameter(request, "procolor"); + this.Protype = ParamUtils.getIntParameter(request, "protype"); + this.Pronumber = ParamUtils.getIntParameter(request, "pronumber"); + this.Propeople = ParamUtils.getEscapeHTMLParameter(request, "propeople"); + String ayear = ParamUtils.getEscapeHTMLParameter(request, "Ayear"); + String amonth = ParamUtils.getEscapeHTMLParameter(request, "Amonth"); + String aday = ParamUtils.getEscapeHTMLParameter(request, "Aday"); + //this.Ptime = ayear+amonth+aday; + //java.util.Date dat=new java.util.Date(); + //this.Ptime =dat.toLocaleString().substring(0,9); + SimpleDateFormat simpleDate = new SimpleDateFormat("yyyyMMdd"); + String shiftDateToDate = simpleDate.format(new java.util.Date()); + this.Ptime =shiftDateToDate; + this.Createdate = shiftDateToDate; + this.Status = FinalConstants.STATUS_NORMAL; + insertIntoDb(); + } + + public Dbsell(int Id) throws SellNotFoundException { + this.Id = Id; + // System.out.print(Id); + if (Id <= 0) { + return; + } + loadFromDb(); + +} + +protected static Dbsell getInstance(int Id) throws + SellNotFoundException { + return new Dbsell(Id); +} + +protected void delete() { + setStatus(FinalConstants.STATUS_DELETE); +} + +protected static void clear() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(CLEAR_SELL); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println( + "SQLException in DbTChatRooms.java:clearTChatRooms(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} + +///////////////////////////////////////////////////////////////// + public int getId() { + return this.Id; + } + public int getShopid() +{ + return this.Shopid; +} + + public int getProductid() + { + return this.Productid; + } + public String getProcolor() + { + return this.Procolor; + } + public int getProtype() + { + return this.Protype; + } + public int getPronumber() + { + return this.Pronumber; + } + public String getPropeople() + { + return this.Propeople; + } + public String getPtime() + { + return this.Ptime; + } + public String getCraetedate() + { + return this.Createdate; + } + public int getStatus() + { + return this.Status; + } + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; + saveToDb(); + } + public void setShopid(int Shopid) +{ + this.Shopid=Shopid; + saveToDb(); +} + + public void setProductid(int Productid) + { + this.Productid=Productid; + saveToDb(); + } + public void setProcolor(String Procolor) + { + this.Procolor=Procolor; + saveToDb(); + } + public void setProtype(int Protype) + { + this.Protype=Protype; + saveToDb(); + } + public void setPronumber(int Pronumber) +{ + this.Pronumber=Pronumber; + saveToDb(); +} +public void setPropeople(String Propeople) +{ + this.Propeople=Propeople; + saveToDb(); +} +public void setPtime(String Ptime) +{ + this.Ptime=Ptime; + saveToDb(); +} +public void setCraetedate(String Createdate) +{ + this.Createdate=Createdate; + saveToDb(); +} + public void setStatus(int Status) + { + this.Status=Status; + saveToDb(); + } +//////////////////////////////////////////////////////////////////////////////// + + public void modify(HttpServletRequest request) { + this.Id = ParamUtils.getIntParameter(request, "Id"); + this.Shopid = ParamUtils.getIntParameter(request, "shopid"); + this.Productid = ParamUtils.getIntParameter(request, "productid"); + this.Procolor = ParamUtils.getEscapeHTMLParameter(request, "procolor"); + this.Protype = ParamUtils.getIntParameter(request, "protype"); + this.Pronumber = ParamUtils.getIntParameter(request, "pronumber"); + this.Propeople = ParamUtils.getEscapeHTMLParameter(request, "propeople"); + String ayear = ParamUtils.getEscapeHTMLParameter(request, "Ayear"); + String amonth = ParamUtils.getEscapeHTMLParameter(request, "Amonth"); + String aday = ParamUtils.getEscapeHTMLParameter(request, "Aday"); + this.Ptime = ayear+amonth+aday; + this.Status = FinalConstants.STATUS_NORMAL; + saveToDb(); + } + + private void loadFromDb() throws SellNotFoundException { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(LOAD_SELL_BY_ID); + pstmt.setInt(1,Id); + ResultSet rs = pstmt.executeQuery(); + if (!rs.next()) { + throw new SellNotFoundException("ݱ[SELL]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + this.Id = rs.getInt("Id"); + this.Shopid = rs.getInt("Shopid"); + this.Productid = rs.getInt("Productid"); + this.Procolor = rs.getString("Procolor"); + this.Protype = rs.getInt("Protype"); + this.Pronumber=rs.getInt("Pronumber"); + this.Propeople = rs.getString("Propeople"); + this.Ptime = rs.getString("Ptime"); + this.Createdate = rs.getString("Createdate"); + this.Status = rs.getInt("STATUS"); +} + catch (SQLException sqle) { + throw new SellNotFoundException("ݱ[SELL]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + +} +private void insertIntoDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(INSERT_SELL); + pstmt.setInt(1, this.Id); + pstmt.setInt(2, this.Shopid); + pstmt.setInt(3, this.Productid); + pstmt.setString(4,StringUtils.toChinese(this.Procolor)); + pstmt.setInt(5, this.Protype); + pstmt.setInt(6, this.Pronumber); + pstmt.setString(7, StringUtils.toChinese(this.Propeople)); + pstmt.setString(8, StringUtils.toChinese(this.Ptime)); + pstmt.setString(9, StringUtils.toChinese(this.Createdate)); + pstmt.setInt(10, this.Status); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: DbSell:insertIntoDb()-" + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + } + + private void saveToDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(UPDATE_SELL); + System.out.println(UPDATE_SELL); + pstmt.setInt(1, this.Shopid); + pstmt.setInt(2, this.Productid); + pstmt.setString(3,StringUtils.toChinese(this.Procolor)); + pstmt.setInt(4, this.Protype); + pstmt.setInt(5, this.Pronumber); + pstmt.setString(6, StringUtils.toChinese(this.Propeople)); + pstmt.setString(7, StringUtils.toChinese(this.Ptime)); + pstmt.setInt(8, this.Status); + pstmt.setInt(9, this.Id); + // System.out.print("weiwei"); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: DbSell.java:saveToDb(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} +} diff --git a/18/src/electric/dbs/Dbshop.java b/18/src/electric/dbs/Dbshop.java new file mode 100644 index 0000000..e048a02 --- /dev/null +++ b/18/src/electric/dbs/Dbshop.java @@ -0,0 +1,372 @@ +package electric.dbs; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ + +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import java.text.SimpleDateFormat; +import electric.electricUtils.*; +public class Dbshop + { + + private static final String LOAD_SHOP_BY_ID = + "SELECT * FROM [USER] WHERE [ID]=?"; + + private static final String INSERT_SHOP = + "INSERT INTO [USER] ([Id],[Username],[Password],[Shopname],[Area],[Peopleman],[Mantel],[Shoptel],[Usertype],[Createdate],[Status]) VALUES " + + "(?,?,?,?,?,?,?,?,?,?,?)"; + + private static final String UPDATE_SHOP = + "UPDATE [USER] SET [Username]=?,[Password]=?,[Shopname]=?," + + "[Area]=?,[Peopleman]=?,[Mantel]=?,[Shoptel]=?,[Usertype]=?,[Status]=?" + + " WHERE [Id]=?"; + + private static final String Del_SHOP = + "UPDATE [USER] SET [Status]=? WHERE [Id]=?"; + + + private static final String CLEAR_SHOP = "DELETE FROM [USER] WHERE STATUS=" + + FinalConstants.STATUS_DELETE; + + private int Id; + private String Username; + private String Password; + private String Shopname; + private String Area; + private String Peopleman; + private String Mantel; + private String Shoptel; + private int Usertype; + private String Createdate; + private int Status; + + public Dbshop() + {} + public Dbshop(HttpServletRequest request) { + this.Id = DbSequenceManager.nextID(FinalConstants.T_SHOP); + this.Username = ParamUtils.getEscapeHTMLParameter(request, "username"); + this.Password = ParamUtils.getEscapeHTMLParameter(request, "password"); + this.Shopname = ParamUtils.getEscapeHTMLParameter(request, "shopname"); + this.Area = ParamUtils.getEscapeHTMLParameter(request, "area"); + this.Peopleman = ParamUtils.getEscapeHTMLParameter(request, "peopleman"); + this.Mantel = ParamUtils.getEscapeHTMLParameter(request, "mantel"); + this.Shoptel = ParamUtils.getEscapeHTMLParameter(request, "shoptel"); + this.Usertype = ParamUtils.getIntParameter(request,"usertype"); + SimpleDateFormat simpleDate = new SimpleDateFormat("yyyyMMdd"); + String shiftDateToDate = simpleDate.format(new java.util.Date()); + this.Createdate = shiftDateToDate; + this.Status = FinalConstants.STATUS_NORMAL; + insertIntoDb(); + } + + public Dbshop(int Id) throws ShopNotFoundException { + this.Id = Id; + // System.out.print(Id); + if (Id <= 0) { + return; + } + loadFromDb(); + +} + +protected static Dbshop getInstance(int Id) throws + ShopNotFoundException { + return new Dbshop(Id); +} + +protected void delete() { + setStatus(FinalConstants.STATUS_DELETE); +} + +protected static void clear() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(CLEAR_SHOP); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println( + "SQLException in DbTChatRooms.java:clearTChatRooms(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} + +///////////////////////////////////////////////////////////////// + + public int getId() { + return this.Id; + } + public String getUsername(){ + return this.Username; +} + public String getPassword(){ + return this.Password; +} + + public String getShopname(){ + return this.Shopname; + } + public String getArea(){ + return this.Area; + } + public String getPeopleman(){ + return this.Peopleman; + } + public String getMantel(){ + return this.Mantel; + } + public String getShoptel(){ + return this.Shoptel; + } + public int getUsertype(){ + return this.Usertype; +} + public String getCreatedate(){ + return this.Createdate; + } + public int getStatus(){ + return this.Status; + } + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; + saveToDb(); + } + public void setUsername(String Username){ + this.Username=Username; + saveToDb(); + } + public void setPassword(String Password){ + this.Password=Password; + saveToDb(); + } + public void setShopname(String Shopname){ + this.Shopname=Shopname; + saveToDb(); +} + public void setArea(String Area){ + this.Area=Area; + saveToDb(); +} + + + public void setPeopleman(String Peopleman){ + this.Peopleman=Peopleman; + saveToDb(); + } + public void setMantel(String Mantel){ + this.Mantel=Mantel; + saveToDb(); + } + public void setShoptel(String Shoptel){ + this.Shoptel=Shoptel; + saveToDb(); + } + public void setUsertypee(int Usertype){ + this.Usertype=Usertype; + saveToDb(); +} + public void setCreatedate(String Createdate){ + this.Createdate=Createdate; + saveToDb(); + } + public void setStatus(int Status){ + this.Status=Status; + DELToDb(); + } +//////////////////////////////////////////////////////////////////////////////// + + public void modify(HttpServletRequest request) { + this.Id = ParamUtils.getIntParameter(request, "id"); + this.Username = ParamUtils.getEscapeHTMLParameter(request, "username"); + this.Password = ParamUtils.getEscapeHTMLParameter(request, "password"); + this.Shopname = ParamUtils.getEscapeHTMLParameter(request, "shopname"); + this.Area = ParamUtils.getEscapeHTMLParameter(request, "area"); + this.Peopleman = ParamUtils.getEscapeHTMLParameter(request, "peopleman"); + this.Mantel = ParamUtils.getEscapeHTMLParameter(request, "mantel"); + this.Shoptel = ParamUtils.getEscapeHTMLParameter(request, "shoptel"); + this.Usertype = ParamUtils.getIntParameter(request, "usertype"); + this.Status = FinalConstants.STATUS_NORMAL; + saveToDb(); + } + + private void loadFromDb() throws ShopNotFoundException { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(LOAD_SHOP_BY_ID); + pstmt.setInt(1,Id); + ResultSet rs = pstmt.executeQuery(); + if (!rs.next()) { + throw new ShopNotFoundException("ݱ[SHOP]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + this.Id = rs.getInt("ID"); + this.Username = rs.getString("Username"); + this.Password = rs.getString("Password"); + this.Shopname = rs.getString("Shopname"); + this.Area = rs.getString("Area"); + this.Peopleman = rs.getString("Peopleman"); + this.Mantel = rs.getString("Mantel"); + this.Shoptel = rs.getString("Shoptel"); + this.Usertype = rs.getInt("Usertype"); + this.Createdate = rs.getString("Createdate"); + this.Status = rs.getInt("Status"); +} + catch (SQLException sqle) { + throw new ShopNotFoundException("ݱ[SHOP]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + +} +private void insertIntoDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(INSERT_SHOP); + pstmt.setInt(1, this.Id); + pstmt.setString(2,StringUtils.toChinese(this.Username)); + pstmt.setString(3,StringUtils.toChinese(this.Password)); + pstmt.setString(4,StringUtils.toChinese(this.Shopname)); + pstmt.setString(5,StringUtils.toChinese(this.Area)); + pstmt.setString(6,StringUtils.toChinese(this.Peopleman)); + pstmt.setString(7,StringUtils.toChinese(this.Mantel)); + pstmt.setString(8,StringUtils.toChinese(this.Shoptel)); + pstmt.setInt(9,this.Usertype); + pstmt.setString(10,StringUtils.toChinese(this.Createdate)); + pstmt.setInt(11,this.Status); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: DbShop:insertIntoDb()-" + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + } + + private void saveToDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(UPDATE_SHOP); + System.out.println(UPDATE_SHOP); + pstmt.setString(1,StringUtils.toChinese(this.Username)); + pstmt.setString(2,StringUtils.toChinese(this.Password)); + pstmt.setString(3,StringUtils.toChinese(this.Shopname)); + pstmt.setString(4,StringUtils.toChinese(this.Area)); + pstmt.setString(5,StringUtils.toChinese(this.Peopleman)); + pstmt.setString(6,StringUtils.toChinese(this.Mantel)); + pstmt.setString(7,StringUtils.toChinese(this.Shoptel)); + pstmt.setInt(8, this.Usertype); + pstmt.setInt(9, this.Status); + pstmt.setInt(10, this.Id); + // System.out.print("weiwei"); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: DbShop.java:saveToDb(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} +private void DELToDb() { +Connection con = null; +PreparedStatement pstmt = null; +try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(Del_SHOP); + System.out.println(Del_SHOP); + pstmt.setInt(1, this.Status); + pstmt.setInt(2, this.Id); + pstmt.executeUpdate(); +} +catch (SQLException sqle) { + System.err.println("λ: DbShop.java:DELToDb(): " + sqle); + sqle.printStackTrace(); +} +finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } +} +} + +} diff --git a/18/src/electric/dbs/Dbware.java b/18/src/electric/dbs/Dbware.java new file mode 100644 index 0000000..c96fbf0 --- /dev/null +++ b/18/src/electric/dbs/Dbware.java @@ -0,0 +1,371 @@ +package electric.dbs; +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import java.text.SimpleDateFormat; +import electric.electricUtils.*; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ + +public class Dbware + { + + private static final String LOAD_WARE_BY_ID = + "SELECT * FROM [WARE] WHERE [Id]=?"; + + private static final String INSERT_WARE = + "INSERT INTO [WARE] ([Id],[Pname],[Pmodel],[Pcost],[Pheft]," + + "[Pfacturer],[Pnote],[Createdate],[STATUS]) VALUES " + + "(?,?,?,?,?,?,?,?,?)"; + + private static final String UPDATE_WARE = + "UPDATE [WARE] SET [Pname]=?,[Pmodel]=?,[Pcost]=?,[Pheft]=?," + + "[Pfacturer]=?,[Pnote]=?,[Status]=? WHERE [Id]=?"; + + private static final String Del_ware = + "UPDATE [WARE] SET [Status]=? WHERE [Id]=?"; + + private static final String CLEAR_WARE = "DELETE FROM [WARE] WHERE STATUS=" + + FinalConstants.STATUS_DELETE; + + private int Id; + private String Pname; + private String Pmodel; + private String Pcost; + private String Pheft; + private String Pfacturer; + private String Pnote; + private String Createdate; + private int Status; + public Dbware(HttpServletRequest request) { + this.Id = DbSequenceManager.nextID(FinalConstants.T_WARE); + this.Pname = ParamUtils.getEscapeHTMLParameter(request, "pname"); + this.Pmodel = ParamUtils.getEscapeHTMLParameter(request, "pmodel"); + this.Pcost = ParamUtils.getEscapeHTMLParameter(request, "pcost"); + this.Pheft = ParamUtils.getEscapeHTMLParameter(request, "pheft"); + this.Pfacturer = ParamUtils.getEscapeHTMLParameter(request, "pfacturer"); + this.Pnote = ParamUtils.getEscapeHTMLParameter(request, "pnote"); + SimpleDateFormat simpleDate = new SimpleDateFormat("yyyyMMdd"); + String shiftDateToDate = simpleDate.format(new java.util.Date()); + this.Createdate = shiftDateToDate; + this.Status = FinalConstants.STATUS_NORMAL; + insertIntoDb(); + } + public Dbware() + {} + public Dbware(int Id) throws WareNotFoundException { + this.Id = Id; + if (Id <= 0) { + return; + } + loadFromDb(); +} + +public static Dbware getInstance(int Id) throws + WareNotFoundException { + return new Dbware(Id); +} + +protected void delete() { + setStatus(FinalConstants.STATUS_DELETE); +} + +protected static void clear() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(CLEAR_WARE); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println( + "SQLException in DbTChatRooms.java:clearTChatRooms(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} + +///////////////////////////////////////////////////////////////// + + public int getId() { + return this.Id; + } + + public String getPname() + { + return this.Pname; + } + + public String getPmodel() + { + return this.Pmodel; + } + + public String getPcost() + { + return this.Pcost; + } + + public String getPheft() + { + return this.Pheft; + } + + public String getPfacturer() + { + return this.Pfacturer; + } + + public String getPnote() + { + return this.Pnote; + } + public String getCreateDate() + { + return this.Createdate; + } + public int getStatus() + { + return this.Status; + } + + + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; + saveToDb(); + } + public void setPname(String Pname) + { + this.Pname=Pname; + saveToDb(); + } + public void setPmodel(String Pmodel) + { + this.Pmodel=Pmodel; + saveToDb(); + } + + public void setPcost(String Pcost) + { + this.Pcost=Pcost; + saveToDb(); + } + + public void setPheft(String Pheft) + { + this.Pheft=Pheft; + saveToDb(); + } + + public void setPfacturer(String Pfacturer) + { + this.Pfacturer=Pfacturer; + saveToDb(); + } + + public void setPnote(String pnote) + { + this.Pnote=Pnote; + saveToDb(); + } + public void setCreateDate(String CreateDate) + { + this.Createdate=CreateDate; + saveToDb(); + } + public void setStatus(int status) + { + this.Status=status; + DELToDb(); + } +//////////////////////////////////////////////////////////////////////////////// + +public void modify(HttpServletRequest request) { + this.Id = ParamUtils.getIntParameter(request, "id"); + this.Pname = ParamUtils.getEscapeHTMLParameter(request, "pname"); + this.Pmodel = ParamUtils.getEscapeHTMLParameter(request, "pmodel"); + this.Pcost = ParamUtils.getEscapeHTMLParameter(request, "pcost"); + this.Pheft = ParamUtils.getEscapeHTMLParameter(request, "pheft"); + this.Pfacturer = ParamUtils.getEscapeHTMLParameter(request, "pfacturer"); + this.Pnote = ParamUtils.getEscapeHTMLParameter(request, "pnote"); + this.Status = FinalConstants.STATUS_NORMAL; + saveToDb(); + } + + private void loadFromDb() throws WareNotFoundException { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(LOAD_WARE_BY_ID); + pstmt.setInt(1,Id); + ResultSet rs = pstmt.executeQuery(); + if (!rs.next()) { + throw new WareNotFoundException("ݱ[ware]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + + this.Id = rs.getInt("Id"); + this.Pname= rs.getString("Pname"); + this.Pmodel=rs.getString("Pmodel"); + this.Pcost=rs.getString("Pcost"); + this.Pheft=rs.getString("Pheft"); + this.Pfacturer=rs.getString("Pfacturer"); + this.Pnote=rs.getString("Pnote"); + this.Createdate=rs.getString("Createdate"); + this.Status=rs.getInt("Status"); +} + catch (SQLException sqle) { + throw new WareNotFoundException("ݱ[WARE]жȡûʧ,ȡûID:[ " + + Id + "]!"); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + +} +private void insertIntoDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(INSERT_WARE); + pstmt.setInt(1, this.Id); + pstmt.setString(2,StringUtils.toChinese(this.Pname)); + pstmt.setString(3,StringUtils.toChinese(this.Pmodel)); + pstmt.setString(4, StringUtils.toChinese(this.Pcost)); + pstmt.setString(5, StringUtils.toChinese(this.Pheft)); + pstmt.setString(6, StringUtils.toChinese(this.Pfacturer)); + pstmt.setString(7, StringUtils.toChinese(this.Pnote)); + pstmt.setString(8, StringUtils.toChinese(this.Createdate)); + pstmt.setInt(9, this.Status); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: Dbware:insertIntoDb()-" + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + } + + private void saveToDb() { + Connection con = null; + PreparedStatement pstmt = null; + try { + + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(UPDATE_WARE); + System.out.println(UPDATE_WARE); + pstmt.setString(1, StringUtils.toChinese(this.Pname)); + pstmt.setString(2, StringUtils.toChinese(this.Pmodel)); + pstmt.setString(3, StringUtils.toChinese(this.Pcost)); + pstmt.setString(4, StringUtils.toChinese(this.Pheft)); + pstmt.setString(5, StringUtils.toChinese(this.Pfacturer)); + pstmt.setString(6, StringUtils.toChinese(this.Pnote)); + pstmt.setInt(7, this.Status); + pstmt.setInt(8, this.Id); + pstmt.executeUpdate(); + } + catch (SQLException sqle) { + System.err.println("λ: DbWare.java:saveToDb(): " + sqle); + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} + +private void DELToDb() { +Connection con = null; +PreparedStatement pstmt = null; +try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(Del_ware); + System.out.println(Del_ware); + pstmt.setInt(1, this.Status); + pstmt.setInt(2, this.Id); + pstmt.executeUpdate(); +} +catch (SQLException sqle) { + System.err.println("λ: DbShop.java:DELToDb(): " + sqle); + sqle.printStackTrace(); +} +finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } +} +} + +} + + + diff --git a/18/src/electric/dbs/MessNotFoundException.java b/18/src/electric/dbs/MessNotFoundException.java new file mode 100644 index 0000000..20857e2 --- /dev/null +++ b/18/src/electric/dbs/MessNotFoundException.java @@ -0,0 +1,48 @@ +package electric.dbs; + +import java.io.*; + +public class MessNotFoundException + extends Exception { + + private Throwable nestedThrowable = null; + + public MessNotFoundException() { + super(); + } + + public MessNotFoundException(String msg) { + super(msg); + } + + public MessNotFoundException(Throwable nestedThrowable) { + this.nestedThrowable = nestedThrowable; + } + + public MessNotFoundException(String msg, Throwable nestedThrowable) { + super(msg); + this.nestedThrowable = nestedThrowable; + } + + public void printStackTrace() { + super.printStackTrace(); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(); + } + } + + public void printStackTrace(PrintStream ps) { + super.printStackTrace(ps); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(ps); + } + } + + public void printStackTrace(PrintWriter pw) { + super.printStackTrace(pw); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(pw); + } + } + +} diff --git a/18/src/electric/dbs/Messdb.java b/18/src/electric/dbs/Messdb.java new file mode 100644 index 0000000..aa05391 --- /dev/null +++ b/18/src/electric/dbs/Messdb.java @@ -0,0 +1,145 @@ +package electric.dbs; +import electric.dbs.Dbnews; +import electric.dbs.mess; +import java.util.Collection; +import java.util.ArrayList; +import java.sql.SQLException; +import java.sql.ResultSet; +import java.util.Iterator; +import java.sql.*; +import javax.servlet.http.*; +import electric.electricUtils.*; +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ +public class Messdb { + private static final String LOAD_SELL_BY_ID = + "SELECT * FROM [MESS] WHERE [Id]=?"; + + private int Id=0; + + public Messdb() { + } + ///// + + public mess show(int Id) { + this.Id = Id; + mess mes = new mess(); + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(LOAD_SELL_BY_ID); + pstmt.setInt(1, Id); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) { + mes.setMname(rs.getString(2)); + mes.setMtext(rs.getString(3)); + mes.setMnote(rs.getString(4)); + mes.setCreateDate(rs.getString(5)); + } + } + catch (SQLException sqle) { + System.out.println("rs has Exceptione"); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + return mes; + + } + + //// + public int selectsql(int st) + { + String countSql="SELECT COUNT(*) FROM MESS WHERE STATUS<>1"; + Connection co=null; + ResultSet r = null; + PreparedStatement pstm = null; + int size=0; + int sizepa=0; + try { + co = DbConnectionManager.getConnection(); + pstm = co.prepareStatement(countSql); + r = pstm.executeQuery(); + while (r.next()) { + size = r.getInt(1); + sizepa=(int)size/st; + if(size%st>0) + { + sizepa=sizepa+1; + } + } + r.close(); + r=null; + pstm.close(); + pstm=null; + co.close(); + co=null; + + + } + + catch (SQLException sqle) { + System.err.println(sqle.getMessage()+"333"); + } + return sizepa; + } + public Collection select(int step, int page) { + Collection coll = new ArrayList(); + Connection con=null; + ResultSet rs=null; + PreparedStatement pstmt=null; + int tip = step * (page - 1); + try { + String sql="SELECT * FROM [MESS] WHERE STATUS<>1"; + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = pstmt.executeQuery(); + System.out.print(tip); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= step; i++) { + mess mess = new mess(); + mess.setId(rs.getInt(1)); + mess.setMname(rs.getString(2)); + mess.setMtext(rs.getString(3)); + mess.setMnote(rs.getString(4)); + mess.setCreateDate(rs.getString(5)); + mess.setStatus(rs.getInt(6)); + coll.add(mess); + } + rs.close(); + rs=null; + pstmt.close(); + pstmt=null; + con.close(); + con=null; + } catch (SQLException ex) { + System.out.println(ex.getMessage()+"666"); + } finally { + return coll; + } + } +} diff --git a/18/src/electric/dbs/MotifBean.java b/18/src/electric/dbs/MotifBean.java new file mode 100644 index 0000000..a74d81c --- /dev/null +++ b/18/src/electric/dbs/MotifBean.java @@ -0,0 +1,15 @@ +package electric.dbs; + +public class MotifBean +{ + private String sample = "Start value"; + + public String getSample() { + return this.sample; + } + + public void setSample(String newValue) { + if (newValue != null) + this.sample = newValue; + } +} \ No newline at end of file diff --git a/18/src/electric/dbs/NewsNotFoundException.java b/18/src/electric/dbs/NewsNotFoundException.java new file mode 100644 index 0000000..3d72bca --- /dev/null +++ b/18/src/electric/dbs/NewsNotFoundException.java @@ -0,0 +1,48 @@ +package electric.dbs; + +import java.io.*; + +public class NewsNotFoundException + extends Exception { + + private Throwable nestedThrowable = null; + + public NewsNotFoundException() { + super(); + } + + public NewsNotFoundException(String msg) { + super(msg); + } + + public NewsNotFoundException(Throwable nestedThrowable) { + this.nestedThrowable = nestedThrowable; + } + + public NewsNotFoundException(String msg, Throwable nestedThrowable) { + super(msg); + this.nestedThrowable = nestedThrowable; + } + + public void printStackTrace() { + super.printStackTrace(); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(); + } + } + + public void printStackTrace(PrintStream ps) { + super.printStackTrace(ps); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(ps); + } + } + + public void printStackTrace(PrintWriter pw) { + super.printStackTrace(pw); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(pw); + } + } + +} diff --git a/18/src/electric/dbs/Newsdb.java b/18/src/electric/dbs/Newsdb.java new file mode 100644 index 0000000..cb1d0c7 --- /dev/null +++ b/18/src/electric/dbs/Newsdb.java @@ -0,0 +1,102 @@ +package electric.dbs; +import electric.dbs.Dbnews; +import electric.dbs.news; +import java.util.Collection; +import java.util.ArrayList; +import java.sql.SQLException; +import java.sql.ResultSetMetaData; +import java.sql.ResultSet; +import java.util.Iterator; +import java.sql.*; +import javax.servlet.http.*; +import electric.electricUtils.*; +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ +public class Newsdb { + public Newsdb() { + } + public int selectsql(int st) + { + String countSql="SELECT COUNT(*) FROM NEWS WHERE STATUS<>1"; + Connection co=null; + ResultSet r = null; + PreparedStatement pstm = null; + int size=0; + int sizepa=0; + try { + co = DbConnectionManager.getConnection(); + pstm = co.prepareStatement(countSql); + r = pstm.executeQuery(); + while (r.next()) { + size = r.getInt(1); + sizepa=(int)size/st; + if(size%st>0) + { + sizepa=sizepa+1; + } + } + + r.close(); + r=null; + pstm.close(); + pstm=null; + co.close(); + co=null; + } + + catch (SQLException sqle) { + System.err.println(sqle.getMessage()+"333"); + } + return sizepa; + } + public Collection select(int step, int page) { + Collection coll = new ArrayList(); + Connection con=null; + ResultSet rs=null; + PreparedStatement pstmt=null; + int tip = step * (page - 1); + try { + String sql="SELECT * FROM [NEWS] WHERE STATUS<>1"; + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = pstmt.executeQuery(); + System.out.print(tip); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= step; i++) { + news news = new news(); + news.setId(rs.getInt(1)); + news.setMotif(rs.getString(2)); + news.setKithepeople(rs.getString(3)); + news.setContent(rs.getString(4)); + news.setCreateDate(rs.getString(5)); + news.setCreatepeople(rs.getInt(6)); + news.setStatus(rs.getInt(6)); + + coll.add(news); + } + + rs.close(); + rs=null; + pstmt.close(); + pstmt=null; + con.close(); + con=null; + } catch (SQLException ex) { + System.out.println(ex.getMessage()+"666"); + } finally { + return coll; + } + } + } \ No newline at end of file diff --git a/18/src/electric/dbs/Newsdb.java~1~ b/18/src/electric/dbs/Newsdb.java~1~ new file mode 100644 index 0000000..21ebcf7 --- /dev/null +++ b/18/src/electric/dbs/Newsdb.java~1~ @@ -0,0 +1,62 @@ +package electric.dbs; +import electric.dbs.Dbnews; +import java.util.Collection; +import java.util.ArrayList; +import java.sql.SQLException; +import java.sql.ResultSet; +import java.util.Iterator; +import java.sql.*; +import javax.servlet.http.*; +import electric.electricUtils.*; +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ +public class Newsdb { + public Newsdb() { + } + + public Collection select(int step, int page) { + Collection coll = new ArrayList(); + Connection con=null; + ResultSet rs=null; + PreparedStatement pstmt=null; + int tip = step * (page - 1); + try { + String sql="SELECT * FROM [NEWS] WHERE STATUS<>1"; + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = pstmt.executeQuery(); + System.out.print(tip); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= step; i++) { + Dbnews news = new Dbnews(); + news.setId(rs.getInt(1)); + news.setMotif(rs.getString(2)); + news.setKithepeople(rs.getString(3)); + news.setContent(rs.getString(4)); + news.setCreateDate(rs.getString(5)); + news.setCreatepeople(rs.getInt(6)); + news.setModifyDate(rs.getString(7)); + news.setModifypeople(rs.getInt(8)); + news.setStatus(rs.getInt(9)); + System.out.print(rs.getString(5)+"333"); + coll.add(news); + } + } catch (SQLException ex) { + System.out.println(ex.getMessage()); + } finally { + return coll; + } + } +} \ No newline at end of file diff --git a/18/src/electric/dbs/ProductNotFoundException.java b/18/src/electric/dbs/ProductNotFoundException.java new file mode 100644 index 0000000..dc97d32 --- /dev/null +++ b/18/src/electric/dbs/ProductNotFoundException.java @@ -0,0 +1,47 @@ +package electric.dbs; + +import java.io.*; + +public class ProductNotFoundException + extends Exception { + + private Throwable nestedThrowable = null; + + public ProductNotFoundException() { + super(); + } + + public ProductNotFoundException(String msg) { + super(msg); + } + + public ProductNotFoundException(Throwable nestedThrowable) { + this.nestedThrowable = nestedThrowable; + } + + public ProductNotFoundException(String msg, Throwable nestedThrowable) { + super(msg); + this.nestedThrowable = nestedThrowable; + } + + public void printStackTrace() { + super.printStackTrace(); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(); + } + } + + public void printStackTrace(PrintStream ps) { + super.printStackTrace(ps); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(ps); + } + } + + public void printStackTrace(PrintWriter pw) { + super.printStackTrace(pw); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(pw); + } + } +} diff --git a/18/src/electric/dbs/Productdb.java b/18/src/electric/dbs/Productdb.java new file mode 100644 index 0000000..e030764 --- /dev/null +++ b/18/src/electric/dbs/Productdb.java @@ -0,0 +1,97 @@ +package electric.dbs; +import electric.dbs.Dbproduct; +import java.util.Collection; +import java.util.ArrayList; +import java.sql.SQLException; +import java.sql.ResultSet; +import java.util.Iterator; +import java.sql.*; +import javax.servlet.http.*; +import electric.electricUtils.*; +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ +public class Productdb { + public Productdb() { + } + public int selectsql(int st) + { + String countSql="SELECT COUNT(*) FROM PRODUCT WHERE STATUS<>1"; + Connection co=null; + ResultSet r = null; + PreparedStatement pstm = null; + int size=0; + int sizepa=0; + try { + co = DbConnectionManager.getConnection(); + pstm = co.prepareStatement(countSql); + r = pstm.executeQuery(); + while (r.next()) { + size = r.getInt(1); + sizepa=(int)size/st; + if(size%st>0) + { + sizepa=sizepa+1; + } + } + r.close(); + r=null; + pstm.close(); + pstm=null; + co.close(); + co=null; + } + + catch (SQLException sqle) { + System.err.println(sqle.getMessage()+"333"); + } + return sizepa; + } + public Collection select(int step, int page) { + Collection coll = new ArrayList(); + Connection con=null; + ResultSet rs=null; + PreparedStatement pstmt=null; + int tip = step * (page - 1); + try { + String sql="SELECT * FROM [PRODUCT] WHERE STATUS<>1 ORDER BY Id DESC"; + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = pstmt.executeQuery(); + System.out.print(tip); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= step; i++) { + product product = new product(); + product.setId(rs.getInt(1)); + product.setProductname(rs.getString(2)); + product.setProductprice(rs.getString(3)); + product.setProductform(rs.getString(4)); + product.setProductnote(rs.getString(5)); + product.setPic(rs.getString(6)); + product.setStatus(rs.getInt(7)); + coll.add(product); + } + rs.close(); + rs=null; + pstmt.close(); + pstmt=null; + con.close(); + con=null; + } catch (SQLException ex) { + System.out.println(ex.getMessage()+"666"); + } finally { + return coll; + } + } +} diff --git a/18/src/electric/dbs/SellNotFoundException.java b/18/src/electric/dbs/SellNotFoundException.java new file mode 100644 index 0000000..7b125d7 --- /dev/null +++ b/18/src/electric/dbs/SellNotFoundException.java @@ -0,0 +1,48 @@ +package electric.dbs; + +import java.io.*; + +public class SellNotFoundException + extends Exception { + + private Throwable nestedThrowable = null; + + public SellNotFoundException() { + super(); + } + + public SellNotFoundException(String msg) { + super(msg); + } + + public SellNotFoundException(Throwable nestedThrowable) { + this.nestedThrowable = nestedThrowable; + } + + public SellNotFoundException(String msg, Throwable nestedThrowable) { + super(msg); + this.nestedThrowable = nestedThrowable; + } + + public void printStackTrace() { + super.printStackTrace(); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(); + } + } + + public void printStackTrace(PrintStream ps) { + super.printStackTrace(ps); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(ps); + } + } + + public void printStackTrace(PrintWriter pw) { + super.printStackTrace(pw); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(pw); + } + } + +} diff --git a/18/src/electric/dbs/Selldb.java b/18/src/electric/dbs/Selldb.java new file mode 100644 index 0000000..07741bd --- /dev/null +++ b/18/src/electric/dbs/Selldb.java @@ -0,0 +1,102 @@ +package electric.dbs; +import electric.dbs.Dbsell; +import electric.dbs.sell; +import java.util.Collection; +import java.util.ArrayList; +import java.sql.SQLException; +import java.sql.ResultSet; +import java.util.Iterator; +import java.sql.*; +import javax.servlet.http.*; +import electric.electricUtils.*; +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ +public class Selldb { + public Selldb() { + } + public int selectsql(int st) + { + String countSql="SELECT COUNT(*) FROM SELL WHERE STATUS<>1"; + Connection co=null; + ResultSet r = null; + PreparedStatement pstm = null; + int size=0; + int sizepa=0; + try { + co = DbConnectionManager.getConnection(); + pstm = co.prepareStatement(countSql); + r = pstm.executeQuery(); + while (r.next()) { + size = r.getInt(1); + sizepa=(int)size/st; + if(size%st>0) + { + sizepa=sizepa+1; + } + } + r.close(); + r=null; + pstm.close(); + pstm=null; + co.close(); + co=null; + } + + catch (SQLException sqle) { + System.err.println(sqle.getMessage()+"333"); + } + return sizepa; + } + public Collection select(int step, int page) { + Collection coll = new ArrayList(); + Connection con=null; + ResultSet rs=null; + PreparedStatement pstmt=null; + int tip = step * (page - 1); + try { + String sql="SELECT * FROM [SELL] WHERE STATUS<>1"; + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = pstmt.executeQuery(); + System.out.print(tip); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= step; i++) { + sell sell = new sell(); + sell.setId(rs.getInt(1)); + sell.setShopid(rs.getInt(2)); + sell.setProductid(rs.getInt(3)); + sell.setProcolor(rs.getString(4)); + sell.setProtype(rs.getInt(5)); + sell.setPronumber(rs.getInt(6)); + sell.setPropeople(rs.getString(7)); + sell.setPtime(rs.getString(8)); + sell.setCraetedate(rs.getString(9)); + sell.setStatus(rs.getInt(10)); + coll.add(sell); + } + + rs.close(); + rs=null; + pstmt.close(); + pstmt=null; + con.close(); + con=null; + } catch (SQLException ex) { + System.out.println(ex.getMessage()+"666"); + } finally { + return coll; + } + } +} diff --git a/18/src/electric/dbs/ShopNotFoundException.java b/18/src/electric/dbs/ShopNotFoundException.java new file mode 100644 index 0000000..40c8c19 --- /dev/null +++ b/18/src/electric/dbs/ShopNotFoundException.java @@ -0,0 +1,48 @@ +package electric.dbs; + +import java.io.*; + +public class ShopNotFoundException + extends Exception { + + private Throwable nestedThrowable = null; + + public ShopNotFoundException() { + super(); + } + + public ShopNotFoundException(String msg) { + super(msg); + } + + public ShopNotFoundException(Throwable nestedThrowable) { + this.nestedThrowable = nestedThrowable; + } + + public ShopNotFoundException(String msg, Throwable nestedThrowable) { + super(msg); + this.nestedThrowable = nestedThrowable; + } + + public void printStackTrace() { + super.printStackTrace(); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(); + } + } + + public void printStackTrace(PrintStream ps) { + super.printStackTrace(ps); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(ps); + } + } + + public void printStackTrace(PrintWriter pw) { + super.printStackTrace(pw); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(pw); + } + } + +} diff --git a/18/src/electric/dbs/Shopdb.java b/18/src/electric/dbs/Shopdb.java new file mode 100644 index 0000000..adff462 --- /dev/null +++ b/18/src/electric/dbs/Shopdb.java @@ -0,0 +1,150 @@ +package electric.dbs; +import electric.dbs.Dbshop; +import electric.dbs.shop; +import java.util.Collection; +import java.util.ArrayList; +import java.sql.SQLException; +import java.sql.ResultSet; +import java.util.Iterator; +import java.sql.*; +import javax.servlet.http.*; +import electric.electricUtils.*; +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ +public class Shopdb { + public Shopdb() { + } + public int selectsql(int st) + { + String countSql="SELECT COUNT(*) FROM [USER] WHERE STATUS<>1"; + Connection co=null; + ResultSet r = null; + PreparedStatement pstm = null; + int size=0; + int sizepa=0; + try { + co = DbConnectionManager.getConnection(); + pstm = co.prepareStatement(countSql); + r = pstm.executeQuery(); + while (r.next()) { + size = r.getInt(1); + sizepa=(int)size/st; + if(size%st>0) + { + sizepa=sizepa+1; + } + } + r.close(); + r=null; + pstm.close(); + pstm=null; + co.close(); + co=null; + } + catch (SQLException sqle) { + System.err.println(sqle.getMessage()+"333"); + } + return sizepa; + } + public Collection select(int step, int page) { + Collection coll = new ArrayList(); + Connection con=null; + ResultSet rs=null; + PreparedStatement pstmt=null; + int tip = step * (page - 1); + try { + String sql="SELECT * FROM [USER] WHERE STATUS<>1"; + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = pstmt.executeQuery(); + System.out.print(tip); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= step; i++) { + shop shop = new shop(); + shop.setId(rs.getInt(1)); + shop.setUsername(rs.getString(2)); + shop.setPassword(rs.getString(3)); + shop.setShopname(rs.getString(4)); + shop.setArea(rs.getString(5)); + shop.setPeopleman(rs.getString(6)); + shop.setMantel(rs.getString(7)); + shop.setShoptel(rs.getString(8)); + shop.setUsertypee(rs.getInt(9)); + shop.setCreatedate(rs.getString(10)); + shop.setStatus(rs.getInt(11)); + coll.add(shop); + } + + rs.close(); + rs=null; + pstmt.close(); + pstmt=null; + con.close(); + con=null; + } catch (SQLException ex) { + System.out.println(ex.getMessage()+"666"); + } finally { + return coll; + } + } + public Collection select_chain(int step, int page) { + Collection coll = new ArrayList(); + Connection con=null; + ResultSet rs=null; + PreparedStatement pstmt=null; + int tip = step * (page - 1); + try { + String sql="SELECT * FROM [USER] WHERE STATUS<>1 and Usertype=1"; + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = pstmt.executeQuery(); + System.out.print(tip); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= step; i++) { + shop shop = new shop(); + shop.setId(rs.getInt(1)); + shop.setUsername(rs.getString(2)); + shop.setPassword(rs.getString(3)); + shop.setShopname(rs.getString(4)); + shop.setArea(rs.getString(5)); + shop.setPeopleman(rs.getString(6)); + shop.setMantel(rs.getString(7)); + shop.setShoptel(rs.getString(8)); + shop.setUsertypee(rs.getInt(9)); + shop.setCreatedate(rs.getString(10)); + shop.setStatus(rs.getInt(11)); + coll.add(shop); + } + + rs.close(); + rs=null; + pstmt.close(); + pstmt=null; + con.close(); + con=null; + } catch (SQLException ex) { + System.out.println(ex.getMessage()+"666"); + } finally { + return coll; + } + } + +} diff --git a/18/src/electric/dbs/WareNotFoundException.java b/18/src/electric/dbs/WareNotFoundException.java new file mode 100644 index 0000000..59f9305 --- /dev/null +++ b/18/src/electric/dbs/WareNotFoundException.java @@ -0,0 +1,48 @@ +package electric.dbs; + +import java.io.*; + +public class WareNotFoundException + extends Exception { + + private Throwable nestedThrowable = null; + + public WareNotFoundException() { + super(); + } + + public WareNotFoundException(String msg) { + super(msg); + } + + public WareNotFoundException(Throwable nestedThrowable) { + this.nestedThrowable = nestedThrowable; + } + + public WareNotFoundException(String msg, Throwable nestedThrowable) { + super(msg); + this.nestedThrowable = nestedThrowable; + } + + public void printStackTrace() { + super.printStackTrace(); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(); + } + } + + public void printStackTrace(PrintStream ps) { + super.printStackTrace(ps); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(ps); + } + } + + public void printStackTrace(PrintWriter pw) { + super.printStackTrace(pw); + if (nestedThrowable != null) { + nestedThrowable.printStackTrace(pw); + } + } + +} diff --git a/18/src/electric/dbs/mess.java b/18/src/electric/dbs/mess.java new file mode 100644 index 0000000..bdcc544 --- /dev/null +++ b/18/src/electric/dbs/mess.java @@ -0,0 +1,67 @@ +package electric.dbs; +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import java.text.SimpleDateFormat; +import electric.electricUtils.*; +public class mess + { + private int Id; + private String Mname; + private String Mtext; + private String Mnote; + private String CreateDate; + private int Status; + public mess() + {} + public int getId() { + return this.Id; + } + public String getMname() + { + return this.Mname; + } + public String getMtext() + { + return this.Mtext; + } + public String getMnote() + { + return this.Mnote; + } + public String getCreateDate() + { + return this.CreateDate; + } + public int getStatus() + { + return this.Status; + } + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; + } + public void setMname(String Mname) + { + this.Mname=Mname; + } + public void setMtext(String Mtext) + { + this.Mtext=Mtext; + } + public void setMnote(String Mnote) + { + this.Mnote=Mnote; + } + public void setCreateDate(String CreateDate) + { + this.CreateDate=CreateDate; + } + public void setStatus(int Status) + { + this.Status=Status; + } +//////////////////////////////////////////////////////////////////////////////// +} diff --git a/18/src/electric/dbs/news.java b/18/src/electric/dbs/news.java new file mode 100644 index 0000000..d87e050 --- /dev/null +++ b/18/src/electric/dbs/news.java @@ -0,0 +1,78 @@ +package electric.dbs; +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import java.text.SimpleDateFormat; +import electric.electricUtils.*; +public class news + { + private int Id; + private String Motif; + private String Kithepeople; + private String Content; + private String CreateDate; + private int Createpeople; + private int Status; + public news() + {} + +///////////////////////////////////////////////////////////////// + public int getId() { + return this.Id; + } + public String getMotif() + { + return this.Motif; + } + public String getKithepeople() + { + return this.Kithepeople; + } + public String getContent() + { + return this.Content; + } + public String getCreateDate() + { + return this.CreateDate; + } + public int getCreatepeople() + { + return this.Createpeople; + } + public int getStatus() + { + return this.Status; + } + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; + } + public void setMotif(String Motif) + { + this.Motif=Motif; + } + public void setKithepeople(String Kithepeople) + { + this.Kithepeople=Kithepeople; + } + public void setContent(String Content) + { + this.Content=Content; + } + public void setCreateDate(String CreateDate) + { + this.CreateDate=CreateDate; + } + public void setCreatepeople(int Createpeople) + { + this.Createpeople=Createpeople; + } + public void setStatus(int Status) + { + this.Status=Status; + } +//////////////////////////////////////////////////////////////////////////////// +} diff --git a/18/src/electric/dbs/product.java b/18/src/electric/dbs/product.java new file mode 100644 index 0000000..2e894f4 --- /dev/null +++ b/18/src/electric/dbs/product.java @@ -0,0 +1,84 @@ +package electric.dbs; +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import electric.electricUtils.*; +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ +public class product + { + private int Id; + private String Productname; + private String Productprice; + private String Productform; + private String Productnote; + private String Pic; + private int Status; + public product() + {} + public int getId() { + return this.Id; + } + public String getProductname() + { + return this.Productname; + } + public String getProductprice() + { + return this.Productprice; + } + public String getProductform() + { + return this.Productform; + } + public String getProductnote() + { + return this.Productnote; + } + public String getPic() + { + return this.Pic; + } + public int getStatus() + { + return this.Status; + } + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; + } + public void setProductname(String Productname) + { + this.Productname=Productname; + } + public void setProductprice(String Productprice) + { + this.Productprice=Productprice; + } + public void setProductform(String Productform) + { + this.Productform=Productform; + } + public void setProductnote(String Productnote) + { + this.Productnote=Productnote; + } + public void setPic(String Pic) + { + this.Pic=Pic; + } + public void setStatus(int Status) + { + this.Status=Status; + } +//////////////////////////////////////////////////////////////////////////////// +} + diff --git a/18/src/electric/dbs/sell.java b/18/src/electric/dbs/sell.java new file mode 100644 index 0000000..22bccb8 --- /dev/null +++ b/18/src/electric/dbs/sell.java @@ -0,0 +1,108 @@ +package electric.dbs; +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import java.text.SimpleDateFormat; +import electric.electricUtils.*; +public class sell + { + private int Id; + private int Shopid; + private int Productid; + private String Procolor; + private int Protype; + private int Pronumber; + private String Propeople; + private String Ptime; + private String Createdate; + private int Status; + + public sell() + {} + +///////////////////////////////////////////////////////////////// + public int getId() { + return this.Id; + } + public int getShopid() { + return this.Shopid; + } + public int getProductid() + { + return this.Productid; + } + public String getProcolor() + { + return this.Procolor; + } + public int getProtype() + { + return this.Protype; + } + public int getPronumber() + { + return this.Pronumber; + } + public String getPropeople() + { + return this.Propeople; + } + public String getPtime() + { + return this.Ptime; + } + public String getCraetedate() + { + return this.Createdate; + } + public int getStatus() + { + return this.Status; + } + + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; + } + public void setShopid(int Shopid) +{ + this.Shopid=Shopid; +} + + public void setProductid(int Productid) +{ + this.Productid=Productid; +} +public void setProcolor(String Procolor) +{ + this.Procolor=Procolor; +} +public void setProtype(int Protype) +{ + this.Protype=Protype; +} +public void setPronumber(int Pronumber) +{ + this.Pronumber=Pronumber; +} +public void setPropeople(String Propeople) +{ + this.Propeople=Propeople; +} +public void setPtime(String Ptime) +{ + this.Ptime=Ptime; +} +public void setCraetedate(String Createdate) +{ + this.Createdate=Createdate; +} +public void setStatus(int Status) +{ + this.Status=Status; +} + +//////////////////////////////////////////////////////////////////////////////// +} diff --git a/18/src/electric/dbs/sell.jbx b/18/src/electric/dbs/sell.jbx new file mode 100644 index 0000000..f048405 --- /dev/null +++ b/18/src/electric/dbs/sell.jbx @@ -0,0 +1,26 @@ +[PropertyInfo] +craetedate,String,false,false, , ,true, +Createdate,String,false,false, , ,false, +id,int,false,false, , ,true, +Id,int,false,false, , ,false, +procolor,String,false,false, , ,true, +Procolor,String,false,false, , ,false, +productid,int,false,false, , ,true, +Productid,int,false,false, , ,false, +pronumber,int,false,false, , ,true, +Pronumber,int,false,false, , ,false, +propeople,String,false,false, , ,true, +Propeople,String,false,false, , ,false, +protype,int,false,false, , ,true, +Protype,int,false,false, , ,false, +ptime,String,false,false, , ,true, +Ptime,String,false,false, , ,false, +shopid,int,false,false, , ,true, +Shopid,int,false,false, , ,false, +status,int,false,false, , ,true, +Status,int,false,false, , ,false, +[IconNames] + + + + diff --git a/18/src/electric/dbs/shop.java b/18/src/electric/dbs/shop.java new file mode 100644 index 0000000..a709a03 --- /dev/null +++ b/18/src/electric/dbs/shop.java @@ -0,0 +1,105 @@ +package electric.dbs; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ + +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import java.text.SimpleDateFormat; +import electric.electricUtils.*; +public class shop + { + private int Id; + private String Username; + private String Password; + private String Shopname; + private String Area; + private String Peopleman; + private String Mantel; + private String Shoptel; + private int Usertype; + private String Createdate; + private int Status; + public shop() + {} + public int getId() { + return this.Id; + } + public String getUsername(){ + return this.Username; +} + public String getPassword(){ + return this.Password; +} + + public String getShopname(){ + return this.Shopname; + } + public String getArea(){ + return this.Area; + } + public String getPeopleman(){ + return this.Peopleman; + } + public String getMantel(){ + return this.Mantel; + } + public String getShoptel(){ + return this.Shoptel; + } + public int getUsertype(){ + return this.Usertype; +} + public String getCreatedate(){ + return this.Createdate; + } + public int getStatus(){ + return this.Status; + } + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; +} + public void setUsername(String Username){ + this.Username=Username; +} + public void setPassword(String Password){ + this.Password=Password; +} + public void setShopname(String Shopname){ + this.Shopname=Shopname; +} + public void setArea(String Area){ + this.Area=Area; +} + + + public void setPeopleman(String Peopleman){ + this.Peopleman=Peopleman; + } + public void setMantel(String Mantel){ + this.Mantel=Mantel; + } + public void setShoptel(String Shoptel){ + this.Shoptel=Shoptel; + } + public void setUsertypee(int Usertype){ + this.Usertype=Usertype; +} + public void setCreatedate(String Createdate){ + this.Createdate=Createdate; + } + public void setStatus(int Status){ + this.Status=Status; + } +//////////////////////////////////////////////////////////////////////////////// +} diff --git a/18/src/electric/dbs/ware.java b/18/src/electric/dbs/ware.java new file mode 100644 index 0000000..4707f5c --- /dev/null +++ b/18/src/electric/dbs/ware.java @@ -0,0 +1,118 @@ +package electric.dbs; +import java.sql.*; +import javax.servlet.http.*; +import electric.*; +import java.text.SimpleDateFormat; +import electric.electricUtils.*; + +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ + +public class ware + { + private int Id; + private String Pname; + private String Pmodel; + private String Pcost; + private String Pheft; + private String Pfacturer; + private String Pnote; + private String Createdate; + private int Status; + ///////////////////////////////////////////////////////////////// + + public int getId() { + return this.Id; + } + + public String getPname() + { + return this.Pname; + } + + public String getPmodel() + { + return this.Pmodel; + } + + public String getPcost() + { + return this.Pcost; + } + + public String getPheft() + { + return this.Pheft; + } + + public String getPfacturer() + { + return this.Pfacturer; + } + + public String getPnote() + { + return this.Pnote; + } + public String getCreateDate() + { + return this.Createdate; + } + public int getStatus() + { + return this.Status; + } + + + //////////////////////WRITE METHODS///////////////////////////// + ///////////////////////////////////////////////////////////////// + + public void setId(int Id) { + this.Id=Id; + } + public void setPname(String Pname) + { + this.Pname=Pname; + } + public void setPmodel(String Pmodel) + { + this.Pmodel=Pmodel; + } + + public void setPcost(String Pcost) + { + this.Pcost=Pcost; + } + + public void setPheft(String Pheft) + { + this.Pheft=Pheft; + } + + public void setPfacturer(String Pfacturer) + { + this.Pfacturer=Pfacturer; + } + + public void setPnote(String pnote) + { + this.Pnote=Pnote; + } + public void setCreateDate(String CreateDate) + { + this.Createdate=CreateDate; + } + public void setStatus(int status) + { + this.Status=status; + } +} + + + diff --git a/18/src/electric/dbs/waredb.java b/18/src/electric/dbs/waredb.java new file mode 100644 index 0000000..7a049ce --- /dev/null +++ b/18/src/electric/dbs/waredb.java @@ -0,0 +1,100 @@ +package electric.dbs; +import electric.dbs.Dbware; +import electric.dbs.ware; +import java.util.Collection; +import java.util.ArrayList; +import java.sql.SQLException; +import java.sql.ResultSet; +import java.util.Iterator; +import java.sql.*; +import javax.servlet.http.*; +import electric.electricUtils.*; +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ +public class waredb { + public waredb() { + } + public int selectsql(int st) + { + String countSql="SELECT COUNT(*) FROM WARE WHERE STATUS<>1"; + Connection co=null; + ResultSet r = null; + PreparedStatement pstm = null; + int size=0; + int sizepa=0; + try { + co = DbConnectionManager.getConnection(); + pstm = co.prepareStatement(countSql); + r = pstm.executeQuery(); + while (r.next()) { + size = r.getInt(1); + sizepa=(int)size/st; + if(size%st>0) + { + sizepa=sizepa+1; + } + } + r.close(); + r=null; + pstm.close(); + pstm=null; + co.close(); + co=null; + } + catch (SQLException sqle) { + System.err.println(sqle.getMessage()+"333"); + } + return sizepa; + } + public Collection select(int step, int page) { + Collection coll = new ArrayList(); + Connection con=null; + ResultSet rs=null; + PreparedStatement pstmt=null; + int tip = step * (page - 1); + try { + String sql="SELECT * FROM [WARE] WHERE STATUS<>1"; + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + rs = pstmt.executeQuery(); + System.out.print(tip); + if (tip <= 0) { + rs.beforeFirst(); + } else { + if (!rs.absolute(tip)) { + rs.beforeFirst(); + } + } + for (int i = 1; rs.next() && i <= step; i++) { + ware ware = new ware(); + ware.setId(rs.getInt(1)); + ware.setPname(rs.getString(2)); + ware.setPmodel(rs.getString(3)); + ware.setPcost(rs.getString(4)); + ware.setPheft(rs.getString(5)); + ware.setPfacturer(rs.getString(6)); + ware.setPnote(rs.getString(7)); + ware.setCreateDate(rs.getString(8)); + ware.setStatus(rs.getInt(9)); + coll.add(ware); + } + + rs.close(); + rs=null; + pstmt.close(); + pstmt=null; + con.close(); + con=null; + } catch (SQLException ex) { + System.out.println(ex.getMessage()+"666"); + } finally { + return coll; + } + } +} diff --git a/18/src/electric/electricUtils/DbConnectionManager.java b/18/src/electric/electricUtils/DbConnectionManager.java new file mode 100644 index 0000000..21a8fa2 --- /dev/null +++ b/18/src/electric/electricUtils/DbConnectionManager.java @@ -0,0 +1,26 @@ +package electric.electricUtils; +import java.sql.*; +import java.io.*; +import java.util.*; + +public class DbConnectionManager { + + private Connection con; //һConnection + public static Connection getConnection() { + Connection con = null; + String user="sa"; //¼ݿû + String password=""; //¼ݿ + try { + Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); //ݿ + } catch (Exception e) {System.out.println(e.getMessage());} + try{ + String uri="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=YWW"; //ݿURL + con=DriverManager.getConnection(uri,user,password); // + }catch(SQLException e){System.out.println(e.getMessage());} + return con; + } + public void setCon(Connection con) { + this.con = con; + } + } + diff --git a/18/src/electric/electricUtils/DbSequenceManager.java b/18/src/electric/electricUtils/DbSequenceManager.java new file mode 100644 index 0000000..27af456 --- /dev/null +++ b/18/src/electric/electricUtils/DbSequenceManager.java @@ -0,0 +1,97 @@ +package electric.electricUtils; +import java.sql.*; +import java.util.*; + +public class DbSequenceManager { + + private static final String LOAD_ID = + "SELECT SEQUENCEID FROM SEQUENCETABLE WHERE TABLENAME=?"; + private static final String UPDATE_ID = + "UPDATE SEQUENCETABLE SET SEQUENCEID=? WHERE TABLENAME=? AND SEQUENCEID=?"; + + private static final String INSERT_ID = + "INSERT INTO SEQUENCETABLE (SEQUENCEID,TABLENAME) VALUES(?,?)"; + + private static final int INCREMENT = 1; + + + private static DbSequenceManager[] managers; + + static { + managers = new DbSequenceManager[FinalConstants.TABLENUM]; + for (int i = 0; i < managers.length; i++) { + managers[i] = new DbSequenceManager(i); + } + } + + public static int nextID(int type) { + return managers[type].nextUniqueID(); + } + + private int type; + private int currentID; + + public DbSequenceManager(int type) { + this.type = type; + currentID = 0; + } + + public synchronized int nextUniqueID() { + + getNextBlock(); + int id=currentID+INCREMENT; + return id; + } + private void getNextBlock() { + boolean success = false; + Connection con = null; + PreparedStatement pstmt = null; + try { + con = DbConnectionManager.getConnection(); + pstmt = con.prepareStatement(LOAD_ID); + pstmt.setInt(1, type); + ResultSet rs = pstmt.executeQuery(); + if (!rs.next()) { + pstmt = con.prepareStatement(INSERT_ID); + pstmt.setInt(1, currentID); + pstmt.setInt(2, type); + pstmt.executeUpdate(); + } + else { + currentID = rs.getInt(1); + } + pstmt.close(); + int newID = currentID + INCREMENT; + pstmt = con.prepareStatement(UPDATE_ID); + pstmt.setInt(1, newID); + pstmt.setInt(2, type); + pstmt.setInt(3, currentID); + success = pstmt.executeUpdate() == 1; + if (success) { + this.currentID = currentID; + } + } + catch (Exception sqle) { + sqle.printStackTrace(); + } + finally { + try { + pstmt.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + try { + con.close(); + } + catch (Exception e) { + e.printStackTrace(); + } + } + if (!success) { + System.err.println("WARNING: failed to obtain next ID block due to " + + "thread contention. Trying again..."); + getNextBlock(); + } + } +} diff --git a/18/src/electric/electricUtils/FinalConstants.java b/18/src/electric/electricUtils/FinalConstants.java new file mode 100644 index 0000000..c645d3b --- /dev/null +++ b/18/src/electric/electricUtils/FinalConstants.java @@ -0,0 +1,17 @@ +package electric.electricUtils; + +public final class FinalConstants { + + private FinalConstants() { + } + public static final int STATUS_NORMAL = 0; + public static final int STATUS_DELETE = 1; + public static final String PATH_DBPROP = "D:/DbConn.Property"; + public static final int TABLENUM = 21; + public static final int T_NEWS = 1; + public static final int T_MESS = 2; + public static final int T_WARE = 3; + public static final int T_SHOP = 4; + public static final int T_PRODUCT = 5; + public static final int T_SELL = 6; +} diff --git a/18/src/electric/electricUtils/ParamUtils.java b/18/src/electric/electricUtils/ParamUtils.java new file mode 100644 index 0000000..c084aa7 --- /dev/null +++ b/18/src/electric/electricUtils/ParamUtils.java @@ -0,0 +1,91 @@ +package electric.electricUtils; +import javax.servlet.http.*; + +public class ParamUtils { + + public static String getParameter(HttpServletRequest request, + String paramName) { + return getParameter(request, paramName, false); + } + + public static String getParameter(HttpServletRequest request, + String paramName, String defaultStr) { + String temp = request.getParameter(paramName); + + if (temp != null) { + if (temp.equals("")) { + return defaultStr; + } + else { + return nullToString(temp); + } + } + else { + return defaultStr; + } + + } + + public static String getEscapeHTMLParameter(HttpServletRequest request, + String paramName) { + return nullToString(StringUtils.escapeHTMLTags(ParamUtils.getParameter( + request, paramName, true))); + } + + public static String getEscapeHTMLParameter(HttpServletRequest request, + String paramName, + String defaultValue) { + String temp = StringUtils.escapeHTMLTags(ParamUtils.getParameter(request, + paramName, true)); + if ( (temp == null) || (temp.equals(""))) { + temp = defaultValue; + } + return nullToString(temp); + } + + public static String getParameter(HttpServletRequest request, + String paramName, boolean emptyStringsOK) { + String temp = request.getParameter(paramName); + if (temp != null) { + if (temp.equals("") && !emptyStringsOK) { + return ""; + } + else { + return temp; + } + } + else { + return ""; + } + } + + + public static int getIntParameter(HttpServletRequest request, + String paramName, int defaultNum) { + String temp = request.getParameter(paramName); + if (temp != null && !temp.equals("")) { + int num = defaultNum; + try { + num = Integer.parseInt(temp); + } + catch (Exception ignored) {} + return num; + } + else { + return defaultNum; + } + } + + public static int getIntParameter(HttpServletRequest request, + String paramName) { + return getIntParameter(request, paramName, 0); + } + + public static String nullToString(String oldString) { + if (oldString == null) { + return ""; + } + return oldString; + } + +} diff --git a/18/src/electric/electricUtils/StringUtils.java b/18/src/electric/electricUtils/StringUtils.java new file mode 100644 index 0000000..0b138fa --- /dev/null +++ b/18/src/electric/electricUtils/StringUtils.java @@ -0,0 +1,42 @@ +package electric.electricUtils; + +public class StringUtils { + + public static String toChinese(String strvalue) { + try { + if (strvalue == null) { + return ""; + } + else { + + strvalue = new String(strvalue.getBytes("ISO8859_1"), "GB2312"); + return strvalue; + } + } + catch (Exception e) { + return ""; + } + } + + public static final String escapeHTMLTags(String input) { + if (input == null || input.length() == 0) { + return input; + } + StringBuffer buf = new StringBuffer(input.length()); + char ch = ' '; + for (int i = 0; i < input.length(); i++) { + ch = input.charAt(i); + if (ch == '<') { + buf.append("<"); + } + else if (ch == '>') { + buf.append(">"); + } + else { + buf.append(ch); + } + } + return buf.toString(); + } + +} diff --git "a/18/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/18/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..1cf17e5 Binary files /dev/null and "b/18/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/19/.classpath b/19/.classpath new file mode 100644 index 0000000..586f0b7 --- /dev/null +++ b/19/.classpath @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/19/.mymetadata b/19/.mymetadata new file mode 100644 index 0000000..48465df --- /dev/null +++ b/19/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/19/.project b/19/.project new file mode 100644 index 0000000..46eec4b --- /dev/null +++ b/19/.project @@ -0,0 +1,50 @@ + + + 19 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/19/.settings/.jsdtscope b/19/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/19/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/19/.settings/org.eclipse.jdt.core.prefs b/19/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..a2c0dc7 --- /dev/null +++ b/19/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Thu May 19 13:31:49 GMT+08:00 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.source=1.3 diff --git a/19/.settings/org.eclipse.wst.jsdt.ui.superType.container b/19/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/19/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/19/.settings/org.eclipse.wst.jsdt.ui.superType.name b/19/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/19/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/19/WebRoot/Database/db_Job_Data.MDF b/19/WebRoot/Database/db_Job_Data.MDF new file mode 100644 index 0000000..354e903 Binary files /dev/null and b/19/WebRoot/Database/db_Job_Data.MDF differ diff --git a/19/WebRoot/Database/db_Job_Log.LDF b/19/WebRoot/Database/db_Job_Log.LDF new file mode 100644 index 0000000..c2232b0 Binary files /dev/null and b/19/WebRoot/Database/db_Job_Log.LDF differ diff --git a/19/WebRoot/META-INF/MANIFEST.MF b/19/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/19/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/db/Conn.class b/19/WebRoot/WEB-INF/classes/com/bwm/db/Conn.class new file mode 100644 index 0000000..ef99f3d Binary files /dev/null and b/19/WebRoot/WEB-INF/classes/com/bwm/db/Conn.class differ diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/db/Conn.java.LCK b/19/WebRoot/WEB-INF/classes/com/bwm/db/Conn.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/com/bwm/db/Conn.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/db/Data.class b/19/WebRoot/WEB-INF/classes/com/bwm/db/Data.class new file mode 100644 index 0000000..d0d4e07 Binary files /dev/null and b/19/WebRoot/WEB-INF/classes/com/bwm/db/Data.class differ diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/db/Data.java.LCK b/19/WebRoot/WEB-INF/classes/com/bwm/db/Data.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/com/bwm/db/Data.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/page/Show.class b/19/WebRoot/WEB-INF/classes/com/bwm/page/Show.class new file mode 100644 index 0000000..d12c55a Binary files /dev/null and b/19/WebRoot/WEB-INF/classes/com/bwm/page/Show.class differ diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/page/Show.java.LCK b/19/WebRoot/WEB-INF/classes/com/bwm/page/Show.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/com/bwm/page/Show.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/string/Sql.java.LCK b/19/WebRoot/WEB-INF/classes/com/bwm/string/Sql.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/com/bwm/string/Sql.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/string/Str.class b/19/WebRoot/WEB-INF/classes/com/bwm/string/Str.class new file mode 100644 index 0000000..8d9ae7a Binary files /dev/null and b/19/WebRoot/WEB-INF/classes/com/bwm/string/Str.class differ diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/string/Str.java.LCK b/19/WebRoot/WEB-INF/classes/com/bwm/string/Str.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/com/bwm/string/Str.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/time/Count.java.LCK b/19/WebRoot/WEB-INF/classes/com/bwm/time/Count.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/com/bwm/time/Count.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/time/Time.class b/19/WebRoot/WEB-INF/classes/com/bwm/time/Time.class new file mode 100644 index 0000000..7a540d9 Binary files /dev/null and b/19/WebRoot/WEB-INF/classes/com/bwm/time/Time.class differ diff --git a/19/WebRoot/WEB-INF/classes/com/bwm/time/Time.java.LCK b/19/WebRoot/WEB-INF/classes/com/bwm/time/Time.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/com/bwm/time/Time.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/WebRoot/WEB-INF/classes/job/Cjob.class b/19/WebRoot/WEB-INF/classes/job/Cjob.class new file mode 100644 index 0000000..15825f1 Binary files /dev/null and b/19/WebRoot/WEB-INF/classes/job/Cjob.class differ diff --git a/19/WebRoot/WEB-INF/classes/job/Cjob.jbx b/19/WebRoot/WEB-INF/classes/job/Cjob.jbx new file mode 100644 index 0000000..559e0ce --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/job/Cjob.jbx @@ -0,0 +1,14 @@ +[PropertyInfo] +jobid,int,false,false,jobid,jobid,true, +cname,String,false,false,cname,cname,true, +specialty,String,false,false,specialty,specialty,true, +job,String,false,false,job,job,true, +emolument,String,false,false,emolument,emolument,true, +ptime,String,false,false,ptime,ptime,true, +atime,String,false,false,atime,atime,true, +other,String,false,false,other,other,true, +[IconNames] + + + + diff --git a/19/WebRoot/WEB-INF/classes/job/Company.class b/19/WebRoot/WEB-INF/classes/job/Company.class new file mode 100644 index 0000000..e4805d6 Binary files /dev/null and b/19/WebRoot/WEB-INF/classes/job/Company.class differ diff --git a/19/WebRoot/WEB-INF/classes/job/Company.jbx b/19/WebRoot/WEB-INF/classes/job/Company.jbx new file mode 100644 index 0000000..a5bb167 --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/job/Company.jbx @@ -0,0 +1,14 @@ +[PropertyInfo] +address,String,false,false,address,address,true, +cname,String,false,false,cname,cname,true, +email,String,false,false,email,email,true, +manage,String,false,false,manage,manage,true, +name,String,false,false,name,name,true, +password,String,false,false,password,password,true, +resume,String,false,false,resume,resume,true, +tel,String,false,false,tel,tel,true, +[IconNames] + + + + diff --git a/19/WebRoot/WEB-INF/classes/job/Company.jbx~ b/19/WebRoot/WEB-INF/classes/job/Company.jbx~ new file mode 100644 index 0000000..bd9c4e6 --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/job/Company.jbx~ @@ -0,0 +1,14 @@ +[PropertyInfo] +cname,String,false,false,cname,cname,true, +password,String,false,false,password,password,true, +name,String,false,false,name,name,true, +email,String,false,false,email,email,true, +tel,String,false,false,tel,tel,true, +manage,String,false,false,manage,manage,true, +address,String,false,false,address,address,true, +resume,String,false,false,resume,resume,true, +[IconNames] + + + + diff --git a/19/WebRoot/WEB-INF/classes/job/Sjob.class b/19/WebRoot/WEB-INF/classes/job/Sjob.class new file mode 100644 index 0000000..cd6218b Binary files /dev/null and b/19/WebRoot/WEB-INF/classes/job/Sjob.class differ diff --git a/19/WebRoot/WEB-INF/classes/job/Student.class b/19/WebRoot/WEB-INF/classes/job/Student.class new file mode 100644 index 0000000..e4b8dc4 Binary files /dev/null and b/19/WebRoot/WEB-INF/classes/job/Student.class differ diff --git a/19/WebRoot/WEB-INF/classes/job/Student.jbx b/19/WebRoot/WEB-INF/classes/job/Student.jbx new file mode 100644 index 0000000..7de6373 --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/job/Student.jbx @@ -0,0 +1,17 @@ +[PropertyInfo] +age,int,false,false,age,age,true, +birthday,String,false,false,birthday,birthday,true, +email,String,false,false,emial,emial,true, +knowledge,String,false,false,knowledge,knowledge,true, +name,String,false,false,name,name,true, +password,String,false,false,password,password,true, +resume,String,false,false,resume,resume,true, +school,String,false,false,school,school,true, +sex,int,false,false,sex,sex,true, +sname,String,false,false,sname,Sname,true, +specialty,String,false,false,specialty,specialty,true, +[IconNames] + + + + diff --git a/19/WebRoot/WEB-INF/classes/job/Student.jbx~ b/19/WebRoot/WEB-INF/classes/job/Student.jbx~ new file mode 100644 index 0000000..be14b70 --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/job/Student.jbx~ @@ -0,0 +1,17 @@ +[PropertyInfo] +sname,String,false,false,Sname,Sname,true, +password,String,false,false,password,password,true, +name,String,false,false,name,name,true, +age,int,false,false,age,age,true, +sex,int,false,false,sex,sex,true, +birthday,java.util.Date,false,false,birthday,birthday,true, +school,String,false,false,school,school,true, +specialty,String,false,false,specialty,specialty,true, +knowledge,String,false,false,knowledge,knowledge,true, +emial,String,false,false,emial,emial,true, +resume,String,false,false,resume,resume,true, +[IconNames] + + + + diff --git a/19/WebRoot/WEB-INF/classes/job/sjob.jbx b/19/WebRoot/WEB-INF/classes/job/sjob.jbx new file mode 100644 index 0000000..94cb2fb --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/job/sjob.jbx @@ -0,0 +1,14 @@ +[PropertyInfo] +jobid,int,false,false,jobid,jobid,true, +sname,String,false,false,sname,sname,true, +specialty,String,false,false,specialty,specialty,true, +job,String,false,false,job,job,true, +emolument,String,false,false,emolument,emolument,true, +other,String,false,false,other,other,true, +ptime,String,false,false,ptime,ptime,true, +atime,String,false,false,atime,atime,true, +[IconNames] + + + + diff --git a/19/WebRoot/WEB-INF/classes/org/apache/jsp/jsp.jbx b/19/WebRoot/WEB-INF/classes/org/apache/jsp/jsp.jbx new file mode 100644 index 0000000..5821e7b --- /dev/null +++ b/19/WebRoot/WEB-INF/classes/org/apache/jsp/jsp.jbx @@ -0,0 +1,7 @@ +[PropertyInfo] +_jspx_inited,boolean,false,false, , ,false, +[IconNames] + + + + diff --git a/19/WebRoot/WEB-INF/lib/activation.jar b/19/WebRoot/WEB-INF/lib/activation.jar new file mode 100644 index 0000000..b7a4b47 Binary files /dev/null and b/19/WebRoot/WEB-INF/lib/activation.jar differ diff --git a/19/WebRoot/WEB-INF/lib/beandt.jar b/19/WebRoot/WEB-INF/lib/beandt.jar new file mode 100644 index 0000000..a2a38fa Binary files /dev/null and b/19/WebRoot/WEB-INF/lib/beandt.jar differ diff --git a/19/WebRoot/WEB-INF/lib/dx.jar b/19/WebRoot/WEB-INF/lib/dx.jar new file mode 100644 index 0000000..ee119ff Binary files /dev/null and b/19/WebRoot/WEB-INF/lib/dx.jar differ diff --git a/19/WebRoot/WEB-INF/lib/dxejb.jar b/19/WebRoot/WEB-INF/lib/dxejb.jar new file mode 100644 index 0000000..3360bc2 Binary files /dev/null and b/19/WebRoot/WEB-INF/lib/dxejb.jar differ diff --git a/19/WebRoot/WEB-INF/lib/mail.jar b/19/WebRoot/WEB-INF/lib/mail.jar new file mode 100644 index 0000000..5de02f9 Binary files /dev/null and b/19/WebRoot/WEB-INF/lib/mail.jar differ diff --git a/19/WebRoot/WEB-INF/lib/sqljdbc.jar b/19/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/19/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/19/WebRoot/WEB-INF/web.xml b/19/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..64819a4 --- /dev/null +++ b/19/WebRoot/WEB-INF/web.xml @@ -0,0 +1,3 @@ + + + diff --git a/19/WebRoot/admin/admin.jsp b/19/WebRoot/admin/admin.jsp new file mode 100644 index 0000000..248aa99 --- /dev/null +++ b/19/WebRoot/admin/admin.jsp @@ -0,0 +1,21 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.page.Show"%> + + + + +<% +Show show=new Show(); +String strUser=(String)session.getAttribute("admin"); +if(strUser==null){ + out.print(show.errorBox("\u8BF7\u4F60\u6B63\u5E38\u767B\u5F55\uFF01","\u9A8C\u8BC1\u4FE1\u606F")); + return; +} +%> + + + + +<body> +</body> + diff --git a/19/WebRoot/admin/aflink.jsp b/19/WebRoot/admin/aflink.jsp new file mode 100644 index 0000000..5906508 --- /dev/null +++ b/19/WebRoot/admin/aflink.jsp @@ -0,0 +1,56 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.sql.*" %> +<%@ page import="com.bwm.db.Data" %> +<%@ page import="com.bwm.page.Show" %> +<%@ include file="include.jsp"%> + + + + + +<% +request.setCharacterEncoding("gb2312"); +Data data=new Data(); +String strName=(String)request.getParameter("name"); +String strAddress=(String)request.getParameter("address"); +if(strName!=null&&strAddress!=null){ + if(strName.equals("")&&strAddress.equals("")){ + new Show().errorBox("ַ","Ϣ"); + }else{ + int intT=data.insert("INSERT INTO tb_flink(name,address) VALUES('"+strName+"','"+strAddress+"')"); + if(intT>0){ + out.print(""); + }else{ + new Show().errorBox("ʧܣ","Ϣ"); + } + } +} +%> + + + + + + + + +
    ӹ
    + + + + + + + + + + + + + + + + +
    ӵַ
     
    + + diff --git a/19/WebRoot/admin/cjob.jsp b/19/WebRoot/admin/cjob.jsp new file mode 100644 index 0000000..1c41fdb --- /dev/null +++ b/19/WebRoot/admin/cjob.jsp @@ -0,0 +1,57 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.sql.*" %> +<%@ page import="com.bwm.db.Conn" %> +<%@ include file="include.jsp"%> + + + + + + + + + + + + + +
    ƸϢ
    + + + + + + + + + + + + + +<% +Conn con=new Conn(); +ResultSet rs=con.getRs("SELECT * FROM tb_cjob"); +while(rs.next()){ + String strSname=rs.getString(1); +%> + + + + + + + + + + +<% +} +con.close(); +%> + + + +
    û
    ҵ
    Ƹְλ
    ŵнˮ
    Ч
    ˵
    ɾ
    <%=rs.getString(2)%><%=rs.getString(3)%><%=rs.getString(4)%><%=rs.getString(5)%><%=rs.getDate(6)%><%=rs.getDate(7)%><%=rs.getString(8)%>ɾ
     
    + + diff --git a/19/WebRoot/admin/company.jsp b/19/WebRoot/admin/company.jsp new file mode 100644 index 0000000..76a335c --- /dev/null +++ b/19/WebRoot/admin/company.jsp @@ -0,0 +1,57 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.sql.*" %> +<%@ page import="com.bwm.db.Conn" %> +<%@ include file="include.jsp"%> + + + + + + + + + + + + + +
    ҵϢ
    + + + + + + + + + + +<% +Conn con=new Conn(); +ResultSet rs=con.getRs("SELECT * FROM tb_company"); +while(rs.next()){ +%> + + + + + + + + + + +<% +} +con.close(); +%> + + + +
    û
    ҵ
    ʼ
    ҵ
    ˾ַ
    ɾ
    +<% + String strCname=rs.getString(1); + out.print(strCname); +%><%=rs.getString(2)%><%=rs.getString(3)%><%=rs.getString(4)%><%=rs.getString(5)%><%=rs.getString(6)%><%=rs.getString(7)%>ɾ
     
    + + diff --git a/19/WebRoot/admin/dcjob.jsp b/19/WebRoot/admin/dcjob.jsp new file mode 100644 index 0000000..1bc6253 --- /dev/null +++ b/19/WebRoot/admin/dcjob.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.db.Data"%> +<%@ include file="include.jsp"%> +<% +String strJobid=(String)request.getParameter("jobid"); +Data data=new Data(); +int intT=data.delete("DELETE FROM tb_cjob WHERE jobid='"+strJobid+"'"); + if(intT>0){ + out.print(""); + }else{ + new Show().errorBox("ɾʧܣ","Ϣ"); + } +%> diff --git a/19/WebRoot/admin/dcompany.jsp b/19/WebRoot/admin/dcompany.jsp new file mode 100644 index 0000000..bfe77c6 --- /dev/null +++ b/19/WebRoot/admin/dcompany.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.db.Data"%> +<%@ include file="include.jsp"%> +<% +String strCname=(String)request.getParameter("cname"); +Data data=new Data(); +int intT=data.delete("DELETE FROM tb_company WHERE cname='"+strCname+"'"); + if(intT>0){ + out.print(""); + }else{ + new Show().errorBox("ɾʧܣ","Ϣ"); + } +%> diff --git a/19/WebRoot/admin/dflink.jsp b/19/WebRoot/admin/dflink.jsp new file mode 100644 index 0000000..df76f69 --- /dev/null +++ b/19/WebRoot/admin/dflink.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.db.Data"%> +<%@ include file="include.jsp"%> +<% +String strJobid=(String)request.getParameter("id"); +Data data=new Data(); +int intT=data.delete("DELETE FROM tb_flink WHERE id='"+strJobid+"'"); + if(intT>0){ + out.print(""); + }else{ + new Show().errorBox("ɾʧܣ","Ϣ"); + } +%> diff --git a/19/WebRoot/admin/dsjob.jsp b/19/WebRoot/admin/dsjob.jsp new file mode 100644 index 0000000..c394270 --- /dev/null +++ b/19/WebRoot/admin/dsjob.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.db.Data"%> +<%@ include file="include.jsp"%> +<% +String strJobid=(String)request.getParameter("jobid"); +Data data=new Data(); +int intT=data.delete("DELETE FROM tb_sjob WHERE jobid='"+strJobid+"'"); + if(intT>0){ + out.print(""); + }else{ + new Show().errorBox("ɾʧܣ","Ϣ"); + } +%> diff --git a/19/WebRoot/admin/dstudent.jsp b/19/WebRoot/admin/dstudent.jsp new file mode 100644 index 0000000..f5cc398 --- /dev/null +++ b/19/WebRoot/admin/dstudent.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.db.Data"%> +<%@ include file="include.jsp"%> +<% +String strSname=(String)request.getParameter("sname"); +Data data=new Data(); +int intT=data.delete("DELETE FROM tb_student WHERE sname='"+strSname+"'"); + if(intT>0){ + out.print(""); + }else{ + new Show().errorBox("ɾʧܣ","Ϣ"); + } +%> diff --git a/19/WebRoot/admin/flink.jsp b/19/WebRoot/admin/flink.jsp new file mode 100644 index 0000000..f347842 --- /dev/null +++ b/19/WebRoot/admin/flink.jsp @@ -0,0 +1,55 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.sql.*" %> +<%@ page import="com.bwm.db.Conn" %> +<%@ include file="include.jsp"%> + + + + + + + + + + + + + +
    ӹ
    + + + + + + +<% +Conn con=new Conn(); +ResultSet rs=con.getRs("SELECT * FROM tb_flink"); +while(rs.next()){ + String strSname=rs.getString(1); +%> + + + + + + + + + + + + <% +} +con.close(); +%> + + + + + + +
    ӵַ
    ޸
    ɾ
    + ޸
    ɾ
     
    + + diff --git a/19/WebRoot/admin/include.jsp b/19/WebRoot/admin/include.jsp new file mode 100644 index 0000000..89844bc --- /dev/null +++ b/19/WebRoot/admin/include.jsp @@ -0,0 +1,7 @@ +<%@ page import="com.bwm.page.Show" %> +<% +if(session.getAttribute("admin")==null){ + out.print(new Show().errorBox("㻹ûе¼","Ϣ")); + return; +} +%> \ No newline at end of file diff --git a/19/WebRoot/admin/index.htm b/19/WebRoot/admin/index.htm new file mode 100644 index 0000000..797901f --- /dev/null +++ b/19/WebRoot/admin/index.htm @@ -0,0 +1,34 @@ + + + + +Ա¼ + + + + +

    ԱⲻóԽ룡

    + + + + + + + + + + + + + + + + + +
    Ա¼
       +
        룺
    +    +
    + + diff --git a/19/WebRoot/admin/login.htm b/19/WebRoot/admin/login.htm new file mode 100644 index 0000000..47559f1 --- /dev/null +++ b/19/WebRoot/admin/login.htm @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + +
    ̨
     
    + + diff --git a/19/WebRoot/admin/login.jsp b/19/WebRoot/admin/login.jsp new file mode 100644 index 0000000..d95c460 --- /dev/null +++ b/19/WebRoot/admin/login.jsp @@ -0,0 +1,32 @@ +<%@ page contentType="text/html; charset=GB2312" %> +<%@ page import="com.bwm.db.Data" %> +<%@ page import="com.bwm.page.Show" %> + + + +login + + + +<% +String strName=(String)request.getParameter("name"); +String strPassword=(String)request.getParameter("password"); +Data data=new Data(); +Show show=new Show(); +int intT=0; +if(strName!=null||strPassword!=null){ + intT=data.getRowCount("tb_admin WHERE admin='"+strName+"' AND password='"+strPassword+"'"); + if(intT>0){ + session.setAttribute("admin",strName); + response.sendRedirect("admin.jsp"); + }else{ + out.print(show.errorBox("û룡","֤Ϣ")); + return; + } +}else{ + out.print(show.errorBox("û룡","֤Ϣ")); + return; +} +%> + + diff --git a/19/WebRoot/admin/mflink.jsp b/19/WebRoot/admin/mflink.jsp new file mode 100644 index 0000000..a3f27c7 --- /dev/null +++ b/19/WebRoot/admin/mflink.jsp @@ -0,0 +1,19 @@ +<%@ page contentType="text/html; charset=GB2312"%> +<%@ page import="com.bwm.db.Data"%> +<%@ page import="com.bwm.string.Str"%> +<%@ include file="include.jsp"%> +<% +Str str=new Str(); +String strJobid=(String)request.getParameter("id"); +String strName=(String)request.getParameter("name"); +String strAddress=(String)request.getParameter("address"); +strName=str.toChinese(strName); +strAddress=str.toChinese(strAddress); +Data data=new Data(); +int intT=data.update("UPDATE tb_flink SET name='"+strName+"',address='"+strAddress+"' WHERE id='"+strJobid+"'"); + if(intT>0){ + out.print(""); + }else{ + new Show().errorBox("ʧܣ","Ϣ"); + } +%> \ No newline at end of file diff --git a/19/WebRoot/admin/sjob.jsp b/19/WebRoot/admin/sjob.jsp new file mode 100644 index 0000000..4018639 --- /dev/null +++ b/19/WebRoot/admin/sjob.jsp @@ -0,0 +1,57 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.sql.*" %> +<%@ page import="com.bwm.db.Conn" %> +<%@ include file="include.jsp"%> + + + + + + + + + + + + + +
    ְϢ
    + + + + + + + + + + + + + +<% +Conn con=new Conn(); +ResultSet rs=con.getRs("SELECT * FROM tb_sjob"); +while(rs.next()){ + String strSname=rs.getString(1); +%> + + + + + + + + + + +<% +} +con.close(); +%> + + + +
    û
    ְҵ
    ְλ
    нˮ
    Ч
    ˵
    ɾ
    <%=rs.getString(2)%><%=rs.getString(3)%><%=rs.getString(4)%><%=rs.getString(5)%><%=rs.getDate(6)%><%=rs.getDate(7)%><%=rs.getString(8)%>ɾ
     
    + + diff --git a/19/WebRoot/admin/student.jsp b/19/WebRoot/admin/student.jsp new file mode 100644 index 0000000..bbae0f8 --- /dev/null +++ b/19/WebRoot/admin/student.jsp @@ -0,0 +1,68 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.sql.*" %> +<%@ page import="com.bwm.db.Conn" %> +<%@ include file="include.jsp"%> + + + + + + + + + + + + + +
    ѧϢ
    + + + + + + + + + + + + +<% +Conn con=new Conn(); +ResultSet rs=con.getRs("SELECT * FROM tb_student"); +while(rs.next()){ +%> + + + + + + + + + + + + +<% +} +con.close(); +%> + + + +
    û
    ʵ
    Ա
    ҵѧУ
    ѧרҵ
    ѧ
    ʼ
    ɾ
    + <% + String strSname=rs.getString(1); + out.print(strSname); +%><%=rs.getString(2)%><%=rs.getString(3)%> +<% + if(rs.getInt(5)==1){ + out.print(""); + }else{ + out.print("Ů"); + } +%><%=rs.getDate(6)%><%=rs.getString(7)%><%=rs.getString(8)%><%=rs.getString(9)%><%=rs.getString(10)%>ɾ
     
    + + diff --git a/19/WebRoot/admin/top.htm b/19/WebRoot/admin/top.htm new file mode 100644 index 0000000..c02ae91 --- /dev/null +++ b/19/WebRoot/admin/top.htm @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + +
     
    ѧϢ | + ҵϢ | ְϢ | + ƸϢ | ӹҳ
    + + diff --git a/19/WebRoot/company/ajobinfo.htm b/19/WebRoot/company/ajobinfo.htm new file mode 100644 index 0000000..a420990 --- /dev/null +++ b/19/WebRoot/company/ajobinfo.htm @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ƸϢ
    ҵ
    Ƹְλ
    Ƹнˮ
    Чʱ䣺 + --
    ˵
    +   +
    + + diff --git a/19/WebRoot/company/ajobinfo.jsp b/19/WebRoot/company/ajobinfo.jsp new file mode 100644 index 0000000..3c0cc9a --- /dev/null +++ b/19/WebRoot/company/ajobinfo.jsp @@ -0,0 +1,23 @@ +<%@ page contentType="text/html; charset=GB2312"%> +<%@ page import="com.bwm.page.Show"%> +<%@ page import="com.bwm.db.Data"%> +<%@ page import="com.bwm.time.Time"%> +<%request.setCharacterEncoding("GB2312");%> + + +<% +Show show=new Show(); +Data data=new Data(); +Time time=new Time(); +int intT=0; +String strName=(String)session.getAttribute("name"); + intT=data.insert("INSERT INTO tb_cjob(cname,specialty,job,emolument,ptime,atime,other) VALUES('"+strName+"','"+ + cjob.getSpecialty()+"','"+cjob.getJob()+"','"+cjob.getEmolument()+"','"+time.getYMD()+"','"+ + cjob.getAtime()+"','"+cjob.getOther()+"')"); + if(intT<=0){ + out.print(show.errorBox("ʧܣݿ!","Ϣ")); + return; + }else{ + out.print(""); + } +%> \ No newline at end of file diff --git a/19/WebRoot/company/djobinfo.jsp b/19/WebRoot/company/djobinfo.jsp new file mode 100644 index 0000000..960060d --- /dev/null +++ b/19/WebRoot/company/djobinfo.jsp @@ -0,0 +1,20 @@ +<%@ page contentType="text/html; charset=GB2312"%> +<%@ page import="com.bwm.db.Data"%> +<%@ page import="com.bwm.page.Show"%> +<%@ page import="java.sql.*"%> +<% +String strId=(String)request.getParameter("intId"); +String strName=(String)session.getAttribute("name"); +Data data=new Data(); +Show show=new Show(); +if(strId!=null&&strName!=null){ + int intT=data.delete("DELETE FROM tb_cjob WHERE cname='"+strName+"' AND jobid="+strId); + if(intT>0){ + out.print(""); + }else{ + out.print(show.errorBox("ݿ","Ϣ")); + } +}else{ + out.print(show.errorBox("ȷ","Ϣ")); +} +%> \ No newline at end of file diff --git a/19/WebRoot/company/index.htm b/19/WebRoot/company/index.htm new file mode 100644 index 0000000..115c943 --- /dev/null +++ b/19/WebRoot/company/index.htm @@ -0,0 +1,81 @@ + + + + +ע + + + + +

     

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ҵע
       +
        룺
    ȷϣ
    ҵƣ + +
    ʼ + +
    ϵ绰 + +
    ҵ + +
    ҵַ + +
    ҵ + +
    +    +
    ˵ +
      +

      1.עûΪַͺ.

      +

      2.û롢ҵƺ͵ʼDZ.

      +
    + + diff --git a/19/WebRoot/company/left.htm b/19/WebRoot/company/left.htm new file mode 100644 index 0000000..5bb284d --- /dev/null +++ b/19/WebRoot/company/left.htm @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    Ϣ
    + + + + + + +
    ʼ
    + + + + + + + + + +
    ƸϢ
     
    + diff --git a/19/WebRoot/company/login.htm b/19/WebRoot/company/login.htm new file mode 100644 index 0000000..75f58c2 --- /dev/null +++ b/19/WebRoot/company/login.htm @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + +
    ҵϢ̨
     
     
    + + diff --git a/19/WebRoot/company/login.jsp b/19/WebRoot/company/login.jsp new file mode 100644 index 0000000..b20cca3 --- /dev/null +++ b/19/WebRoot/company/login.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.page.Show"%> + + + + +<% +Show show=new Show(); +String strUser=(String)session.getAttribute("name"); +if(strUser==null){ + out.print(show.errorBox("\u8BF7\u4F60\u6B63\u5E38\u767B\u5F55\uFF01","\u9A8C\u8BC1\u4FE1\u606F")); + return; +} +%> + + + + + + + +<body> +</body> + diff --git a/19/WebRoot/company/mreginfo.jsp b/19/WebRoot/company/mreginfo.jsp new file mode 100644 index 0000000..7690b96 --- /dev/null +++ b/19/WebRoot/company/mreginfo.jsp @@ -0,0 +1,36 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.page.Show"%> +<%@ page import="com.bwm.db.Data"%> +<%@ page import="com.bwm.string.Str"%> +<%request.setCharacterEncoding("GB2312");%> + + +<% +Show show=new Show(); +Str str=new Str(); +String strUsername=(String)session.getAttribute("name"); +company.setCname(str.dbEncode(company.getCname())); +company.setAddress(str.dbEncode(company.getAddress())); +company.setEmail(str.dbEncode(company.getEmail())); +company.setManage(str.dbEncode(company.getManage())); +company.setName(str.dbEncode(company.getName())); +company.setPassword(str.dbEncode(company.getPassword())); +company.setResume(str.dbEncode(company.getResume())); +company.setTel(str.dbEncode(company.getTel())); +if(company.getName().equals("")||company.getPassword().equals("")||company.getEmail().equals("")){ + out.print(show.errorBox("дϢ!","Ϣ")); + return; +}else{ + int intT=0; + Data data=new Data(); + intT=data.insert("UPDATE tb_company SET password='"+company.getPassword()+"',name='"+company.getName()+"',email='"+ + company.getEmail()+"',tel='"+company.getTel()+"',manage='"+company.getManage()+"',address='"+ + company.getAddress()+"',resume='"+company.getResume()+"' WHERE cname='"+strUsername+"'"); + if(intT<=0){ + out.print(show.errorBox("޸ʧܣݿ!","Ϣ")); + return; + }else{ + out.print(""); + } +} +%> \ No newline at end of file diff --git a/19/WebRoot/company/reg.jsp b/19/WebRoot/company/reg.jsp new file mode 100644 index 0000000..d58e11a --- /dev/null +++ b/19/WebRoot/company/reg.jsp @@ -0,0 +1,45 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.page.Show"%> +<%@ page import="com.bwm.db.Data"%> +<%@ page import="com.bwm.string.Str"%> +<%request.setCharacterEncoding("GB2312");%> + + +<% +Show show=new Show(); +Str str=new Str(); +company.setCname(str.dbEncode(company.getCname())); +company.setAddress(str.dbEncode(company.getAddress())); +company.setEmail(str.dbEncode(company.getEmail())); +company.setManage(str.dbEncode(company.getManage())); +company.setName(str.dbEncode(company.getName())); +company.setPassword(str.dbEncode(company.getPassword())); +company.setResume(str.dbEncode(company.getResume())); +company.setTel(str.dbEncode(company.getTel())); +if(company.getCname().equals("")||company.getName().equals("")||company.getPassword().equals("")||company.getEmail().equals("")){ + out.print(show.errorBox("дϢ!","Ϣ")); + return; +}else{ + if(company.getCname().compareTo("z")>0||company.getCname().compareTo("0")<0){ + out.print(show.errorBox("עûΪַͺ֣","Ϣ")); + return; + } + int intT=0; + Data data=new Data(); + intT=data.getRowCount("tb_company WHERE cname='"+company.getCname()+"'"); + if(intT>0){ + out.print(show.errorBox("ûѱעᣡ","עϢ")); + return; + }else{ + intT=data.insert("INSERT INTO tb_company(cname,password,name,email,tel,manage,address,resume) VALUES('"+ + company.getCname()+"','"+company.getPassword()+"','"+company.getName()+"','"+company.getEmail()+"','"+ + company.getTel()+"','"+company.getManage()+"','"+company.getAddress()+"','"+company.getResume()+"')"); + if(intT<=0){ + out.print(show.errorBox("עʧܣݿ!","Ϣ")); + return; + }else{ + out.print(""); + } + } +} +%> diff --git a/19/WebRoot/company/reginfo.jsp b/19/WebRoot/company/reginfo.jsp new file mode 100644 index 0000000..1f8c399 --- /dev/null +++ b/19/WebRoot/company/reginfo.jsp @@ -0,0 +1,92 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.db.Conn"%> +<%@ page import="com.bwm.page.Show"%> +<%@ page import="java.sql.*"%> + + + + + + + +<% +Conn con=new Conn(); +Show show=new Show(); +String strUserName=(String)session.getAttribute("name"); +ResultSet rs=con.getRs("SELECT * FROM tb_company WHERE cname='"+strUserName+"'"); + if(rs.next()){ +%> + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ޸עϢ
      <%=rs.getString(1)%>
    ޸룺
    ȷϣ
    ҵƣ + +
    ʼ + +
    ϵ绰 + +
    ҵ + +
    ҵַ + +
    ˾飺 + +
    +   +
    +<% + }else{ + out.print(show.errorBox("ûڣµ¼","Ϣ")); + } +%> + + \ No newline at end of file diff --git a/19/WebRoot/company/top.htm b/19/WebRoot/company/top.htm new file mode 100644 index 0000000..dbc5460 --- /dev/null +++ b/19/WebRoot/company/top.htm @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + +
     
    ҳ
    + + diff --git a/19/WebRoot/company/vjobinfo.jsp b/19/WebRoot/company/vjobinfo.jsp new file mode 100644 index 0000000..6d1bee0 --- /dev/null +++ b/19/WebRoot/company/vjobinfo.jsp @@ -0,0 +1,46 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.db.Conn"%> +<%@ page import="java.sql.*"%> + + + + + + + + + + + + + +
     
    + + + + + + + + + +<% +Conn con=new Conn(); +String strChecked="checked"; +String strUserName=(String)session.getAttribute("name"); +ResultSet rs=con.getRs("SELECT * FROM tb_cjob WHERE cname='"+strUserName+"'"); + while(rs.next()){ + int intId=rs.getInt(1); +%> + + + + + + +<% + } +%> +
    ɾƸϢ
    ƸְλʱЧʱɾ
    <%=rs.getString(4)%><%=rs.getDate(6)%><%=rs.getDate(7)%>ɾ
    + + \ No newline at end of file diff --git a/19/WebRoot/css/default.css b/19/WebRoot/css/default.css new file mode 100644 index 0000000..8fea6d9 --- /dev/null +++ b/19/WebRoot/css/default.css @@ -0,0 +1,30 @@ +/* CSS Document form bwm*/ + \ No newline at end of file diff --git a/19/WebRoot/css/left.css b/19/WebRoot/css/left.css new file mode 100644 index 0000000..05ec214 --- /dev/null +++ b/19/WebRoot/css/left.css @@ -0,0 +1,37 @@ +/* CSS Document form bwm*/ + +a{ + text-decoration: none; +} +#link a { + color: #ffffff; font-size:12px +} +#link1 a { + font-size: 12pt; text-decoration: none; + font-weight: bold; color:#F5f7f7; +} +#link2 a { + text-decoration: none; margin:20px; color:#ffffff; +} +td { + font-size: 12px; +} +#font1 { + font-weight:bold; font-size:16px; color:#F5f7f7; + margin:10px; +} +#top{ + position:absolute; font-size:46px; top:78px; left: 246px; + width: 240px; font-weight: bold; +} +#reg{ + color:#33FF00; +} +#font { + font-family: "п"; + font-size:36px; + color: #993300; +} +body { + background-image: url(../images/bg.jpg); +} diff --git a/19/WebRoot/images/0099CC.gif b/19/WebRoot/images/0099CC.gif new file mode 100644 index 0000000..7f45999 Binary files /dev/null and b/19/WebRoot/images/0099CC.gif differ diff --git a/19/WebRoot/images/bg.jpg b/19/WebRoot/images/bg.jpg new file mode 100644 index 0000000..4181add Binary files /dev/null and b/19/WebRoot/images/bg.jpg differ diff --git a/19/WebRoot/images/gbnavl.gif b/19/WebRoot/images/gbnavl.gif new file mode 100644 index 0000000..b8068cc Binary files /dev/null and b/19/WebRoot/images/gbnavl.gif differ diff --git a/19/WebRoot/images/gbnavm.gif b/19/WebRoot/images/gbnavm.gif new file mode 100644 index 0000000..3440843 Binary files /dev/null and b/19/WebRoot/images/gbnavm.gif differ diff --git a/19/WebRoot/images/gbnavr.gif b/19/WebRoot/images/gbnavr.gif new file mode 100644 index 0000000..e05e25d Binary files /dev/null and b/19/WebRoot/images/gbnavr.gif differ diff --git a/19/WebRoot/images/job.bmp b/19/WebRoot/images/job.bmp new file mode 100644 index 0000000..7d37452 Binary files /dev/null and b/19/WebRoot/images/job.bmp differ diff --git a/19/WebRoot/images/tdbg.jpg b/19/WebRoot/images/tdbg.jpg new file mode 100644 index 0000000..3d5452d Binary files /dev/null and b/19/WebRoot/images/tdbg.jpg differ diff --git a/19/WebRoot/images/top.gif b/19/WebRoot/images/top.gif new file mode 100644 index 0000000..751d4a2 Binary files /dev/null and b/19/WebRoot/images/top.gif differ diff --git a/19/WebRoot/index.htm b/19/WebRoot/index.htm new file mode 100644 index 0000000..5aa5baa --- /dev/null +++ b/19/WebRoot/index.htm @@ -0,0 +1,13 @@ + + + + +ѧҵְ + + +
    +ѧҵְ...... +
    + + diff --git a/19/WebRoot/index.jsp b/19/WebRoot/index.jsp new file mode 100644 index 0000000..c0d7510 --- /dev/null +++ b/19/WebRoot/index.jsp @@ -0,0 +1,131 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.sql.*"%> + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + +
    + + + + + + + + +
    ѧְ
    ҵƸ
    +<% +ResultSet rs=con.getRs("SELECT a.jobid,b.name,b.school,b.specialty,b.knowledge,a.job,a.emolument FROM tb_sjob AS a,tb_student AS b WHERE a.sname=b.sname and getdate()<=atime ORDER BY ptime DESC"); + while(rs.next()){ +%> + + + +<% + } + con.close(); +%> + + + +
    <<[<%=rs.getString(2)%>]ҵ[<%=rs.getString(3)%><%=rs.getString(4)%><%=rs.getString(5)%>][<%=rs.getString(6)%>]ְλҪнˮ[<%=rs.getString(7)%>] 
     
    +<% +rs=con.getRs("SELECT a.jobid,b.name,b.manage,a.job,a.emolument FROM tb_cjob AS a,tb_company AS b WHERE a.cname=b.cname and getdate()<=atime ORDER BY ptime DESC"); + while(rs.next()){ +%> + + + +<% + } + con.close(); +%> + + + +
    >>[<%=rs.getString(2)%>]ҪӪ[<%=rs.getString(3)%>]Ƹ[<%=rs.getString(4)%>]ְλŵнˮ[<%=rs.getString(5)%>]
     
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + +
    ¼
    û + +
      룺
    + + ѧ + + ҵ
    + +   +
    + + + +<% +rs=con.getRs("SELECT address,name FROM tb_flink"); + while(rs.next()){ +%> + + + +<% + } + con.close(); +%> +
     
    + + + + + + + +

     ϵվ | Ա | ©2004 MingRi
    + + \ No newline at end of file diff --git a/19/WebRoot/js/default.js b/19/WebRoot/js/default.js new file mode 100644 index 0000000..d829c2e --- /dev/null +++ b/19/WebRoot/js/default.js @@ -0,0 +1,26 @@ +// JavaScript Document + \ No newline at end of file diff --git a/19/WebRoot/login.jsp b/19/WebRoot/login.jsp new file mode 100644 index 0000000..5026f3a --- /dev/null +++ b/19/WebRoot/login.jsp @@ -0,0 +1,42 @@ +<%@ page contentType="text/html; charset=GB2312" %> + + + + + +login + + + +<% +String strUserName=(String)request.getParameter("username"); +String strPassword=(String)request.getParameter("password"); +String strSelect=(String)request.getParameter("select"); +int intT=0; +if(strSelect!=null&&strSelect.equals("student")){ + intT=data.getRowCount("tb_student WHERE sname='"+strUserName+"' AND password='"+strPassword+"'"); + if(intT>0){ + session.setAttribute("name",strUserName); + session.setAttribute("use","student"); + response.sendRedirect("student/login.jsp"); + }else{ + out.print(show.errorBox("û룡","֤")); + return; + } +}else if(strSelect!=null&&strSelect.equals("company")){ + intT=data.getRowCount("tb_company WHERE cname='"+strUserName+"' AND password='"+strPassword+"'"); + if(intT>0){ + session.setAttribute("name",strUserName); + session.setAttribute("use","company"); + response.sendRedirect("company/login.jsp"); + }else{ + out.print(show.errorBox("û룡","֤")); + return; + } +}else{ + out.print(show.errorBox("û룡","֤")); + return; +} +%> + + diff --git a/19/WebRoot/mail/index.jsp b/19/WebRoot/mail/index.jsp new file mode 100644 index 0000000..d2d9a95 --- /dev/null +++ b/19/WebRoot/mail/index.jsp @@ -0,0 +1,89 @@ +<%@ page contentType="text/html;charset=gb2312" %> + + + + + + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ʼ
    ռ1 + ">
    ռ2
    ռ3
    ռ4
    ռ5
    ռ6
    ռ7
    ռ8
    ռ9
    ռ10
        ⣺
      ݣ
    +    +
     
    + + \ No newline at end of file diff --git a/19/WebRoot/mail/send.jsp b/19/WebRoot/mail/send.jsp new file mode 100644 index 0000000..a3e3db7 --- /dev/null +++ b/19/WebRoot/mail/send.jsp @@ -0,0 +1,91 @@ +<%@ page contentType="text/html;charset=GB2312" %> +<%@ page import="javax.mail.internet.*" %> +<%@ page import="javax.activation.*" %> +<%@ page import="javax.mail.*" %> +<%@ page import="java.util.*" %> +<%@ page import="java.sql.*" %> +<%@ page import="java.io.*" %> +<%@ page import="com.bwm.db.Conn"%> +<%@ page import="com.bwm.page.Show" %> +<% +request.setCharacterEncoding("GB2312"); +Show show=new Show(); +Conn con=new Conn(); +boolean blnError=true; +boolean blnSend=false; +String strFrom =""; +String strUserName=(String)session.getAttribute("name"); +String strUse=(String)session.getAttribute("use"); +String strSql=""; +if(strUse!=null&&strUse.equals("student")){ + strSql="SELECT email FROM tb_student WHERE sname='"+strUserName+"'"; +}else if(strUse!=null&&strUse.equals("company")){ + strSql="SELECT email FROM tb_company WHERE cname='"+strUserName+"'"; +}else { + out.print(show.errorBox("㻹ûе¼ܷEmail","Ϣ")); + return; +} +ResultSet rs=con.getRs(strSql); +if(rs.next()){ + strFrom=rs.getString(1); +} +//send Email +InternetAddress[] address = null; +String strMailserver = "bwm"; +String [] arrstrTo=request.getParameterValues("from"); +String strSubject = request.getParameter("subject"); +String strMessage = request.getParameter("message"); +if(arrstrTo.length>0){ + int intI=0; + for(intI=0;intI"); + blnSend=true; + }catch (Exception e) { + if(blnError) + out.print(show.errorBox(e.getMessage(),"ʧ")); + blnError=false; + e.printStackTrace(); + } + } + } +}else{ + out.print(show.errorBox("дϢ","Ϣ")); +} +if(blnSend){ + out.print(show.errorBox("ʼͳɹ","Ϣ")); +}else if(blnError&!blnSend){ + out.print(show.errorBox("ʼʧܣ","Ϣ")); +} +%> \ No newline at end of file diff --git a/19/WebRoot/student/ajobinfo.htm b/19/WebRoot/student/ajobinfo.htm new file mode 100644 index 0000000..357d941 --- /dev/null +++ b/19/WebRoot/student/ajobinfo.htm @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ְϢ
    ְҵ
    ְλ
    нˮ
    Чʱ䣺 + --
    ˵
    +   +
    + + diff --git a/19/WebRoot/student/ajobinfo.jsp b/19/WebRoot/student/ajobinfo.jsp new file mode 100644 index 0000000..d0da32a --- /dev/null +++ b/19/WebRoot/student/ajobinfo.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html; charset=GB2312"%> +<%@ page import="com.bwm.page.Show"%> +<%@ page import="com.bwm.db.Data"%> +<%@ page import="com.bwm.time.Time"%> + +<%request.setCharacterEncoding("GB2312");%> + + +<% +Show show=new Show(); +Data data=new Data(); +Time time=new Time(); +int intT=0; +String strName=(String)session.getAttribute("name"); + intT=data.insert("INSERT INTO tb_sjob(sname,specialty,job,emolument,ptime,atime,other) VALUES('"+strName+"','"+ + sjob.getSpecialty()+"','"+sjob.getJob()+"','"+sjob.getEmolument()+"','"+time.getYMD()+"','"+ + sjob.getAtime()+"','"+sjob.getOther()+"')"); + if(intT<=0){ + out.print(show.errorBox("ʧܣѾµ¼!","Ϣ")); + return; + }else{ + out.print(""); + } +%> diff --git a/19/WebRoot/student/djobinfo.jsp b/19/WebRoot/student/djobinfo.jsp new file mode 100644 index 0000000..f4fd4b4 --- /dev/null +++ b/19/WebRoot/student/djobinfo.jsp @@ -0,0 +1,20 @@ +<%@ page contentType="text/html; charset=GB2312"%> +<%@ page import="com.bwm.db.Data"%> +<%@ page import="com.bwm.page.Show"%> +<%@ page import="java.sql.*"%> +<% +String strId=(String)request.getParameter("intId"); +String strName=(String)session.getAttribute("name"); +Data data=new Data(); +Show show=new Show(); +if(strId!=null&&strName!=null){ + int intT=data.delete("DELETE FROM tb_sjob WHERE sname='"+strName+"' AND jobid="+strId); + if(intT>0){ + out.print(""); + }else{ + out.print(show.errorBox("ݿ","Ϣ")); + } +}else{ + out.print(show.errorBox("ȷ","Ϣ")); +} +%> \ No newline at end of file diff --git a/19/WebRoot/student/index.htm b/19/WebRoot/student/index.htm new file mode 100644 index 0000000..ac0f511 --- /dev/null +++ b/19/WebRoot/student/index.htm @@ -0,0 +1,103 @@ + + + + +ע + + + + +

     

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ѧע
       +
        룺
    ȷϣ
    ʵ + +
        䣺 + +
         + + + + Ů +
    ڣ + + --
    ҵѧУ + +
    ʼ + +
    ѧרҵ + +
    ѧ + +
    ˼ + +
    +    +
    ˵ +
      +

      1.עûΪַͺ.

      +

      2.û롢ʵں͵ʼDZ.

      +

      3.ڱȷʽд.

      +
    + + diff --git a/19/WebRoot/student/left.htm b/19/WebRoot/student/left.htm new file mode 100644 index 0000000..b182673 --- /dev/null +++ b/19/WebRoot/student/left.htm @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    Ϣ
    + + + + + + +
    ʼ
    + + + + + + + + + +
    ְϢ
     
    + diff --git a/19/WebRoot/student/login.htm b/19/WebRoot/student/login.htm new file mode 100644 index 0000000..f5e7583 --- /dev/null +++ b/19/WebRoot/student/login.htm @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + +
    Ϣ̨
     
    + + diff --git a/19/WebRoot/student/login.jsp b/19/WebRoot/student/login.jsp new file mode 100644 index 0000000..d54d992 --- /dev/null +++ b/19/WebRoot/student/login.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.page.Show"%> + + + + +<% +Show show=new Show(); +String strUser=(String)session.getAttribute("name"); +if(strUser==null){ + out.print(show.errorBox("\u8BF7\u4F60\u6B63\u5E38\u767B\u5F55\uFF01","\u9A8C\u8BC1\u4FE1\u606F")); + return; +} +%> + + + + + + + +<body> +</body> + diff --git a/19/WebRoot/student/mreginfo.jsp b/19/WebRoot/student/mreginfo.jsp new file mode 100644 index 0000000..18fa8ed --- /dev/null +++ b/19/WebRoot/student/mreginfo.jsp @@ -0,0 +1,37 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.page.Show"%> +<%@ page import="com.bwm.db.Data"%> +<%@ page import="com.bwm.string.Str"%> +<%request.setCharacterEncoding("GB2312");%> + + +<% +Show show=new Show(); +Str str=new Str(); +String strUserName=(String)session.getAttribute("name"); +student.setBirthday(str.dbEncode(student.getBirthday())); +student.setEmail(str.dbEncode(student.getEmail())); +student.setKnowledge(str.dbEncode(student.getKnowledge())); +student.setName(str.dbEncode(student.getName())); +student.setPassword(str.dbEncode(student.getPassword())); +student.setResume(str.dbEncode(student.getResume())); +student.setSchool(str.dbEncode(student.getSchool())); +student.setSname(str.dbEncode(student.getSname())); +student.setSpecialty(str.dbEncode(student.getSpecialty())); +if(student.getName().equals("")||student.getPassword().equals("")||student.getEmail().equals("")||student.getBirthday().equals("")){ + out.print(show.errorBox("дϢ!","Ϣ")); + return; +}else{ + int intT=0; + Data data=new Data(); + intT=data.insert("UPDATE tb_student SET password='"+student.getPassword()+"',name='"+student.getName()+"',age='"+student.getAge()+"',sex='"+ + student.getSex()+"',birthday='"+student.getBirthday()+"',school='"+student.getSchool()+"',specialty='"+ student.getSpecialty()+"',knowledge='"+ + student.getKnowledge()+"',email='"+student.getEmail()+"',resume='"+student.getResume()+"' WHERE sname='"+strUserName+"'"); + if(intT<=0){ + out.print(show.errorBox("޸ʧܣݿ!","Ϣ")); + return; + }else{ + out.print(""); + } +} +%> diff --git a/19/WebRoot/student/reg.jsp b/19/WebRoot/student/reg.jsp new file mode 100644 index 0000000..9119c6e --- /dev/null +++ b/19/WebRoot/student/reg.jsp @@ -0,0 +1,47 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.page.Show"%> +<%@ page import="com.bwm.db.Data"%> +<%@ page import="com.bwm.string.Str"%> +<%request.setCharacterEncoding("GB2312");%> + + +<% +Str str=new Str(); +Show show=new Show(); +student.setBirthday(str.dbEncode(student.getBirthday())); +student.setEmail(str.dbEncode(student.getEmail())); +student.setKnowledge(str.dbEncode(student.getKnowledge())); +student.setName(str.dbEncode(student.getName())); +student.setPassword(str.dbEncode(student.getPassword())); +student.setResume(str.dbEncode(student.getResume())); +student.setSchool(str.dbEncode(student.getSchool())); +student.setSname(str.dbEncode(student.getSname())); +student.setSpecialty(str.dbEncode(student.getSpecialty())); +if(student.getSname().equals("")||student.getName().equals("")||student.getPassword().equals("")||student.getEmail().equals("")||student.getBirthday().equals("")){ + out.print(show.errorBox("дϢ","Ϣ")); + return; +}else{ + if(student.getSname().compareTo("z")>=0||student.getSname().compareTo("0")<=0){ + out.print(show.errorBox("עûΪַͺ֣","Ϣ")); + return; + } + int intT=0; + Data data=new Data(); + intT=data.getRowCount("tb_student WHERE sname='"+student.getSname()+"'"); + if(intT>0){ + out.print(show.errorBox("ûѱעᣡ","עϢ")); + return; + }else{ + intT=data.insert("INSERT INTO tb_student(sname,password,name,age,sex,birthday,school,specialty,knowledge,email,resume) VALUES('"+ + student.getSname()+"','"+student.getPassword()+"','"+student.getName()+"','"+student.getAge()+"','"+ + student.getSex()+"','"+student.getBirthday()+"','"+student.getSchool()+"','"+student.getSpecialty()+"','"+ + student.getKnowledge()+"','"+student.getEmail()+"','"+student.getResume()+"')"); + if(intT<=0){ + out.print(show.errorBox("עʧܣݿ!","Ϣ")); + return; + }else{ + out.print(""); + } + } +} +%> diff --git a/19/WebRoot/student/reginfo.jsp b/19/WebRoot/student/reginfo.jsp new file mode 100644 index 0000000..4385f7b --- /dev/null +++ b/19/WebRoot/student/reginfo.jsp @@ -0,0 +1,97 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.db.Conn"%> +<%@ page import="com.bwm.page.Show"%> +<%@ page import="java.sql.*"%> + + + + + + + +<% +Conn con=new Conn(); +Show show=new Show(); +String strChecked="checked"; +String strUserName=(String)session.getAttribute("name"); +ResultSet rs=con.getRs("SELECT * FROM tb_student WHERE sname='"+strUserName+"'"); + if(rs.next()){ +%> + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + <%int intSex=rs.getInt(5);%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ޸עϢ
      <%=rs.getString(1)%>
        룺
    ȷϣ
    ʵ
        䣺
        > + + > + Ů
    ڣ + --
    ҵѧУ
    ѧרҵ
    ѧ
    ʼ
    ˼
    +   +
    +<% + }else{ + out.print(show.errorBox("ݿµ¼","Ϣ")); + } +%> + + \ No newline at end of file diff --git a/19/WebRoot/student/top.htm b/19/WebRoot/student/top.htm new file mode 100644 index 0000000..dbc5460 --- /dev/null +++ b/19/WebRoot/student/top.htm @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + +
     
    ҳ
    + + diff --git a/19/WebRoot/student/vjobinfo.jsp b/19/WebRoot/student/vjobinfo.jsp new file mode 100644 index 0000000..4b8e660 --- /dev/null +++ b/19/WebRoot/student/vjobinfo.jsp @@ -0,0 +1,46 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="com.bwm.db.Conn"%> +<%@ page import="java.sql.*"%> + + + + + + + + + + + + + +
     
    + + + + + + + + + +<% +Conn con=new Conn(); +String strChecked="checked"; +String strUserName=(String)session.getAttribute("name"); +ResultSet rs=con.getRs("SELECT * FROM tb_sjob WHERE sname='"+strUserName+"'"); + while(rs.next()){ + int intId=rs.getInt(1); +%> + + + + + + +<% + } +%> +
    ɾְϢ
    ְλʱЧʱɾ
    <%=rs.getString(4)%><%=rs.getDate(6)%><%=rs.getDate(7)%>ɾ
    + + \ No newline at end of file diff --git a/19/WebRoot/view.jsp b/19/WebRoot/view.jsp new file mode 100644 index 0000000..5d18369 --- /dev/null +++ b/19/WebRoot/view.jsp @@ -0,0 +1,154 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.sql.*"%> + + + + + + + + +

     

    + + + + +<% +String strSid=(String)request.getParameter("sid"); +String strCid=(String)request.getParameter("cid"); +String strEmail=null; +if(strSid!=null){ + ResultSet rs=con.getRs("SELECT * FROM tb_student AS a,tb_sjob AS b WHERE b.jobid='"+strSid.trim()+"' AND a.sname=b.sname"); + if(rs.next()){ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% + }else{ + show.errorBox("ûд","Ϣ"); + } + rs.close(); + con.close(); +}else if(strCid!=null){ + ResultSet rs=con.getRs("SELECT * FROM tb_company AS a,tb_cjob AS b WHERE b.jobid='"+strCid.trim()+"' AND a.cname=b.cname"); + if(rs.next()){ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% + }else{ + show.errorBox("ûдҵ","Ϣ"); + } + rs.close(); + con.close(); +} +%> + + + +
    ϸϢ
        <%=rs.getString(3)%>    䣺<%=rs.getInt(4)%>
        <% + int intS=rs.getInt(5); + if(intS==1){ + out.print(""); + }else{ + out.print("Ů"); + } +%>    <%=rs.getDate(6)%>
    ҵԺУ<%=rs.getString(7)%>רҵƣ<%=rs.getString(8)%>
    ѧ<%=rs.getString(9)%>Email +<% + strEmail=rs.getString(10); + session.setAttribute("email",strEmail); + out.print(strEmail); +%>
    ˼<%=rs.getString(11)%>
    ְҵ<%=rs.getString(14)%>ְλ <%=rs.getString(15)%>
    нˮ <%=rs.getString(16)%>ʱ䣺<%=rs.getDate(17)%>
    Чʱ䣺<%=rs.getDate(18)%>  
    ˵<%=rs.getString(19)%>
    ҵƣ<%=rs.getString(3)%>Email +<% + strEmail=rs.getString(4); + session.setAttribute("email",strEmail); + out.print(strEmail); +%>
    ϵ绰<%=rs.getString(5)%>ҵ<%=rs.getString(6)%>
    ҵַ<%=rs.getString(7)%>
    ˾飺 <%=rs.getString(8)%>
    ҵ <%=rs.getString(11)%> Ƹְλ <%=rs.getString(12)%>
    ŵнˮ <%=rs.getString(13)%>ʱ䣺<%=rs.getDate(14)%>
    Чʱ䣺<%=rs.getDate(15)%>
    ˵<%=rs.getString(16)%>
    ʼ    رմ
    + + diff --git a/19/src/com/bwm/db/Conn.java b/19/src/com/bwm/db/Conn.java new file mode 100644 index 0000000..e8d0420 --- /dev/null +++ b/19/src/com/bwm/db/Conn.java @@ -0,0 +1,116 @@ +package com.bwm.db; + +import java.sql.*; + +/** + *class explain:Database connection + *set up name: crazyadept + *set up time: 11/22/2004 + */ +public class Conn { + private static Connection con; + private Statement stmt; + private ResultSet rs; + private static final String drivername = + "com.microsoft.sqlserver.jdbc.SQLServerDriver"; + private static final String url = "jdbc:sqlserver://127.0.0.1:1433;DatabaseName=db_Job;user=sa;password=;"; + + /** + *method explain: Get Connection DataBase + *modify time: 12/20/2004 + */ + public static synchronized Connection getCon() throws Exception { + try { + Class.forName(drivername); + con = DriverManager.getConnection(url); + return con; + } catch (SQLException e) { + System.err.println(e.getMessage()); + throw e; + } + } + + /** + *output parameter: in order select in SQL + *modify time: 12/20/2004 + */ + public Statement getStmtread() { + try { + con = getCon(); + stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, + ResultSet.CONCUR_READ_ONLY); + return stmt; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } + return null; + } + + /** + *output parameter: Data + *input parameter: SQL select sentence + *modify time: 11/29/2004 + */ + public ResultSet getRs(String sql) { + try { + stmt = getStmtread(); + rs = stmt.executeQuery(sql); + return rs; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } + return null; + } + + /** + *output parameter: not in order select in str SQL + *modify time: 11/29/2004 + */ + public Statement getStmt() { + try { + con = getCon(); + stmt = con.createStatement(); + return stmt; + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } + return null; + } + + /** + *method explain: Close DataBase Connection + *modify time: 11/29/2004 + */ + public synchronized void close() { + try { + if (rs != null) { + rs.close(); + rs = null; + } + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } + try { + if (stmt != null) { + stmt.close(); + stmt = null; + } + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } + try { + if (con != null) { + con.close(); + con = null; + } + } catch (Exception e) { + System.err.println(e.getMessage()); + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/19/src/com/bwm/db/Conn.java.LCK b/19/src/com/bwm/db/Conn.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/src/com/bwm/db/Conn.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/src/com/bwm/db/Data.java b/19/src/com/bwm/db/Data.java new file mode 100644 index 0000000..e49d379 --- /dev/null +++ b/19/src/com/bwm/db/Data.java @@ -0,0 +1,109 @@ +package com.bwm.db; + +import java.sql.*; + +/** + *class explain:DM + *set up name: crazyadept + *set up time: 11/29/2004 + */ +public class Data { + + private Conn con = new Conn(); + private Statement stmt; + private ResultSet rs; + + /** + *input parameter: DataBase table name + *output parameter: count = -2 ;Exception + * count = -1 ;Error + * count = 0 ;Nothing + * count > 0 ;Right + *modify time: 11/29/2004 + */ + public int getRowCount(String strSql) { + int intCount = 0; + try { + stmt = con.getStmtread(); + rs = stmt.executeQuery("SELECT COUNT(*) FROM " + strSql); + if (rs.next()) { + intCount = rs.getInt(1); + } else { + intCount = -1; + } + } catch (Exception e) { + intCount = -2; + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + con.close(); + return intCount; + } + } + + /** + *input parameter: insert SQL + *output parameter: count = -2 >Exception + * count = 0 >nothing + * count > 1 >right + *modify time: 11/29/2004 + */ + public int insert(String sql) { + int count = 0; + stmt = con.getStmt(); + try { + count = stmt.executeUpdate(sql); + } catch (Exception e) { + count = -2; + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + con.close(); + return count; + } + } + + /** + *input parameter: update SQL + *output parameter: count = -2 >Exception + * count = 0 >nothing + * count > 1 >right + *modify time: 11/29/2004 + */ + public int update(String sql) { + int count = 0; + stmt = con.getStmt(); + try { + count = stmt.executeUpdate(sql); + } catch (Exception e) { + count = -2; + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + con.close(); + return count; + } + } + + /** + *input parameter: delete SQL + *output parameter: count = -2 >Exception + * count = 0 >nothing + * count > 1 >right + *modify time: 11/29/2004 + */ + public int delete(String sql) { + int count = 0; + stmt = con.getStmt(); + try { + count = stmt.executeUpdate(sql); + } catch (Exception e) { + count = -2; + System.err.println(e.getMessage()); + e.printStackTrace(); + } finally { + con.close(); + return count; + } + } +} \ No newline at end of file diff --git a/19/src/com/bwm/db/Data.java.LCK b/19/src/com/bwm/db/Data.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/src/com/bwm/db/Data.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/src/com/bwm/page/Show.class b/19/src/com/bwm/page/Show.class new file mode 100644 index 0000000..2914b8a Binary files /dev/null and b/19/src/com/bwm/page/Show.class differ diff --git a/19/src/com/bwm/page/Show.java b/19/src/com/bwm/page/Show.java new file mode 100644 index 0000000..605da16 --- /dev/null +++ b/19/src/com/bwm/page/Show.java @@ -0,0 +1,30 @@ +package com.bwm.page; + +/** + *class explain:String deal with + *set up name: crazyadept + *set up time: 12/01/2004 + */ +public class Show { + + /*************************************************** + *input parameter: Html page + *output parameter: message title and content + *modify time: 11/29/2004 + ****************************************************/ + public String errorBox(String str1, String str2) { + String str = + "

    "; + str = str + ""; + str = str + "
    "; + str = str + "1" + str2 + + "
    "; + str = str + "
    "; + str = str + "A"; + str = str + "

    " + str1 + + "

    "; + str = str + ""; + str = str + "
    "; + return str; + } +} diff --git a/19/src/com/bwm/page/Show.java.LCK b/19/src/com/bwm/page/Show.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/src/com/bwm/page/Show.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/src/com/bwm/string/Sql.java.LCK b/19/src/com/bwm/string/Sql.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/src/com/bwm/string/Sql.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/src/com/bwm/string/Str.java b/19/src/com/bwm/string/Str.java new file mode 100644 index 0000000..238114a --- /dev/null +++ b/19/src/com/bwm/string/Str.java @@ -0,0 +1,51 @@ +package com.bwm.string; + +import java.io.*; + +/** + *class explain:String deal with + *set up name: crazyadept + *set up time: 11/25/2004 + */ +public class Str { + + /** + *output parameter: GB2312 + *input parameter: iso-8859-1 + *modify time: 11/29/2004 + */ + public String toChinese(String str) { + if (str == null || str.length() < 1) { + str = ""; + } else { + try { + str = (new String(str.getBytes("iso-8859-1"), "GB2312")); + } catch (UnsupportedEncodingException e) { + System.err.print(e.getMessage()); + e.printStackTrace(); + return str; + } + } + return str; + } + + /** + *output parameter: it's not have "'" + *input parameter: it's have "'" + *modify time: 11/29/2004 + */ + public String dbEncode(String str) { + if (str == null) { + str = ""; + } else { + try { + str = str.replace('\'', (char) 1).trim(); + } catch (Exception e) { + System.err.print(e.getMessage()); + e.printStackTrace(); + return str; + } + } + return str; + } +} diff --git a/19/src/com/bwm/string/Str.java.LCK b/19/src/com/bwm/string/Str.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/src/com/bwm/string/Str.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/src/com/bwm/time/Count.class b/19/src/com/bwm/time/Count.class new file mode 100644 index 0000000..3bae7c1 Binary files /dev/null and b/19/src/com/bwm/time/Count.class differ diff --git a/19/src/com/bwm/time/Count.java.LCK b/19/src/com/bwm/time/Count.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/src/com/bwm/time/Count.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/src/com/bwm/time/Time.class b/19/src/com/bwm/time/Time.class new file mode 100644 index 0000000..064756b Binary files /dev/null and b/19/src/com/bwm/time/Time.class differ diff --git a/19/src/com/bwm/time/Time.java b/19/src/com/bwm/time/Time.java new file mode 100644 index 0000000..c56aa95 --- /dev/null +++ b/19/src/com/bwm/time/Time.java @@ -0,0 +1,35 @@ +package com.bwm.time; + +import java.text.*; +import java.util.*; + +/** + *class explain:Time operate + *set up name: crazyadept + *set up time: 11/21/2004 + */ +public class Time { + private Date time; + private String strtime; + private SimpleDateFormat format; + + /** + *method explain: initialization Time + *modify time: 12/07/2004 + */ + public Time() { + strtime = ""; + format = null; + } + + /** + *output parameter: Get String type year-month-data + *modify time: 12/07/2004 + */ + public String getYMD() { + time = new Date(); + format = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()); + strtime = format.format(time); + return strtime; + } +} diff --git a/19/src/com/bwm/time/Time.java.LCK b/19/src/com/bwm/time/Time.java.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/19/src/com/bwm/time/Time.java.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/19/src/job/Cjob.java b/19/src/job/Cjob.java new file mode 100644 index 0000000..39c3231 --- /dev/null +++ b/19/src/job/Cjob.java @@ -0,0 +1,79 @@ +package job; + +public class Cjob { + + private int jobid; + private String cname; + private String specialty; + private String job; + private String emolument; + private String ptime; + private String atime; + private String other; + public Cjob() { + } + + public int getJobid() { + return jobid; + } + + public void setJobid(int jobid) { + this.jobid = jobid; + } + + public String getCname() { + return cname; + } + + public void setCname(String cname) { + this.cname = cname; + } + + public String getSpecialty() { + return specialty; + } + + public void setSpecialty(String specialty) { + this.specialty = specialty; + } + + public String getJob() { + return job; + } + + public void setJob(String job) { + this.job = job; + } + + public String getEmolument() { + return emolument; + } + + public void setEmolument(String emolument) { + this.emolument = emolument; + } + + public String getPtime() { + return ptime; + } + + public void setPtime(String ptime) { + this.ptime = ptime; + } + + public String getAtime() { + return atime; + } + + public void setAtime(String atime) { + this.atime = atime; + } + + public String getOther() { + return other; + } + + public void setOther(String other) { + this.other = other; + } +} \ No newline at end of file diff --git a/19/src/job/Cjob.jbx b/19/src/job/Cjob.jbx new file mode 100644 index 0000000..559e0ce --- /dev/null +++ b/19/src/job/Cjob.jbx @@ -0,0 +1,14 @@ +[PropertyInfo] +jobid,int,false,false,jobid,jobid,true, +cname,String,false,false,cname,cname,true, +specialty,String,false,false,specialty,specialty,true, +job,String,false,false,job,job,true, +emolument,String,false,false,emolument,emolument,true, +ptime,String,false,false,ptime,ptime,true, +atime,String,false,false,atime,atime,true, +other,String,false,false,other,other,true, +[IconNames] + + + + diff --git a/19/src/job/Company.java b/19/src/job/Company.java new file mode 100644 index 0000000..348ad8a --- /dev/null +++ b/19/src/job/Company.java @@ -0,0 +1,88 @@ +package job; + +/** + *

    Title:

    + *

    Description: Company type

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Company { + + private String cname; + private String password; + private String name; + private String email; + private String tel; + private String manage; + private String address; + private String resume; + public Company() { + } + + public String getCname() { + return cname; + } + + public void setCname(String cname) { + this.cname = cname; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getTel() { + return tel; + } + + public void setTel(String tel) { + this.tel = tel; + } + + public String getManage() { + return manage; + } + + public void setManage(String manage) { + this.manage = manage; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getResume() { + return resume; + } + + public void setResume(String resume) { + this.resume = resume; + } +} \ No newline at end of file diff --git a/19/src/job/Company.jbx b/19/src/job/Company.jbx new file mode 100644 index 0000000..a5bb167 --- /dev/null +++ b/19/src/job/Company.jbx @@ -0,0 +1,14 @@ +[PropertyInfo] +address,String,false,false,address,address,true, +cname,String,false,false,cname,cname,true, +email,String,false,false,email,email,true, +manage,String,false,false,manage,manage,true, +name,String,false,false,name,name,true, +password,String,false,false,password,password,true, +resume,String,false,false,resume,resume,true, +tel,String,false,false,tel,tel,true, +[IconNames] + + + + diff --git a/19/src/job/Company.jbx~ b/19/src/job/Company.jbx~ new file mode 100644 index 0000000..bd9c4e6 --- /dev/null +++ b/19/src/job/Company.jbx~ @@ -0,0 +1,14 @@ +[PropertyInfo] +cname,String,false,false,cname,cname,true, +password,String,false,false,password,password,true, +name,String,false,false,name,name,true, +email,String,false,false,email,email,true, +tel,String,false,false,tel,tel,true, +manage,String,false,false,manage,manage,true, +address,String,false,false,address,address,true, +resume,String,false,false,resume,resume,true, +[IconNames] + + + + diff --git a/19/src/job/Sjob.java b/19/src/job/Sjob.java new file mode 100644 index 0000000..e5bc8da --- /dev/null +++ b/19/src/job/Sjob.java @@ -0,0 +1,88 @@ +package job; + +/** + *

    Title:

    + *

    Description: Student issue to apply for a job

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Sjob { + + private int jobid; + private String job; + private String emolument; + private String other; + private String ptime; + private String atime; + private String specialty; + private String sname; + public Sjob() { + } + + public int getJobid() { + return jobid; + } + + public void setJobid(int jobid) { + this.jobid = jobid; + } + + public String getSname() { + return sname; + } + + public void setSname(String sname) { + this.sname = sname; + } + + public String getSpecialty() { + return specialty; + } + + public void setSpecialty(String specialty) { + this.specialty = specialty; + } + + public String getJob() { + return job; + } + + public void setJob(String job) { + this.job = job; + } + + public String getEmolument() { + return emolument; + } + + public void setEmolument(String emolument) { + this.emolument = emolument; + } + + public String getOther() { + return other; + } + + public void setOther(String other) { + this.other = other; + } + + public String getPtime() { + return ptime; + } + + public void setPtime(String ptime) { + this.ptime = ptime; + } + + public String getAtime() { + return atime; + } + + public void setAtime(String atime) { + this.atime = atime; + } +} \ No newline at end of file diff --git a/19/src/job/Student.java b/19/src/job/Student.java new file mode 100644 index 0000000..dc5162e --- /dev/null +++ b/19/src/job/Student.java @@ -0,0 +1,115 @@ +package job; + +/** + *

    Title:

    + *

    Description: Student type

    + *

    Copyright: Copyright (c) 2004

    + *

    Company: MR

    + * @author BWM + * @version 1.0 + */ + +public class Student { + + private String sname; + private String password; + private String name; + private int age; + private int sex; + private String resume; + private String school; + private String specialty; + private String knowledge; + private String email; + private String birthday; + public Student() { + } + + public String getSname() { + return sname; + } + + public void setSname(String sname) { + this.sname = sname; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + + public int getSex() { + return sex; + } + + public void setSex(int sex) { + this.sex = sex; + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getSchool() { + return school; + } + + public void setSchool(String school) { + this.school = school; + } + + public String getSpecialty() { + return specialty; + } + + public void setSpecialty(String specialty) { + this.specialty = specialty; + } + + public String getKnowledge() { + return knowledge; + } + + public void setKnowledge(String knowledge) { + this.knowledge = knowledge; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getResume() { + return resume; + } + + public void setResume(String resume) { + this.resume = resume; + } +} \ No newline at end of file diff --git a/19/src/job/Student.jbx b/19/src/job/Student.jbx new file mode 100644 index 0000000..7de6373 --- /dev/null +++ b/19/src/job/Student.jbx @@ -0,0 +1,17 @@ +[PropertyInfo] +age,int,false,false,age,age,true, +birthday,String,false,false,birthday,birthday,true, +email,String,false,false,emial,emial,true, +knowledge,String,false,false,knowledge,knowledge,true, +name,String,false,false,name,name,true, +password,String,false,false,password,password,true, +resume,String,false,false,resume,resume,true, +school,String,false,false,school,school,true, +sex,int,false,false,sex,sex,true, +sname,String,false,false,sname,Sname,true, +specialty,String,false,false,specialty,specialty,true, +[IconNames] + + + + diff --git a/19/src/job/Student.jbx~ b/19/src/job/Student.jbx~ new file mode 100644 index 0000000..be14b70 --- /dev/null +++ b/19/src/job/Student.jbx~ @@ -0,0 +1,17 @@ +[PropertyInfo] +sname,String,false,false,Sname,Sname,true, +password,String,false,false,password,password,true, +name,String,false,false,name,name,true, +age,int,false,false,age,age,true, +sex,int,false,false,sex,sex,true, +birthday,java.util.Date,false,false,birthday,birthday,true, +school,String,false,false,school,school,true, +specialty,String,false,false,specialty,specialty,true, +knowledge,String,false,false,knowledge,knowledge,true, +emial,String,false,false,emial,emial,true, +resume,String,false,false,resume,resume,true, +[IconNames] + + + + diff --git a/19/src/job/sjob.jbx b/19/src/job/sjob.jbx new file mode 100644 index 0000000..94cb2fb --- /dev/null +++ b/19/src/job/sjob.jbx @@ -0,0 +1,14 @@ +[PropertyInfo] +jobid,int,false,false,jobid,jobid,true, +sname,String,false,false,sname,sname,true, +specialty,String,false,false,specialty,specialty,true, +job,String,false,false,job,job,true, +emolument,String,false,false,emolument,emolument,true, +other,String,false,false,other,other,true, +ptime,String,false,false,ptime,ptime,true, +atime,String,false,false,atime,atime,true, +[IconNames] + + + + diff --git a/19/src/org/apache/jsp/jsp.jbx b/19/src/org/apache/jsp/jsp.jbx new file mode 100644 index 0000000..5821e7b --- /dev/null +++ b/19/src/org/apache/jsp/jsp.jbx @@ -0,0 +1,7 @@ +[PropertyInfo] +_jspx_inited,boolean,false,false, , ,false, +[IconNames] + + + + diff --git "a/19/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/19/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..b0d3baf Binary files /dev/null and "b/19/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/20/.classpath b/20/.classpath new file mode 100644 index 0000000..a96bc6f --- /dev/null +++ b/20/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/20/.mymetadata b/20/.mymetadata new file mode 100644 index 0000000..6d36661 --- /dev/null +++ b/20/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/20/.project b/20/.project new file mode 100644 index 0000000..9bfc89c --- /dev/null +++ b/20/.project @@ -0,0 +1,50 @@ + + + 20 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/20/.settings/.jsdtscope b/20/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/20/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/20/.settings/org.eclipse.wst.jsdt.ui.superType.container b/20/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/20/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/20/.settings/org.eclipse.wst.jsdt.ui.superType.name b/20/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/20/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/20/WebRoot/About.jsp b/20/WebRoot/About.jsp new file mode 100644 index 0000000..d088cb5 --- /dev/null +++ b/20/WebRoot/About.jsp @@ -0,0 +1,82 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> + + +ۼվ + + + + + +<%! + ResultSet rs; + String sql; + int i; +%> + + + +<%@ include file="Top.jsp" %> + + + + + + + + + + + + + +
     δ չ
    +
    +      + <% + sql="select * from tb_News where Title='δչ'"; + rs=data.getrs(sql); + rs.beforeFirst(); + if(rs.next()){ + out.write(rs.getString("Content")); + } + data.close(); + %> +
      ʷ
         +
    +      + <% + sql="select * from tb_News where Title='ʷع'"; + rs=data.getrs(sql); + rs.beforeFirst(); + if(rs.next()){ + out.write(rs.getString("Content")); + } + data.close(); + %> +
    + + + + +
    ̱־
    + + + + +
    +

    <%=bottom.seturl("ʡտƼ޹˾","www.mingrisoft.com")%> ϵͳ<%=bottom.setnumbers("0431-4972266")%>
    + <%=bottom.setemail("mingrisoft@mingrisoft.com")%>
    + Copyright © 2005-2008

    +
    + + diff --git a/20/WebRoot/About_Update.jsp b/20/WebRoot/About_Update.jsp new file mode 100644 index 0000000..11bca5b --- /dev/null +++ b/20/WebRoot/About_Update.jsp @@ -0,0 +1,37 @@ +<%@ page contentType="text/html; charset=gb2312"%> + + +<%! + String sql; + String type; + String content; +%> +<% request.setCharacterEncoding("gb2312");%> +<% +type=request.getParameter("action"); +content=request.getParameter("content"); +if(type.equals("future")){ + sql="update tb_News set Content='"+content+"' where Title='δչ'"; + int i=data.getint(sql); + if(i>0){ +%> + +<% + } +} +else{ + sql="update tb_News set Content='"+content+"' where Title='ʷع'"; + int i=data.getint(sql); + if(i>0){ +%> + +<% + } +} +%> diff --git a/20/WebRoot/Bottom.jsp b/20/WebRoot/Bottom.jsp new file mode 100644 index 0000000..f1b95df --- /dev/null +++ b/20/WebRoot/Bottom.jsp @@ -0,0 +1,23 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + + + + + + + + + + + + +
    µ
    ɣ
    NHL
    + + + + +
    +

    <%=bottom.seturl("ʡտƼ޹˾","www.mingrisoft.com")%> ̨<%=bottom.setnumbers("0431-4972266")%>
    + <%=bottom.setemail("mingrisoft@mingrisoft.com")%>
    + Copyright © 2005-2008

    +
    diff --git a/20/WebRoot/Car_Change.jsp b/20/WebRoot/Car_Change.jsp new file mode 100644 index 0000000..1891fe5 --- /dev/null +++ b/20/WebRoot/Car_Change.jsp @@ -0,0 +1,39 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.sql.*" %> + + +޸Ĵ + + + + + +

    +<%! int counts; +int logo; +int sum; +%> +<% +gets1.setdata(request.getInputStream(),request.getContentLength()); +counts=gets1.getcounts(); +logo=Integer.parseInt(gets1.getdatas(2).trim()); +%> +<%for(int i=3;i<=counts;i++){%> +<%sum=sum+adds.getupdate(gets1.getformname(i),gets1.getdatas(i),gets1.getdatas(1),logo);%> +<%}%> +<%if(sum==counts-2){%> +<% sum=0; %> + +<%}else{%> +<% sum=0; %> + +<%}%> +

    + + diff --git a/20/WebRoot/Car_Delete.jsp b/20/WebRoot/Car_Delete.jsp new file mode 100644 index 0000000..44b3502 --- /dev/null +++ b/20/WebRoot/Car_Delete.jsp @@ -0,0 +1,23 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<% request.setCharacterEncoding("gb2312");%> + + + +ޱĵ + + + +<%! +String sql; +int sum;%> +<%int logo=Integer.parseInt(request.getParameter("id"));%> +<% sql="delete tb_Values where Logo="+logo; +sum=datas.getint(sql); +%> + + + diff --git a/20/WebRoot/Cars_Add.jsp b/20/WebRoot/Cars_Add.jsp new file mode 100644 index 0000000..5bb9229 --- /dev/null +++ b/20/WebRoot/Cars_Add.jsp @@ -0,0 +1,474 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +<%if(request.getParameter("id")==null){%> <%}else{%> <%}%> + + + + +<%! +String sql; +ResultSet rs; +int logo; +int typenumber; +int sum; +ResultSetMetaData rsmd; +%> +<% +if(request.getParameter("type")!=null){ +logo=Integer.parseInt(request.getParameter("id")); +typenumber=Integer.parseInt(request.getParameter("type")); +rs=cross.getrs(typenumber,logo); +} +else{ +rs=null; +} +%> + + + + + + + + + +
    + + + + + + +
    +
    <%if(request.getParameter("id")==null){%> <%}else{%> <%}%>
    + + + + + + + + + + +
    + + + + + + +
    +
    + <%if(request.getParameter("type")==null){%> + +<%}%> +
    +
    +
    " method="post" enctype="multipart/form-data" name="orderform"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    <%if(rs!=null){%><%}%>
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    Ʒƣ
    ">
    ͺţ
    ">
    Ⱥ
    ">
    ο۸
    "> + Ԫ
    ּ飺
    + +
     
     
    ͼƬ飺
    ">
    ɫ
    "> 
    ӦͼƬ
    "> +
    ۣ
    ">
    ӦͼƬ
    "> +
    Σ
    ">
    ӦͼƬ
    "> +
    ã
    ">
    ӦͼƬ
    "> +
     
     
    + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    ߳٣
    ">
    ƶ룺
    ">
    ͺģ
    ">
    ͺģ
    "> +
    +
    + + + + + +
    0-100KMʱ䣺
    ">
    +
     
     
    + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    ߴ磺
    "> + * *
    Сؼ϶
    ">
    Сתֱ
    ">
    أ
    + "> +
    ">
    λ
    ">
    ȫң
    ">
    ݻ
    ">
    ȼݻ
    ">
    ϵ
    ">  
     
     
    + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    ʽ
    ">
    ̥ͼ
    ">
    ƶװʽ
    ">
    תϵͳ
    ">
    ʽ
    ">
     
     
    + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    ƣ
    ">
    λã
    ">
    ʽ
    ">
    ">
    ">
    ʣ
    ">
    Ťأ
    ">
    ʽ
    ">
    ͺţ
    ">
     
     
    + +
     
    + + + + + + + +
     
    + +
    + +
    + +
    + +
    +
    + " onClick="checks()"> + + +
    + + diff --git a/20/WebRoot/Cars_Add_S.jsp b/20/WebRoot/Cars_Add_S.jsp new file mode 100644 index 0000000..18add32 --- /dev/null +++ b/20/WebRoot/Cars_Add_S.jsp @@ -0,0 +1,518 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +<%if(request.getParameter("id")==null){%> <%}else{%> <%}%> + + + +<%! +String sql; +ResultSet rs; +int logo; +int typenumber; +int sum; +ResultSetMetaData rsmd; +%> +<% +if(request.getParameter("type")!=null){ +logo=Integer.parseInt(request.getParameter("id")); +typenumber=Integer.parseInt(request.getParameter("type")); +rs=cross.getrs(typenumber,logo); +} +else{ +rs=null; +} +%> + + + + + + + + +
    + + + + + + +
    +
    <%if(request.getParameter("id")==null){%> <%}else{%> <%}%>
    + + + + + + + + + + +
    + + + + + +
    +
    + <%if(request.getParameter("type")==null){%> + <%}%> +
    +
    +
    " method="post" enctype="multipart/form-data" name="orderform"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    <%if(rs!=null){%><%}%>
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    Ʒƣ
    ">
    ͺţ
    ">
    Ⱥ
    ">
    ο۸
    "> + Ԫ
    ּ飺
    + +
     
     
    ͼƬ飺
    ">
    ɫ
    "> 
    ӦͼƬ
    " size="35"> +
    ۣ
    " size="60">
    ӦͼƬ
    " size="35"> +
    Σ
    " size="60">
    ӦͼƬ
    " size="35"> +
    ã
    " size="60">
    ӦͼƬ
    " size="35"> +
     
     
    + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    ߳٣
    ">
    ʽ
    ">
    ƶ룺
    ">
    Сתֱ
    " size="12"> +
    +
    + + + + + +
    ¶ȣ
    ">
    +
     
     
    + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    ߴ磺
    " size="30"> + * *
    ڲߴ磺
    " size="30"> + * *
    " size="12">
    أ
    " size="12">
    غɷ䣨գ
    + " size="12"> +
    غɷ䣨
    "size="12">
    أ
    " size="12">
    ܣ
    " size="12">
    Сؼ϶
    " size="12">
    " size="12">
    ־ࣺ
    " size="12">
    ݻ
    + " size="12"> +
     
     
    + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    ʽ
    " size="60">
    ʽ
    " size="60">
    " size="60">
    ʽ
    " size="60">
    ܣ
    " size="60">
    ǰ᣺
    " size="60">
    ̥
    " size="60">
    ϵͳ
    " size="60">
    ϵͳ
    " size="60">
    " size="60">
    ̥ͼ
    " size="60">
    ƶװʽ
    " size="60">
    תʽ
    " size="60">
     
     
    + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    ƣ
    " size="12">
    λã
    " size="12">
    ʽ
    " size="45">
    " size="12">
    " size="12">
    ʣ
    " size="12">
    Ťأ
    " size="12">
    ׾
    " size="12">
    ѹȣ
    " size="12">
    0-100KMʱ䣺
    " size="12">
    ʽ
    " size="12">
    ٹͺģ
    " size="12">
    ȼࣺ
    " size="12">
     
     
    + +
      ʶ
    + + + + + + + + + + + + + + + + + + + + + + + +
        
    ͺţ
    ">
    ʶ룺
    ">
    ѡɫ
    ">
     
     
    +
    +
    +
    + " onClick="checks()"> + + +
    + + diff --git a/20/WebRoot/Cars_Add_Z.jsp b/20/WebRoot/Cars_Add_Z.jsp new file mode 100644 index 0000000..6623003 --- /dev/null +++ b/20/WebRoot/Cars_Add_Z.jsp @@ -0,0 +1,160 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +<%if(request.getParameter("id")==null){%> <%}else{%> <%}%> + + + + + +<%!int logo; +ResultSet rs; +%> +<% +if(request.getParameter("id")!=null){ +logo=Integer.parseInt(request.getParameter("id")); +rs=cross.getrs(4,logo); +} +else{ +rs=null; +} +%> + + + + + + +
    + + + + + + +
    +
    <%if(request.getParameter("id")==null){%> <%}else{%> <%}%>
    + + + + + + + + + + +
     
    +
    " method="post" enctype="multipart/form-data" name="orderform"> + + + + + + + + + + + +
    <%if(rs!=null){%><%}%>
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        
    ƣ
    ">
    ۸
    ">
    ʱã
    + "> +
    ̷ã
    ">
    Ŀ
    ">
    Ŀ
    ">
    ע
     
     
    ͼƬ
    ">
     
     
    +
    +
    +
    + " onClick="checks()"> + + +
    + + diff --git a/20/WebRoot/Cars_Particular_Default.jsp b/20/WebRoot/Cars_Particular_Default.jsp new file mode 100644 index 0000000..6e799e1 --- /dev/null +++ b/20/WebRoot/Cars_Particular_Default.jsp @@ -0,0 +1,1075 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<%@ page import="java.lang.*" %> + + +ۼվ + + + + + + + +<%! + String sql; + String keyword,type; + String vari; + String name; + int homo; + int pagecount; + int pages; + int nows; + int i; + ResultSet rs; + ResultSet rs1; +%> +<% +rs=cross.getrs(Integer.parseInt(request.getParameter("type")),Integer.parseInt(request.getParameter("id"))); + %> + + +<%@ include file="Top.jsp" %> + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
     վ
    + + <% + sql="select * from tb_News where Type='վڹ' order by IssueDate"; + ResultSet rs3; + rs3=data.getrs(sql); + rs3.beforeFirst(); + i=0; + while(rs3.next()&&(i<5)){ + i++; + %> + <%=""+rs3.getString("Title")+"" %>
    + + <% + } + data.close(); + %> + +
    +
     վ
    <%=search.getsearch()%>
     ű
    <%=news.getstring()%>
     ҵ
    + + + + + + +
    + <%if(rs!=null){ + rs.beforeFirst(); + if(rs.next()){ + %> + + + + + + + +
     Ϣչʾ
    + + + + + + + + +
    + <% + sql="select * from tb_Basic1 where Homo="+Integer.parseInt(request.getParameter("type")); + rs1=data.getrs(sql); + rs1.beforeFirst(); + while(rs1!=null&&rs1.next()){ + %> + &id=<%=request.getParameter("id")%>&homo=<%=rs1.getInt("ID")%>" style="color:#000000 "><%out.print(rs1.getString("Name")+"| ");%> + + <%} + data.close(); + %> +
    + + + + + + +
    " width="236" height="141">
    +
    + + + + + +
    ο۸<%=rs.getString("ۼ")%>
    + <%=rs.getString("ͺ")%>','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')"> +
    +

    +         <%=rs.getString("ּ")%>
    + <%if(request.getParameter("homo")==null){%> + + + + + + + + + + +
     
     
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ʒƣ
    + <%out.write(rs.getString("Ʒ"));%> +
    +
    ͺţ
    + <%out.write(rs.getString("ͺ"));%> +
    Ⱥ
    + <%out.write(rs.getString("Ⱥ"));%> +
    ο۸
    + <%out.write(rs.getString("ۼ"));%> + Ԫ
    ɫ
    + <%out.write(rs.getString("ɫ"));%> +
    ۣ
    + <%out.write(rs.getString(""));%> +
    Σ
    + <%out.write(rs.getString(""));%> +
    ã
    + <%out.write(rs.getString(""));%> +
    + + + + + + + + + + + + + + + + + + + + +
    " width="110" height="90">
    " width="110" height="90">
    + <%out.write(rs.getString(""));%> +
    + <%out.write(rs.getString(""));%> +
    " width="110" height="90">
    +
    ɫ
    " width="110" height="90">
    + <%out.write(rs.getString(""));%> +
    + <%out.write(rs.getString("ɫ"));%> +
    + <%}else{ + homo=Integer.parseInt(request.getParameter("homo")); + sql="select * from tb_Basic1 where ID="+homo; + ResultSet rs2=data.getrs(sql); + rs2.beforeFirst(); + if(rs2!=null&&rs2.next()){ + name=rs2.getString("Name"); + } + data.close(); + if(request.getParameter("type").equals("1")){ + if(name.equals("")){%> + + + + + + + + + + +
     
     
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    ߳٣
    + <%out.write(rs.getString("߳"));%> +
    ƶ룺
    + <%out.write(rs.getString("ƶ"));%> +
    ͺģ
    + <%out.write(rs.getString("ͺ"));%> +
    ͺģ
    + <%out.write(rs.getString("ͺ"));%> +
    0-100KMʱ䣺
    + <%out.write(rs.getString("0-100KMʱ"));%> +
    +
    + <%} + if(name.equals("β")){%> + + + + + + + + + + +
     
     
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ߴ磺
    + <%out.write(rs.getString("ߴ"));%> +
    Сؼ϶
    + <%out.write(rs.getString("Сؼ϶"));%> +
    Сתֱ
    + <%out.write(rs.getString("Сתֱ"));%> +
    أ
    +
    + <%out.write(rs.getString(""));%> +
    + <%out.write(rs.getString(""));%> +
    λ
    + <%out.write(rs.getString("λ"));%> +
    ȫң
    + <%out.write(rs.getString("ȫ"));%> +
    ݻ
    + <%out.write(rs.getString("ݻ"));%> +
    ȼݻ
    + <%out.write(rs.getString("ȼݻ"));%> +
    ϵ
    + <%out.write(rs.getString("ϵ"));%> +
    +
    + <%}if(name.equals("̲")){%> + + + + + + + + + + +
     
     
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    ʽ
    <%out.write(rs.getString("ʽ"));%> 
    ̥ͼ
    <%out.write(rs.getString("̥ͼ"));%>
    ƶװʽ
    <%out.write(rs.getString("ƶװʽ"));%>
    תϵͳ
    <%out.write(rs.getString("תϵͳ"));%>
    ʽ
    <%out.write(rs.getString("ʽ"));%>
    +
    + <%}if(name.equals("")){%> + + + + + + + + + + +
     
     
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ƣ
    + <%out.write(rs.getString(""));%> +
    λã
    + <%out.write(rs.getString("λ"));%> +
    ʽ
    + <%out.write(rs.getString("ʽ"));%> +
    + <%out.write(rs.getString(""));%> +
    + <%out.write(rs.getString(""));%> +
    ʣ
    + <%out.write(rs.getString(""));%> +
    Ťأ
    + <%out.write(rs.getString("Ť"));%> +
    ʽ
    + <%out.write(rs.getString("ʽ"));%> +
    ͺţ
    + <%out.write(rs.getString("ͺ"));%> +
    +
    + <%}if(name.equals("")){%> + + + + + + + + + + +
     
     
    + + + +
    + +
    + <%}if(name.equals("˵")){%> + + + + + + + + + + +
      ˵
     
    + + + +
    + +
    + <%}if(name.equals("׼װ")){%> + + + + + + + + + + +
      ׼ װ
     
    + + + +
    + +
    + <%}if(name.equals("ѡװװ")){%> + + + + + + + + + + +
     ѡ װ װ
     
    + + + +
    + +
    + <%}if(name.equals("")){%> + + + + + + + + + + +
     
     
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ʒƣ
    + <%out.write(rs.getString("Ʒ"));%> +
    +
    ͺţ
    + <%out.write(rs.getString("ͺ"));%> +
    Ⱥ
    + <%out.write(rs.getString("Ⱥ"));%> +
    ο۸
    + <%out.write(rs.getString("ۼ"));%> + Ԫ
    ɫ
    + <%out.write(rs.getString("ɫ"));%> +
    ۣ
    + <%out.write(rs.getString(""));%> +
    Σ
    + <%out.write(rs.getString(""));%> +
    ã
    + <%out.write(rs.getString(""));%> +
    + + + + + + + + + + + + + + + + + + + + +
    " width="110" height="90">
    " width="110" height="90">
    + <%out.write(rs.getString(""));%> +
    + <%out.write(rs.getString(""));%> +
    " width="110" height="90">
    +
    ɫ
    " width="110" height="90">
    + <%out.write(rs.getString(""));%> +
    + <%out.write(rs.getString("ɫ"));%> +
    +<%}}else{if(name.equals("")){%> + + + + + + + + + + +
     
     
    + + + +
    + + + + + + + + + + + + + + + + + + + + +
    ߳٣
    + <%=rs.getString("߳")%> +
    ʽ
    + <%=rs.getString("ʽ")%> +
    ƶ룺
    + <%=rs.getString("ƶ")%> +
    Сתֱ
    + <%=rs.getString("Сתֱ")%> +
    ¶ȣ
    + <%=rs.getString("¶")%> +
    +<%}if(name.equals("ߴ")){%> + + + + + + + + + + +
     
     
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ߴ磺
    + <%=rs.getString("γߴ")%> +
    ڲߴ磺
    + <%=rs.getString("ڲߴ")%> +
    + <%=rs.getString("")%> +
    أ
    + <%=rs.getString("")%> +
    غɷ䣨գ
    +
    + <%=rs.getString("غɷ䣨أ")%> +
    غɷ䣨
    + <%=rs.getString("غɷ䣨أ")%> +
    أ
    + <%=rs.getString("")%> +
    ܣ
    + <%=rs.getString("")%> +
    Сؼ϶
    + <%=rs.getString("Сؼ϶mm")%> +
    + <%=rs.getString("")%> +
    ־ࣺ
    + <%=rs.getString("־")%> +
    ݻ
    + <%=rs.getString("ݻ")%> +
    +<%}if(name.equals("")){%> + + + + + + + + + + +
     
     
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ƣ
    +
    + <%=rs.getString("")%> +
    λã
    +
    + <%=rs.getString("λ")%> +
    ʽ
    +
    + <%=rs.getString("ʽ")%> +
    +
    + <%=rs.getString("")%> +
    +
    + <%=rs.getString("")%> +
    ʣ
    +
    <%=rs.getString("")%> +
    Ťأ
    +
    + <%=rs.getString("Ť")%> +
    ׾
    +
    + <%=rs.getString("׾/г")%> +
    ѹȣ
    +
    + <%=rs.getString("ѹ")%> +
    0-100KMʱ䣺
    +
    + <%=rs.getString("0-100kmʱ")%> +
    ʽ
    +
    + <%=rs.getString("ʽ")%> +
    ٹͺģ
    +
    + <%=rs.getString("ٹͺ")%> +
    ȼࣺ
    +
    + <%=rs.getString("ȼ")%> +
    +<%}if(name.equals("̲")){%> + + + + + + + + + + +
     
     
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ʽ
    + <%=rs.getString("ʽ")%> +
    ʽ
    + <%=rs.getString("ʽ")%> +
    + <%=rs.getString("")%> +
    ʽ
    + <%=rs.getString("ʽ")%> +
    ܣ
    + <%=rs.getString("")%> +
    ǰ᣺
    + <%=rs.getString("ǰ")%> +
    ̥
    + <%=rs.getString("̥")%> +
    ϵͳ
    + <%=rs.getString("ϵͳ")%> +
    ϵͳ
    + <%=rs.getString("ϵͳ")%> +
    + <%=rs.getString("")%> +
    ̥ͼ
    + <%=rs.getString("̥ͼ")%> +
    ƶװʽ
    + <%=rs.getString("ƶװʽ")%> +
    תʽ
    + <%=rs.getString("תʽ")%> +
    +<%}if(name.equals("ʶ")){%> + + + + + + + + + + +
      ʶ
     
    + + + +
    + + + + + + + + + + + + +
    ͺţ
    + <%=rs.getString("ͺż")%> +
    ʶ룺
    + <%=rs.getString("ʶ")%> +
    ѡɫ
    + <%=rs.getString("ѡɫ")%> +
    +<%}if(name.equals("")){%> + + + + + + + + + + +
     
     
    + + + +
    + + + + + + + + + + + + + + + + + + + + +
    ߳٣
    + <%=rs.getString("߳")%> +
    ʽ
    + <%=rs.getString("ʽ")%> +
    ƶ룺
    + <%=rs.getString("ƶ")%> +
    Сתֱ
    + <%=rs.getString("Сתֱ")%> +
    ¶ȣ
    + <%=rs.getString("¶")%> +
    +<%}}}%> +
    + <%}}%> +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/Css/style.css b/20/WebRoot/Css/style.css new file mode 100644 index 0000000..2222513 --- /dev/null +++ b/20/WebRoot/Css/style.css @@ -0,0 +1,142 @@ +.bor { + border-top-width: thin; + border-right-width: thin; + border-bottom-width: thin; + border-left-width: thin; + border-top-style: groove; + border-right-style: none; + border-bottom-style: ridge; + border-left-style: none; + border-top-color: #666666; + border-right-color: #666666; + border-bottom-color: #999999; + border-left-color: #666666; +} +.text { + height: 20px; + border: none; +} +body,td,th { + font-size: 12px; +} +a { + text-decoration: none; + } + +.br { + font-family: ""; + font-size: 9pt; + color: #333333; + border-top-style: none; + border-right-style: dashed; + border-bottom-style: dashed; + border-left-style: none; + border-right-width: 1px; + border-bottom-width: 1px; + border-right-color: #999999; + border-bottom-color: #999999; +} +.wenbenkuang { + font-family: ""; + font-size: 9pt; + color: #333333; + border: 1px solid #999999; + background:url(../Image/inputbg.gif); +} +.area{ + font-family: ""; + font-size: 9pt; + color: #333333; + border: 1px solid #999999; + background:url(../Image/areabg.gif); +} +.table { + font-family: ""; + font-size: 9pt; + color: #333333; + border: 1px solid #999999; +} +.go-wenbenkuang { + font-family: ""; + font-size: 9pt; + color: #333333; + background-color: #eeeeee; + cursor: hand; + padding: 1px; + height: 19px; + border-top: 1px solid #FFFFFF; + border-right: 1px solid #666666; + border-bottom: 1px solid #666666; + border-left: 1px solid #FFFFFF; +} +.fonts { + font-size: 12px; + text-decoration: blink; +} +body { + background-image: url(../Image/background.gif); + cursor:url("../image/mouse.ani"); + SCROLLBAR-FACE-COLOR: #cccccc; + SCROLLBAR-HIGHLIGHT-COLOR: #a5aeb5; + SCROLLBAR-SHADOW-COLOR: #a5aeb5; + SCROLLBAR-3DLIGHT-COLOR: #cccccc; + SCROLLBAR-ARROW-COLOR: #cccccc; + SCROLLBAR-TRACK-COLOR: #a5aeb5; + SCROLLBAR-DARKSHADOW-COLOR: #cccccc; + +} +.menuitems{ + margin:2px;padding:1px;word-break:keep-all;background-image:url("../image/dvmenubg3.gif"); +} +div.quote{margin:5px 20px;border:1px solid #CCCCCC;padding:5px;background:#F3F3F3 ;line-height : normal ; +} +div.HtmlCode{margin:5px 20px;border:1px solid #CCCCCC;padding:5px; background:#FDFDDF ; +font-size:14px;font-family:Tahoma;font-style : oblique;line-height : normal ;font-weight:bold; +} +.menuskin { + BORDER: #666666 1px solid; VISIBILITY: hidden; FONT: 12px Verdana; + POSITION: absolute; + BACKGROUND-COLOR:#EFEFEF; + background-image:url("../image/dvmenubg3.gif"); + background-repeat : repeat-y; + Filter: Alpha(Opacity=85); + } +.buttons { + font-family: ""; + font-size: 9pt; + background:url(../Image/inputbg.gif); + cursor: hand; + padding: 1px; + height: 19px; + border-top: 1px solid #333333; + border-right: 1px solid #333333; + border-bottom: 1px solid #333333; + border-left: 1px solid #333333; +} +.bottm { + font-family: ""; + font-size: 9pt; + color: #333333; + border-top-style: none; + border-right-style: none; + border-bottom-style: dashed; + border-left-style: none; + border-right-width: 1px; + border-bottom-width: 1px; + border-right-color: #999999; + border-bottom-color: #999999; +} +.right { + + font-family: ""; + font-size: 9pt; + color: #333333; + border-top-style: none; + border-right-style: dashed; + border-bottom-style: none; + border-left-style: none; + border-right-width: 1px; + border-bottom-width: 1px; + border-right-color: #999999; + border-bottom-color: #999999; +} diff --git a/20/WebRoot/Customers.jsp b/20/WebRoot/Customers.jsp new file mode 100644 index 0000000..93fea00 --- /dev/null +++ b/20/WebRoot/Customers.jsp @@ -0,0 +1,348 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + + + + + + + + +<%! + String sql; + String keyword,type; + String rla=""; + String vari; + int pagecount; + int pages; + int nows; + ResultSet rs; + ResultSet rs1; +%> +<% if(request.getParameter("add")!=null){ + String realname=request.getParameter("realname"); + String phone=request.getParameter("phone"); + String enterprise=request.getParameter("enterprise"); + String keyname=request.getParameter("keyname"); + String season=request.getParameter("season"); + String result=request.getParameter("result"); + java.util.Date today1=new java.util.Date(); + java.sql.Date now1=new java.sql.Date(today1.getYear(),today1.getMonth(),today1.getDate()); + sql="insert into tb_Record values('"+realname+"','"+phone+"','"+enterprise+"','"+keyname+"','"+season+"','"+result+"','"+now1+"','δ')"; + int j=data.getint(sql); + data.close(); + if(j>0){ +%> + +<%}}%> +<%=filetext.getfiletext("ͻ")%> + + +<%@ include file="Top.jsp" %> + + + + + +
    + + + + + + + + + + + + + + + + + + +
     ĵ
    + <% + menu.add(" ",""); + menu.add(" Ͷ ","Ͷߴ"); + menu.add(" ѯ ","ѯ"); + menu.add(" ","ۺ"); + %> + <%=menu.table()%> + <%menu.setnull();%>
     վ
    <%=search.getsearch()%>
     ű
    <%=news.getstring()%>
    + <%if(request.getParameter("type")==null){%> + <%=cus.gettable()%> + <%}else{%> + <%if(request.getParameter("type").equals("Ͷߴ")){%> + + + + + + + +
     ͷ -->> Ͷߴ
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ͷ
     
    ʵ
    + +
    ϵ绰
    Ͷߵλ
    ͶĿ
     
     
    Ͷɣ
     
     
     
     
    +
    + + +
    + <%} + if(request.getParameter("type").equals("ѯ")){%> + + + + + + + +
     ͷ -->> ѯ
    + <%if(request.getParameter("search")==null){%> + + + + + + + + + + +
    +
    ѯ
    +
    + + + + + + + + + + + +
    ƣ + + +
    +
    ţ
    +
    + + +
    + + + +
      + <%File files1=new File(application.getRealPath("/Text"),"SparePart.dll"); + int size1=(int)files1.length(); + FileInputStream filein1=new FileInputStream(files1); + byte[] buffer1=new byte[size1]; + filein1.read(buffer1); + String str1=new String(buffer1); + %> + <%=str1%> +
    + <%}else{%> + + + + + + + + + + +
    +
    ѯ
    +
    + + + + + + + + + + + + <% + sql="select * from tb_SparePart where Name like '%"+request.getParameter("name")+"%' and Number like '%"+request.getParameter("numbers")+"%'"; + rs=data.getrs(sql); + rst.size=10; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rla="name="+request.getParameter("name")+"&numbers="+request.getParameter("numbers")+"&type=ѯ&search=1&"; + rs=rst.getrs(rs); + nows=0; + while(rs!=null&&rs.next()&&(nows + + + + + + + <%} +data.close(); +%> + + + +
       
    ƥ䳵
    ۸Ԫ
    <%=rs.getString("Number")%>
    <%=rs.getString("Type")%>
    <%=rs.getString("Price")%>
    +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } %> +
    + + + +
    + + <%}%> +
    + <%}%> + <%if(request.getParameter("type").equals("ۺ")){%> + <%order.setfile(application.getRealPath("/Text"),"Customers.txt");%> + <%order.setsize(566,500);%> + <%order.setname("ͷ"," ");%> + <%=order.gettable()%> + <%}%> + <%if(request.getParameter("type").equals("")){%> + <%=cus.gettable()%> + <%}}%> +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/DataBase/db_Cars_Data.MDF b/20/WebRoot/DataBase/db_Cars_Data.MDF new file mode 100644 index 0000000..3a985ac Binary files /dev/null and b/20/WebRoot/DataBase/db_Cars_Data.MDF differ diff --git a/20/WebRoot/DataBase/db_Cars_Log.LDF b/20/WebRoot/DataBase/db_Cars_Log.LDF new file mode 100644 index 0000000..bcdf2f7 Binary files /dev/null and b/20/WebRoot/DataBase/db_Cars_Log.LDF differ diff --git a/20/WebRoot/Destine.jsp b/20/WebRoot/Destine.jsp new file mode 100644 index 0000000..0042e37 --- /dev/null +++ b/20/WebRoot/Destine.jsp @@ -0,0 +1,212 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="java.io.*" %> +<%@ page import="java.util.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + +<%! + ResultSet rs; + String sql; + int i,max,years,month1,month2,day1,day2; + String name,pwd,pwd2,linkman,phone,email,fax,address,hander,numbers,cars,type; +%> +<% if(request.getParameter("action")!=null){ + name=request.getParameter("name"); + pwd=request.getParameter("pwd"); + pwd2=request.getParameter("pwd2"); + linkman=request.getParameter("linkman"); + phone=request.getParameter("phone"); + hander=request.getParameter("hander"); + fax=request.getParameter("fax"); + email=request.getParameter("email"); + address=request.getParameter("address"); + numbers=request.getParameter("numbers"); + cars=request.getParameter("cars"); + type=request.getParameter("type"); + java.util.Date today=new java.util.Date(); + years=today.getYear(); + month1=Integer.parseInt(request.getParameter("month1")); + day1=Integer.parseInt(request.getParameter("day1")); + month2=Integer.parseInt(request.getParameter("month2")); + day2=Integer.parseInt(request.getParameter("day2")); + java.sql.Date start=new java.sql.Date(years,month1,day1); + java.sql.Date end=new java.sql.Date(years,month2,day2); + java.sql.Date nows=new java.sql.Date(years,today.getMonth(),today.getDate()); + sql="insert into tb_Tenancy values('"+name+"','"+pwd+"','"+linkman+"','"+phone+"','"+fax+"','"+email+"','"+hander+"','"+address+"','"+numbers+"','"+cars+type+"','"+start+"','"+end+"','"+nows+"','δ')"; + i=data.getint(sql); + if(i>0){ +%> + +<% } +}%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ԥ
    ͻƣ
    + +
    ¼룺
    ȷ룺
    ϵˣ
    ϵ绰
    ֻ룺
    E-mail
    ϵַ
    ֤룺
      
    ⳵ͣ
     <%=request.getParameter("type")%>  
    ⳵ʱ䣺
    2005 + + + +  
     2005 + + + +  
        
    + + + +
    + + diff --git a/20/WebRoot/Enterprise_Add.jsp b/20/WebRoot/Enterprise_Add.jsp new file mode 100644 index 0000000..0b95a0e --- /dev/null +++ b/20/WebRoot/Enterprise_Add.jsp @@ -0,0 +1,110 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + +<% request.setCharacterEncoding("gb2312");%> + + +<%if((request.getParameter("id")!=null)&&(!request.getParameter("id").equals(""))){%>ҵ޸<%}else{%>ҵ<%}%> + + + + +<%! + String sql; + int i; + ResultSet rs; + String id,name,address,phone,type; +%> + +<% if(request.getParameter("action")!=null){ + name=request.getParameter("name"); + address=request.getParameter("address"); + phone=request.getParameter("phone"); + type=request.getParameter("type"); + sql="insert into tb_Enterprise values('"+name+"','"+address+"','"+phone+"','"+type+"')"; + i=data.getint(sql); + if(i>0){ +%> + +<%}}%> +<% if(request.getParameter("change")!=null){ + id=request.getParameter("id"); + name=request.getParameter("name"); + address=request.getParameter("address"); + phone=request.getParameter("phone"); + type=request.getParameter("type"); + sql="update tb_Enterprise set Name='"+name+"',Address='"+address+"',Phone='"+phone+"',Style='"+type+"' where ID="+Integer.parseInt(request.getParameter("id")); + i=data.getint(sql); + if(i>0){ +%> + +<%}}%> +<% +if((request.getParameter("id")!=null)&&(!request.getParameter("id").equals(""))){ +sql="select * from tb_Enterprise where ID="+Integer.parseInt(request.getParameter("id")); +rs=data.getrs(sql); +} +else{rs=null;} +%> + + + + +
    + + + + Enterprise_Add.jsp?action=add<%}else{%>Enterprise_Add.jsp?change=change<%}%>"> + + + + +
    <%if((request.getParameter("id")!=null)&&(!request.getParameter("id").equals(""))){%> ҵ <%}else{%> ҵ <%}%>
    + + + + + + + + + + + + + + + + + + + + + + + +
    ҵƣ
    + <%}}%>"> + <%if(rs!=null){rs.beforeFirst();%><%}%>"><%}%>
    ҵַ
    + <%}}%>" size="40">
    ϵ绰
    +
    + <%}}%>" size="20"> +
    ҵ
    +
    +
    + <%}else{%> <%}%>"> + + +
     
    <%if(rs!=null){rs.close();data.close();}%> + + diff --git a/20/WebRoot/Enterprise_Delete.jsp b/20/WebRoot/Enterprise_Delete.jsp new file mode 100644 index 0000000..6480bad --- /dev/null +++ b/20/WebRoot/Enterprise_Delete.jsp @@ -0,0 +1,20 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> + + + +ޱĵ + + + +<%! String sql;%> +<%sql="delete tb_Enterprise where ID="+Integer.parseInt(request.getParameter("id")); +int i=data.getint(sql); +if(i>0){%> + +<%}%> + + diff --git a/20/WebRoot/Enterprise_Particular.jsp b/20/WebRoot/Enterprise_Particular.jsp new file mode 100644 index 0000000..73e09ee --- /dev/null +++ b/20/WebRoot/Enterprise_Particular.jsp @@ -0,0 +1,71 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + +<% request.setCharacterEncoding("gb2312");%> + + +ҵϸϢ + + + + +<%! + String sql; + int i; + ResultSet rs; + String id,name,address,phone,type,picture; +%> +<% +if(request.getParameter("id")!=null){ +sql="select * from tb_Enterprise where ID="+Integer.parseInt(request.getParameter("id")); +rs=data.getrs(sql); +} +%> + + + + +
    + + + + + + + +
    ҵ ϸ
    + + + + + + + + + + + + + + + + + + + + + + + +
    ҵƣ
    + <%if(rs!=null){rs.beforeFirst();if(rs.next()){%><%=rs.getString("Name")%><%}}%> +
    ҵַ
    + <%if(rs!=null){rs.beforeFirst();if(rs.next()){%><%=rs.getString("Address")%><%}}%> +
    ϵ绰
    +
    + <%if(rs!=null){rs.beforeFirst();if(rs.next()){%><%=rs.getString("Phone")%><%}}%> +
    ҵ
    <%if(rs!=null){rs.beforeFirst();if(rs.next()){%><%=rs.getString("Style")%><%}}%>
    +
    + +
     
    + + diff --git a/20/WebRoot/Exit.jsp b/20/WebRoot/Exit.jsp new file mode 100644 index 0000000..ea6c6e5 --- /dev/null +++ b/20/WebRoot/Exit.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + + + + + + diff --git a/20/WebRoot/Image/02.jpg b/20/WebRoot/Image/02.jpg new file mode 100644 index 0000000..861ce4f Binary files /dev/null and b/20/WebRoot/Image/02.jpg differ diff --git a/20/WebRoot/Image/04.jpg b/20/WebRoot/Image/04.jpg new file mode 100644 index 0000000..90cdc2f Binary files /dev/null and b/20/WebRoot/Image/04.jpg differ diff --git a/20/WebRoot/Image/05.jpg b/20/WebRoot/Image/05.jpg new file mode 100644 index 0000000..cf2c644 Binary files /dev/null and b/20/WebRoot/Image/05.jpg differ diff --git a/20/WebRoot/Image/06.jpg b/20/WebRoot/Image/06.jpg new file mode 100644 index 0000000..6bee792 Binary files /dev/null and b/20/WebRoot/Image/06.jpg differ diff --git a/20/WebRoot/Image/19.jpg b/20/WebRoot/Image/19.jpg new file mode 100644 index 0000000..609f9ec Binary files /dev/null and b/20/WebRoot/Image/19.jpg differ diff --git a/20/WebRoot/Image/4.swf b/20/WebRoot/Image/4.swf new file mode 100644 index 0000000..5446ed6 Binary files /dev/null and b/20/WebRoot/Image/4.swf differ diff --git a/20/WebRoot/Image/7.swf b/20/WebRoot/Image/7.swf new file mode 100644 index 0000000..eed1914 Binary files /dev/null and b/20/WebRoot/Image/7.swf differ diff --git a/20/WebRoot/Image/937.swf b/20/WebRoot/Image/937.swf new file mode 100644 index 0000000..b4b9149 Binary files /dev/null and b/20/WebRoot/Image/937.swf differ diff --git a/20/WebRoot/Image/A6.jpg b/20/WebRoot/Image/A6.jpg new file mode 100644 index 0000000..184ac2f Binary files /dev/null and b/20/WebRoot/Image/A6.jpg differ diff --git a/20/WebRoot/Image/Car/1.gif b/20/WebRoot/Image/Car/1.gif new file mode 100644 index 0000000..e579f2d Binary files /dev/null and b/20/WebRoot/Image/Car/1.gif differ diff --git a/20/WebRoot/Image/Car/10.jpg b/20/WebRoot/Image/Car/10.jpg new file mode 100644 index 0000000..629de15 Binary files /dev/null and b/20/WebRoot/Image/Car/10.jpg differ diff --git a/20/WebRoot/Image/Car/11.gif b/20/WebRoot/Image/Car/11.gif new file mode 100644 index 0000000..8a38758 Binary files /dev/null and b/20/WebRoot/Image/Car/11.gif differ diff --git a/20/WebRoot/Image/Car/12.jpg b/20/WebRoot/Image/Car/12.jpg new file mode 100644 index 0000000..120b9cb Binary files /dev/null and b/20/WebRoot/Image/Car/12.jpg differ diff --git a/20/WebRoot/Image/Car/13.gif b/20/WebRoot/Image/Car/13.gif new file mode 100644 index 0000000..bf992d5 Binary files /dev/null and b/20/WebRoot/Image/Car/13.gif differ diff --git a/20/WebRoot/Image/Car/14.gif b/20/WebRoot/Image/Car/14.gif new file mode 100644 index 0000000..5591e9b Binary files /dev/null and b/20/WebRoot/Image/Car/14.gif differ diff --git a/20/WebRoot/Image/Car/15.gif b/20/WebRoot/Image/Car/15.gif new file mode 100644 index 0000000..ae197a0 Binary files /dev/null and b/20/WebRoot/Image/Car/15.gif differ diff --git a/20/WebRoot/Image/Car/16.gif b/20/WebRoot/Image/Car/16.gif new file mode 100644 index 0000000..c072464 Binary files /dev/null and b/20/WebRoot/Image/Car/16.gif differ diff --git a/20/WebRoot/Image/Car/17.jpg b/20/WebRoot/Image/Car/17.jpg new file mode 100644 index 0000000..6d54e2d Binary files /dev/null and b/20/WebRoot/Image/Car/17.jpg differ diff --git a/20/WebRoot/Image/Car/18.gif b/20/WebRoot/Image/Car/18.gif new file mode 100644 index 0000000..0a94aea Binary files /dev/null and b/20/WebRoot/Image/Car/18.gif differ diff --git a/20/WebRoot/Image/Car/19.jpg b/20/WebRoot/Image/Car/19.jpg new file mode 100644 index 0000000..609f9ec Binary files /dev/null and b/20/WebRoot/Image/Car/19.jpg differ diff --git a/20/WebRoot/Image/Car/2.gif b/20/WebRoot/Image/Car/2.gif new file mode 100644 index 0000000..6144188 Binary files /dev/null and b/20/WebRoot/Image/Car/2.gif differ diff --git a/20/WebRoot/Image/Car/3.gif b/20/WebRoot/Image/Car/3.gif new file mode 100644 index 0000000..f408947 Binary files /dev/null and b/20/WebRoot/Image/Car/3.gif differ diff --git a/20/WebRoot/Image/Car/4.gif b/20/WebRoot/Image/Car/4.gif new file mode 100644 index 0000000..980e8e2 Binary files /dev/null and b/20/WebRoot/Image/Car/4.gif differ diff --git a/20/WebRoot/Image/Car/5.gif b/20/WebRoot/Image/Car/5.gif new file mode 100644 index 0000000..ad3c722 Binary files /dev/null and b/20/WebRoot/Image/Car/5.gif differ diff --git a/20/WebRoot/Image/Car/6.jpg b/20/WebRoot/Image/Car/6.jpg new file mode 100644 index 0000000..e42e2f0 Binary files /dev/null and b/20/WebRoot/Image/Car/6.jpg differ diff --git a/20/WebRoot/Image/Car/7.jpg b/20/WebRoot/Image/Car/7.jpg new file mode 100644 index 0000000..dd37fcf Binary files /dev/null and b/20/WebRoot/Image/Car/7.jpg differ diff --git a/20/WebRoot/Image/Car/8.gif b/20/WebRoot/Image/Car/8.gif new file mode 100644 index 0000000..e0f3b4a Binary files /dev/null and b/20/WebRoot/Image/Car/8.gif differ diff --git a/20/WebRoot/Image/Car/9.gif b/20/WebRoot/Image/Car/9.gif new file mode 100644 index 0000000..6c62b0e Binary files /dev/null and b/20/WebRoot/Image/Car/9.gif differ diff --git a/20/WebRoot/Image/Car/Thumbs.db b/20/WebRoot/Image/Car/Thumbs.db new file mode 100644 index 0000000..0849f0e Binary files /dev/null and b/20/WebRoot/Image/Car/Thumbs.db differ diff --git a/20/WebRoot/Image/Car1.gif b/20/WebRoot/Image/Car1.gif new file mode 100644 index 0000000..96846d1 Binary files /dev/null and b/20/WebRoot/Image/Car1.gif differ diff --git a/20/WebRoot/Image/Car1.jpg b/20/WebRoot/Image/Car1.jpg new file mode 100644 index 0000000..431550c Binary files /dev/null and b/20/WebRoot/Image/Car1.jpg differ diff --git a/20/WebRoot/Image/F_CLOSED.GIF b/20/WebRoot/Image/F_CLOSED.GIF new file mode 100644 index 0000000..febbbca Binary files /dev/null and b/20/WebRoot/Image/F_CLOSED.GIF differ diff --git a/20/WebRoot/Image/F_OPENED.gif b/20/WebRoot/Image/F_OPENED.gif new file mode 100644 index 0000000..2ffcb10 Binary files /dev/null and b/20/WebRoot/Image/F_OPENED.gif differ diff --git a/20/WebRoot/Image/Fla.jpg b/20/WebRoot/Image/Fla.jpg new file mode 100644 index 0000000..34a6e4b Binary files /dev/null and b/20/WebRoot/Image/Fla.jpg differ diff --git a/20/WebRoot/Image/Forum_readme.gif b/20/WebRoot/Image/Forum_readme.gif new file mode 100644 index 0000000..5f5a45e Binary files /dev/null and b/20/WebRoot/Image/Forum_readme.gif differ diff --git a/20/WebRoot/Image/Logo.jpg b/20/WebRoot/Image/Logo.jpg new file mode 100644 index 0000000..f3135fd Binary files /dev/null and b/20/WebRoot/Image/Logo.jpg differ diff --git a/20/WebRoot/Image/Logo1.jpg b/20/WebRoot/Image/Logo1.jpg new file mode 100644 index 0000000..5dc8231 Binary files /dev/null and b/20/WebRoot/Image/Logo1.jpg differ diff --git a/20/WebRoot/Image/Thumbs.db b/20/WebRoot/Image/Thumbs.db new file mode 100644 index 0000000..c13601a Binary files /dev/null and b/20/WebRoot/Image/Thumbs.db differ diff --git a/20/WebRoot/Image/U260P33T2D75496F9DT20040806172620.jpg b/20/WebRoot/Image/U260P33T2D75496F9DT20040806172620.jpg new file mode 100644 index 0000000..7347cf7 Binary files /dev/null and b/20/WebRoot/Image/U260P33T2D75496F9DT20040806172620.jpg differ diff --git a/20/WebRoot/Image/al_top.gif b/20/WebRoot/Image/al_top.gif new file mode 100644 index 0000000..edadfd6 Binary files /dev/null and b/20/WebRoot/Image/al_top.gif differ diff --git a/20/WebRoot/Image/alendbg.gif b/20/WebRoot/Image/alendbg.gif new file mode 100644 index 0000000..1924e19 Binary files /dev/null and b/20/WebRoot/Image/alendbg.gif differ diff --git a/20/WebRoot/Image/alendend.gif b/20/WebRoot/Image/alendend.gif new file mode 100644 index 0000000..6b5197e Binary files /dev/null and b/20/WebRoot/Image/alendend.gif differ diff --git a/20/WebRoot/Image/alendleft.gif b/20/WebRoot/Image/alendleft.gif new file mode 100644 index 0000000..50eecc3 Binary files /dev/null and b/20/WebRoot/Image/alendleft.gif differ diff --git a/20/WebRoot/Image/alendright.gif b/20/WebRoot/Image/alendright.gif new file mode 100644 index 0000000..cfd6b4f Binary files /dev/null and b/20/WebRoot/Image/alendright.gif differ diff --git a/20/WebRoot/Image/areabg.gif b/20/WebRoot/Image/areabg.gif new file mode 100644 index 0000000..774f5d0 Binary files /dev/null and b/20/WebRoot/Image/areabg.gif differ diff --git a/20/WebRoot/Image/audi.gif b/20/WebRoot/Image/audi.gif new file mode 100644 index 0000000..1124ecf Binary files /dev/null and b/20/WebRoot/Image/audi.gif differ diff --git a/20/WebRoot/Image/back1.swf b/20/WebRoot/Image/back1.swf new file mode 100644 index 0000000..b23b7b2 Binary files /dev/null and b/20/WebRoot/Image/back1.swf differ diff --git a/20/WebRoot/Image/background.gif b/20/WebRoot/Image/background.gif new file mode 100644 index 0000000..817ddde Binary files /dev/null and b/20/WebRoot/Image/background.gif differ diff --git a/20/WebRoot/Image/body_bg.gif b/20/WebRoot/Image/body_bg.gif new file mode 100644 index 0000000..eef579a Binary files /dev/null and b/20/WebRoot/Image/body_bg.gif differ diff --git a/20/WebRoot/Image/c.gif b/20/WebRoot/Image/c.gif new file mode 100644 index 0000000..7e8472e Binary files /dev/null and b/20/WebRoot/Image/c.gif differ diff --git a/20/WebRoot/Image/c3.jpg b/20/WebRoot/Image/c3.jpg new file mode 100644 index 0000000..381c2c5 Binary files /dev/null and b/20/WebRoot/Image/c3.jpg differ diff --git a/20/WebRoot/Image/c5.jpg b/20/WebRoot/Image/c5.jpg new file mode 100644 index 0000000..894cb35 Binary files /dev/null and b/20/WebRoot/Image/c5.jpg differ diff --git a/20/WebRoot/Image/ccid.gif b/20/WebRoot/Image/ccid.gif new file mode 100644 index 0000000..95b6268 Binary files /dev/null and b/20/WebRoot/Image/ccid.gif differ diff --git a/20/WebRoot/Image/color1.jpg b/20/WebRoot/Image/color1.jpg new file mode 100644 index 0000000..1b64816 Binary files /dev/null and b/20/WebRoot/Image/color1.jpg differ diff --git a/20/WebRoot/Image/color2.jpg b/20/WebRoot/Image/color2.jpg new file mode 100644 index 0000000..4b4ddef Binary files /dev/null and b/20/WebRoot/Image/color2.jpg differ diff --git a/20/WebRoot/Image/cv.gif b/20/WebRoot/Image/cv.gif new file mode 100644 index 0000000..67c6526 Binary files /dev/null and b/20/WebRoot/Image/cv.gif differ diff --git a/20/WebRoot/Image/dvmenubg3.gif b/20/WebRoot/Image/dvmenubg3.gif new file mode 100644 index 0000000..8ebbdd6 Binary files /dev/null and b/20/WebRoot/Image/dvmenubg3.gif differ diff --git a/20/WebRoot/Image/f.swf b/20/WebRoot/Image/f.swf new file mode 100644 index 0000000..997b9dc Binary files /dev/null and b/20/WebRoot/Image/f.swf differ diff --git a/20/WebRoot/Image/fish.swf b/20/WebRoot/Image/fish.swf new file mode 100644 index 0000000..46512af Binary files /dev/null and b/20/WebRoot/Image/fish.swf differ diff --git a/20/WebRoot/Image/hd.swf b/20/WebRoot/Image/hd.swf new file mode 100644 index 0000000..283b84d Binary files /dev/null and b/20/WebRoot/Image/hd.swf differ diff --git a/20/WebRoot/Image/hongq.jpg b/20/WebRoot/Image/hongq.jpg new file mode 100644 index 0000000..a799690 Binary files /dev/null and b/20/WebRoot/Image/hongq.jpg differ diff --git a/20/WebRoot/Image/inputbg.gif b/20/WebRoot/Image/inputbg.gif new file mode 100644 index 0000000..36c1413 Binary files /dev/null and b/20/WebRoot/Image/inputbg.gif differ diff --git a/20/WebRoot/Image/jia.gif b/20/WebRoot/Image/jia.gif new file mode 100644 index 0000000..00c4b2d Binary files /dev/null and b/20/WebRoot/Image/jia.gif differ diff --git a/20/WebRoot/Image/jian.gif b/20/WebRoot/Image/jian.gif new file mode 100644 index 0000000..59c0d20 Binary files /dev/null and b/20/WebRoot/Image/jian.gif differ diff --git a/20/WebRoot/Image/lastpost.gif b/20/WebRoot/Image/lastpost.gif new file mode 100644 index 0000000..48f2026 Binary files /dev/null and b/20/WebRoot/Image/lastpost.gif differ diff --git a/20/WebRoot/Image/ll.JPG b/20/WebRoot/Image/ll.JPG new file mode 100644 index 0000000..215d7a4 Binary files /dev/null and b/20/WebRoot/Image/ll.JPG differ diff --git a/20/WebRoot/Image/lz.JPG b/20/WebRoot/Image/lz.JPG new file mode 100644 index 0000000..973f30a Binary files /dev/null and b/20/WebRoot/Image/lz.JPG differ diff --git a/20/WebRoot/Image/main.swf b/20/WebRoot/Image/main.swf new file mode 100644 index 0000000..fcab64c Binary files /dev/null and b/20/WebRoot/Image/main.swf differ diff --git a/20/WebRoot/Image/mouse.ani b/20/WebRoot/Image/mouse.ani new file mode 100644 index 0000000..a2408a4 Binary files /dev/null and b/20/WebRoot/Image/mouse.ani differ diff --git a/20/WebRoot/Image/mrflag.gif b/20/WebRoot/Image/mrflag.gif new file mode 100644 index 0000000..d6b4c64 Binary files /dev/null and b/20/WebRoot/Image/mrflag.gif differ diff --git a/20/WebRoot/Image/mryoubiao.gif b/20/WebRoot/Image/mryoubiao.gif new file mode 100644 index 0000000..c3dc7ae Binary files /dev/null and b/20/WebRoot/Image/mryoubiao.gif differ diff --git a/20/WebRoot/Image/n1.jpg b/20/WebRoot/Image/n1.jpg new file mode 100644 index 0000000..89abb29 Binary files /dev/null and b/20/WebRoot/Image/n1.jpg differ diff --git a/20/WebRoot/Image/n2.jpg b/20/WebRoot/Image/n2.jpg new file mode 100644 index 0000000..7564f00 Binary files /dev/null and b/20/WebRoot/Image/n2.jpg differ diff --git a/20/WebRoot/Image/n3.jpg b/20/WebRoot/Image/n3.jpg new file mode 100644 index 0000000..e2f1363 Binary files /dev/null and b/20/WebRoot/Image/n3.jpg differ diff --git a/20/WebRoot/Image/n5.jpg b/20/WebRoot/Image/n5.jpg new file mode 100644 index 0000000..405efbf Binary files /dev/null and b/20/WebRoot/Image/n5.jpg differ diff --git a/20/WebRoot/Image/n6.jpg b/20/WebRoot/Image/n6.jpg new file mode 100644 index 0000000..9be17a0 Binary files /dev/null and b/20/WebRoot/Image/n6.jpg differ diff --git a/20/WebRoot/Image/p1.jpg b/20/WebRoot/Image/p1.jpg new file mode 100644 index 0000000..5f737a6 Binary files /dev/null and b/20/WebRoot/Image/p1.jpg differ diff --git a/20/WebRoot/Image/p2.jpg b/20/WebRoot/Image/p2.jpg new file mode 100644 index 0000000..c0e02f0 Binary files /dev/null and b/20/WebRoot/Image/p2.jpg differ diff --git a/20/WebRoot/Image/p3.jpg b/20/WebRoot/Image/p3.jpg new file mode 100644 index 0000000..15b5924 Binary files /dev/null and b/20/WebRoot/Image/p3.jpg differ diff --git a/20/WebRoot/Image/p5.jpg b/20/WebRoot/Image/p5.jpg new file mode 100644 index 0000000..af80317 Binary files /dev/null and b/20/WebRoot/Image/p5.jpg differ diff --git a/20/WebRoot/Image/password.gif b/20/WebRoot/Image/password.gif new file mode 100644 index 0000000..53df302 Binary files /dev/null and b/20/WebRoot/Image/password.gif differ diff --git a/20/WebRoot/Image/right.gif b/20/WebRoot/Image/right.gif new file mode 100644 index 0000000..83018a2 Binary files /dev/null and b/20/WebRoot/Image/right.gif differ diff --git a/20/WebRoot/Image/s1.jpg b/20/WebRoot/Image/s1.jpg new file mode 100644 index 0000000..dff801d Binary files /dev/null and b/20/WebRoot/Image/s1.jpg differ diff --git a/20/WebRoot/Image/s2.jpg b/20/WebRoot/Image/s2.jpg new file mode 100644 index 0000000..2d22e7e Binary files /dev/null and b/20/WebRoot/Image/s2.jpg differ diff --git a/20/WebRoot/Image/s3.jpg b/20/WebRoot/Image/s3.jpg new file mode 100644 index 0000000..05a0ffe Binary files /dev/null and b/20/WebRoot/Image/s3.jpg differ diff --git a/20/WebRoot/Image/s4.jpg b/20/WebRoot/Image/s4.jpg new file mode 100644 index 0000000..2549bec Binary files /dev/null and b/20/WebRoot/Image/s4.jpg differ diff --git a/20/WebRoot/Image/s5.jpg b/20/WebRoot/Image/s5.jpg new file mode 100644 index 0000000..59d2c9d Binary files /dev/null and b/20/WebRoot/Image/s5.jpg differ diff --git a/20/WebRoot/Image/s6.jpg b/20/WebRoot/Image/s6.jpg new file mode 100644 index 0000000..22c834e Binary files /dev/null and b/20/WebRoot/Image/s6.jpg differ diff --git a/20/WebRoot/Image/s7.jpg b/20/WebRoot/Image/s7.jpg new file mode 100644 index 0000000..7634b38 Binary files /dev/null and b/20/WebRoot/Image/s7.jpg differ diff --git a/20/WebRoot/Image/s8.jpg b/20/WebRoot/Image/s8.jpg new file mode 100644 index 0000000..ea54880 Binary files /dev/null and b/20/WebRoot/Image/s8.jpg differ diff --git a/20/WebRoot/Image/s9.jpg b/20/WebRoot/Image/s9.jpg new file mode 100644 index 0000000..ad017e3 Binary files /dev/null and b/20/WebRoot/Image/s9.jpg differ diff --git a/20/WebRoot/Image/shop.gif b/20/WebRoot/Image/shop.gif new file mode 100644 index 0000000..c3dc7ae Binary files /dev/null and b/20/WebRoot/Image/shop.gif differ diff --git a/20/WebRoot/Image/ssph.gif b/20/WebRoot/Image/ssph.gif new file mode 100644 index 0000000..56f0b0b Binary files /dev/null and b/20/WebRoot/Image/ssph.gif differ diff --git a/20/WebRoot/Image/sw.swf b/20/WebRoot/Image/sw.swf new file mode 100644 index 0000000..e6c005a Binary files /dev/null and b/20/WebRoot/Image/sw.swf differ diff --git a/20/WebRoot/Image/text.gif b/20/WebRoot/Image/text.gif new file mode 100644 index 0000000..0d0e538 Binary files /dev/null and b/20/WebRoot/Image/text.gif differ diff --git a/20/WebRoot/Image/top.swf b/20/WebRoot/Image/top.swf new file mode 100644 index 0000000..ce35b20 Binary files /dev/null and b/20/WebRoot/Image/top.swf differ diff --git a/20/WebRoot/Image/top1.swf b/20/WebRoot/Image/top1.swf new file mode 100644 index 0000000..9a93885 Binary files /dev/null and b/20/WebRoot/Image/top1.swf differ diff --git a/20/WebRoot/Image/top2.swf b/20/WebRoot/Image/top2.swf new file mode 100644 index 0000000..fc7f26b Binary files /dev/null and b/20/WebRoot/Image/top2.swf differ diff --git a/20/WebRoot/Image/tubiao.gif b/20/WebRoot/Image/tubiao.gif new file mode 100644 index 0000000..f69fff4 Binary files /dev/null and b/20/WebRoot/Image/tubiao.gif differ diff --git a/20/WebRoot/Image/username.gif b/20/WebRoot/Image/username.gif new file mode 100644 index 0000000..afbdcba Binary files /dev/null and b/20/WebRoot/Image/username.gif differ diff --git a/20/WebRoot/Image/w1.jpg b/20/WebRoot/Image/w1.jpg new file mode 100644 index 0000000..091a5c2 Binary files /dev/null and b/20/WebRoot/Image/w1.jpg differ diff --git a/20/WebRoot/Image/w2.jpg b/20/WebRoot/Image/w2.jpg new file mode 100644 index 0000000..1e8b8d4 Binary files /dev/null and b/20/WebRoot/Image/w2.jpg differ diff --git a/20/WebRoot/Image/w3.jpg b/20/WebRoot/Image/w3.jpg new file mode 100644 index 0000000..b8a79a2 Binary files /dev/null and b/20/WebRoot/Image/w3.jpg differ diff --git a/20/WebRoot/Image/w5.jpg b/20/WebRoot/Image/w5.jpg new file mode 100644 index 0000000..51d2cfa Binary files /dev/null and b/20/WebRoot/Image/w5.jpg differ diff --git a/20/WebRoot/Image/w6.jpg b/20/WebRoot/Image/w6.jpg new file mode 100644 index 0000000..17c993f Binary files /dev/null and b/20/WebRoot/Image/w6.jpg differ diff --git a/20/WebRoot/Image/x-hd01.gif b/20/WebRoot/Image/x-hd01.gif new file mode 100644 index 0000000..fb18312 Binary files /dev/null and b/20/WebRoot/Image/x-hd01.gif differ diff --git a/20/WebRoot/Image/x-hd02.gif b/20/WebRoot/Image/x-hd02.gif new file mode 100644 index 0000000..292009e Binary files /dev/null and b/20/WebRoot/Image/x-hd02.gif differ diff --git "a/20/WebRoot/Image/\345\244\252\346\271\226/Thumbs.db" "b/20/WebRoot/Image/\345\244\252\346\271\226/Thumbs.db" new file mode 100644 index 0000000..0399441 Binary files /dev/null and "b/20/WebRoot/Image/\345\244\252\346\271\226/Thumbs.db" differ diff --git "a/20/WebRoot/Image/\345\244\252\346\271\226/\345\206\205\351\245\260\357\274\210\345\272\247\346\244\205\357\274\211.jpg" "b/20/WebRoot/Image/\345\244\252\346\271\226/\345\206\205\351\245\260\357\274\210\345\272\247\346\244\205\357\274\211.jpg" new file mode 100644 index 0000000..14a20e7 Binary files /dev/null and "b/20/WebRoot/Image/\345\244\252\346\271\226/\345\206\205\351\245\260\357\274\210\345\272\247\346\244\205\357\274\211.jpg" differ diff --git "a/20/WebRoot/Image/\345\244\252\346\271\226/\345\244\226\350\247\202\357\274\210\345\211\215\351\227\250\357\274\211.jpg" "b/20/WebRoot/Image/\345\244\252\346\271\226/\345\244\226\350\247\202\357\274\210\345\211\215\351\227\250\357\274\211.jpg" new file mode 100644 index 0000000..03ff4b7 Binary files /dev/null and "b/20/WebRoot/Image/\345\244\252\346\271\226/\345\244\226\350\247\202\357\274\210\345\211\215\351\227\250\357\274\211.jpg" differ diff --git "a/20/WebRoot/Image/\345\244\252\346\271\226/\345\244\252\346\271\226.jpg" "b/20/WebRoot/Image/\345\244\252\346\271\226/\345\244\252\346\271\226.jpg" new file mode 100644 index 0000000..609f9ec Binary files /dev/null and "b/20/WebRoot/Image/\345\244\252\346\271\226/\345\244\252\346\271\226.jpg" differ diff --git "a/20/WebRoot/Image/\346\234\252\345\221\275\345\220\215-2.png" "b/20/WebRoot/Image/\346\234\252\345\221\275\345\220\215-2.png" new file mode 100644 index 0000000..1432601 Binary files /dev/null and "b/20/WebRoot/Image/\346\234\252\345\221\275\345\220\215-2.png" differ diff --git a/20/WebRoot/Js/HiddenTable.js b/20/WebRoot/Js/HiddenTable.js new file mode 100644 index 0000000..f71b590 --- /dev/null +++ b/20/WebRoot/Js/HiddenTable.js @@ -0,0 +1,93 @@ +// JavaScript Document +function hiddenall(objTr){ + if(objTr==jibenziliao){ + jibencanshu.style.display = "none"; + waixingcanshu.style.display = "none"; + dipancanshu.style.display = "none"; + fadongjicanshu.style.display = "none"; + qitacanshu.style.display = "none"; + qitashuoming.style.display = "none"; + biaozhunzhuangbei.style.display = "none"; + xuanzhuangzhuangbei.style.display = "none"; + } + else if(objTr==jibencanshu){ + jibenziliao.style.display = "none"; + waixingcanshu.style.display = "none"; + dipancanshu.style.display = "none"; + fadongjicanshu.style.display = "none"; + qitacanshu.style.display = "none"; + qitashuoming.style.display = "none"; + biaozhunzhuangbei.style.display = "none"; + xuanzhuangzhuangbei.style.display = "none"; + } + else if(objTr==waixingcanshu){ + jibenziliao.style.display = "none"; + jibencanshu.style.display = "none";; + dipancanshu.style.display = "none"; + fadongjicanshu.style.display = "none"; + qitacanshu.style.display = "none"; + qitashuoming.style.display = "none"; + biaozhunzhuangbei.style.display = "none"; + xuanzhuangzhuangbei.style.display = "none"; + } + else if(objTr==dipancanshu){ + jibenziliao.style.display = "none"; + jibencanshu.style.display = "none"; + waixingcanshu.style.display = "none"; + fadongjicanshu.style.display = "none"; + qitacanshu.style.display = "none"; + qitashuoming.style.display = "none"; + biaozhunzhuangbei.style.display = "none"; + xuanzhuangzhuangbei.style.display = "none"; + } + else if(objTr==fadongjicanshu){ + jibenziliao.style.display = "none"; + jibencanshu.style.display = "none"; + waixingcanshu.style.display = "none"; + dipancanshu.style.display = "none"; + qitacanshu.style.display = "none"; + qitashuoming.style.display = "none"; + biaozhunzhuangbei.style.display = "none"; + xuanzhuangzhuangbei.style.display = "none"; + } + else if(objTr==qitacanshu){ + jibenziliao.style.display = "none"; + jibencanshu.style.display = "none"; + waixingcanshu.style.display = "none"; + dipancanshu.style.display = "none"; + fadongjicanshu.style.display = "none"; + qitashuoming.style.display = "none"; + biaozhunzhuangbei.style.display = "none"; + xuanzhuangzhuangbei.style.display = "none"; + } + else if(objTr==qitashuoming){ + jibenziliao.style.display = "none"; + jibencanshu.style.display = "none"; + waixingcanshu.style.display = "none"; + dipancanshu.style.display = "none"; + fadongjicanshu.style.display = "none"; + qitacanshu.style.display = "none"; + biaozhunzhuangbei.style.display = "none"; + xuanzhuangzhuangbei.style.display = "none"; + } + else if(objTr==biaozhunzhuangbei){ + jibenziliao.style.display = "none"; + jibencanshu.style.display = "none"; + waixingcanshu.style.display = "none"; + dipancanshu.style.display = "none"; + fadongjicanshu.style.display = "none"; + qitacanshu.style.display = "none"; + qitashuoming.style.display = "none"; + xuanzhuangzhuangbei.style.display = "none"; + } + else if(objTr==xuanzhuangzhuangbei){ + jibenziliao.style.display = "none"; + jibencanshu.style.display = "none"; + waixingcanshu.style.display = "none"; + dipancanshu.style.display = "none"; + fadongjicanshu.style.display = "none"; + qitacanshu.style.display = "none"; + qitashuoming.style.display = "none"; + biaozhunzhuangbei.style.display = "none"; + } + } \ No newline at end of file diff --git a/20/WebRoot/Js/TextColor.js b/20/WebRoot/Js/TextColor.js new file mode 100644 index 0000000..f896628 --- /dev/null +++ b/20/WebRoot/Js/TextColor.js @@ -0,0 +1,106 @@ +// JavaScript Document +var rate = 20; +var obj; +var act = 0; +var elmH = 0; +var elmS = 128; +var elmV = 255; +var clrOrg; +var TimerID; +if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion) >= 4) { +Browser = true; +} else { +Browser = false; +} +if (Browser) { +document.onmouseover = doRainbowAnchor; +document.onmouseout = stopRainbowAnchor; +} +function doRainbow() +{ +if (Browser && act != 1) { +act = 1; +obj = event.srcElement; +clrOrg = obj.style.color; +TimerID = setInterval("ChangeColor()",100); +} +} +function stopRainbow() +{ +if (Browser && act != 0) { +obj.style.color = clrOrg; +clearInterval(TimerID); +act = 0; +} +} +function doRainbowAnchor() +{ +if (Browser && act != 1) { +obj = event.srcElement; +while (obj.tagName != 'A' && obj.tagName != 'BODY') { +obj = obj.parentElement; +if (obj.tagName == 'A' || obj.tagName == 'BODY') +break; +} +if (obj.tagName == 'A' && obj.href != '') { +act = 1; +clrOrg = obj.style.color; +TimerID = setInterval("ChangeColor()",100); +} +} +} +function stopRainbowAnchor() +{ +if (Browser && act != 0) { +if (obj.tagName == 'A') { +obj.style.color = clrOrg; +clearInterval(TimerID); +act = 0; +} +} +} +function ChangeColor() +{ +obj.style.color = makeColor(); +} +function makeColor() +{ +if (elmS == 0) { +elmR = elmV; elmG = elmV; elmB = elmV; +} +else { +t1 = elmV; +t2 = (255 - elmS) * elmV / 255; +t3 = elmH % 60; +t3 = (t1 - t2) * t3 / 60; +if (elmH < 60) { +elmR = t1; elmB = t2; elmG = t2 + t3; +} +else if (elmH < 120) { +elmG = t1; elmB = t2; elmR = t1 - t3; +} +else if (elmH < 180) { +elmG = t1; elmR = t2; elmB = t2 + t3; +} +else if (elmH < 240) { +elmB = t1; elmR = t2; elmG = t1 - t3; +} +else if (elmH < 300) { +elmB = t1; elmG = t2; elmR = t2 + t3; +} +else if (elmH < 360) { +elmR = t1; elmG = t2; elmB = t1 - t3; +} +else { +elmR = 0; elmG = 0; elmB = 0; +} +} +elmR = Math.floor(elmR); +elmG = Math.floor(elmG); +elmB = Math.floor(elmB); +clrRGB = '#' + elmR.toString(16) + elmG.toString(16) + elmB.toString(16); +elmH = elmH + rate; +if (elmH >= 360) +elmH = 0; +return clrRGB; +} \ No newline at end of file diff --git a/20/WebRoot/META-INF/MANIFEST.MF b/20/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/20/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/20/WebRoot/M_Login.jsp b/20/WebRoot/M_Login.jsp new file mode 100644 index 0000000..f0c7b0f --- /dev/null +++ b/20/WebRoot/M_Login.jsp @@ -0,0 +1,78 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + + + +ϵͳ¼ + +<%! + String names; + String password; +%> +<% + if(request.getParameter("action")!=null) { + names=request.getParameter("name"); + password=request.getParameter("password"); + if(names.equals("mr")&&password.equals("mrsoft")){ +%> + +<% + } + else{ +%> + +<% + } + } +%> + + +
    + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + +
    +
    +
    + + diff --git a/20/WebRoot/Manage.jsp b/20/WebRoot/Manage.jsp new file mode 100644 index 0000000..6688037 --- /dev/null +++ b/20/WebRoot/Manage.jsp @@ -0,0 +1,107 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> + + +ۼվ + + + + + +<%! + String sql; + String vari; + int i; + int pagecount; + int pages; + int nows; + ResultSet rs; +%> + + + + + + + +
    + + + + + +
    <%@ include file="Manage_Left.jsp" %> + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + +
    Ϣ
      δչ +
    + +
    + <% +sql="select * from tb_News where Title='δչ'"; +rs=data.getrs(sql); +rs.beforeFirst(); +if(rs.next()){ +%> + + <%} + data.close(); + %> +
      ʷع +
    + +
    + <% +sql="select * from tb_News where Title='ʷع'"; +rs=data.getrs(sql); +rs.beforeFirst(); +if(rs.next()){ +%> + + <%} + data.close();%> +
    +
    + + + + +
    ̱־
    + + + + +
    +

    <%=bottom.seturl("ʡտƼ޹˾","www.mingrisoft.com")%> <%=bottom.setnumbers("0431-4972266")%>
    + <%=bottom.setemail("mingrisoft@mingrisoft.com")%>
    + Copyright © 2005-2008

    +
    + + diff --git a/20/WebRoot/Manage_About.jsp b/20/WebRoot/Manage_About.jsp new file mode 100644 index 0000000..bf59a6b --- /dev/null +++ b/20/WebRoot/Manage_About.jsp @@ -0,0 +1,110 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> + + +ۼվ + + + + + +<%! + String sql; + String vari; + int i; + int pagecount; + int pages; + int nows; + ResultSet rs; +%> + + + + + + + + +
    + + + + + +
    <%@ include file="Manage_Left.jsp" %> + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + +
    Ϣ
      δչ +
    + +
    + + + +
      ʷع +
    + +
    + + + +
    +
    + + + + +
    ̱־
    + + + + +
    +

    <%=bottom.seturl("ʡտƼ޹˾","www.mingrisoft.com")%> <%=bottom.setnumbers("0431-4972266")%>
    + <%=bottom.setemail("mingrisoft@mingrisoft.com")%>
    + Copyright © 2005-2008

    +
    + + diff --git a/20/WebRoot/Manage_Cars.jsp b/20/WebRoot/Manage_Cars.jsp new file mode 100644 index 0000000..d0ff646 --- /dev/null +++ b/20/WebRoot/Manage_Cars.jsp @@ -0,0 +1,154 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + +<%! + String sql; + String keyword,type; + String vari; + int pagecount; + int pages; + int nows; + ResultSet rs; +%> + + + + + + + + +
    + + + + + +
    <%@ include file="Manage_Left.jsp" %> + + + + + + +
     
    + + + + + + + + + + + + + +
    Ϣ
      
    + + + + + + + + + + +
    ؼ֣
    ؼ
    + + + + + + + + + + + + + + <% + rst.size=16; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + + if(request.getParameter("keyword")==null||request.getParameter("keyword").equals("")){ + rs=cross.getrs(); + sql=""; + } + else{ + rs=cross.getrs(request.getParameter("type"),request.getParameter("keyword")); + sql="type="+request.getParameter("type")+"&keyword="+request.getParameter("keyword")+"&"; + } + rs=rst.getrs(rs); + nows=0; + while(rs!=null&&rs.next()&&(nows + + + + + + + + + <% }%> + + + +
        
    Ʒ
    ͺ
    ۸Ԫ
    <%=rs.getInt("Type")%>
    <%=rs.getString("Ʒ")%>
    <%=rs.getString("ͺ")%>
    <%=rs.getString("ۼ")%>
    + Cars_Add.jsp<%}else{%>Cars_Add_S.jsp<%}%>?id=<%=rs.getInt("Logo")%>&type=<%=rs.getInt("Type")%>','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')"> + ','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')"> +
    +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } + %> +
    + + + + +
    룺1--ó 3--ó
    +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/Manage_Destine.jsp b/20/WebRoot/Manage_Destine.jsp new file mode 100644 index 0000000..b65f27d --- /dev/null +++ b/20/WebRoot/Manage_Destine.jsp @@ -0,0 +1,126 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + +<%! + String sql; + String keyword,type; + String vari; + int pagecount; + int pages; + int nows; + ResultSet rs; +%> + + + + + + + + +
    + + + + + +
    <%@ include file="Manage_Left.jsp" %> + + + + + + +
     
    + + + + + + + + + + + + + +
    Ϣ
    ޳  
     
    + + + + + + + + + + + + + <% + rst.size=16; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rs=cross.getrs(4); + rs=rst.getrs(rs); + nows=0; + while(rs!=null&&rs.next()&&(nows + + + + + + + + <% }%> + + + +
        
    ۸
    Ŀ
    <%=rs.getString("")%>
    <%=rs.getString("۸")%>
    <%=rs.getString("Ŀ")%>
    + ','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')"> + ','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')"> +
    +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } + %> +
    + + + + +
    +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/Manage_Enterprise.jsp b/20/WebRoot/Manage_Enterprise.jsp new file mode 100644 index 0000000..45c5d82 --- /dev/null +++ b/20/WebRoot/Manage_Enterprise.jsp @@ -0,0 +1,144 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + +<%! + String sql; + String vari; + String rla; + int i; + int pagecount; + int pages; + int nows; + ResultSet rs; +%> + + + + + + + + +
    + + + + + +
    <%@ include file="Manage_Left.jsp" %> + + + + + + +
     
    + + + + + + + + + + + + + +
    ҵ Ϣ
    + + + + + + + + + + +
    ؼ֣
    ؼ
    + + + + + + + + + + + + + <% + if(request.getParameter("keyword")==null||request.getParameter("keyword").equals("")){ + sql="select * from tb_Enterprise"; + rla=""; + }else{ + sql="select * from tb_Enterprise where "+request.getParameter("Type")+" like '%"+request.getParameter("keyword")+"%'"; + rla="Type="+request.getParameter("Type")+"&keyword="+request.getParameter("keyword")+"&"; + } + rst.size=17; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rs=data.getrs(sql); + rs=rst.getrs(rs); + nows=0; + while(rs.next()&&(nows + + + + + + + <%} +data.close(); +%> + + + +
        
    ҵ
    ϵ绰
    <%=rs.getString("Style")%>
    <%=rs.getString("Name")%>
    <%=rs.getString("Phone")%>
    + ','','width=380,height=235,toolbar=no,location=no,status=no,menubar=no')"> + ','','width=380,height=235,toolbar=no,location=no,status=no,menubar=no')"> +
    +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } + %> +
    +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/Manage_Left.jsp b/20/WebRoot/Manage_Left.jsp new file mode 100644 index 0000000..3f8e007 --- /dev/null +++ b/20/WebRoot/Manage_Left.jsp @@ -0,0 +1,107 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + + + + + + + + + + + + + + + +
     Ϣ
    + + + + + + + + + + + + + + + + +
    δ Ϣ
      + <% + String sql1="select count(*) as counts from tb_OrderForm where Whether='δ'"; + ResultSet rs1=data1.getrs(sql1); + rs1.beforeFirst(); + if(rs1!=null&&rs1.next()){ + %> + <%=rs1.getInt("counts")%> + <%}%> +
      + <% + sql1="select count(*) as counts from tb_Tenancy where Whether='δ'"; + ResultSet rs2=data1.getrs(sql1); + rs2.beforeFirst(); + if(rs2!=null&&rs2.next()){ + %> + <%=rs2.getInt("counts")%> + <%}%> +
      + <% + sql1="select count(*) as counts from tb_Permute where Whether='δ'"; + ResultSet rs3=data1.getrs(sql1); + rs3.beforeFirst(); + if(rs3!=null&&rs3.next()){ + %> + <%=rs3.getInt("counts")%> + <%}%> +
    +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      
    ۳
    ޳
    ݹ
    Ϣ
    Ϣ
    ûϢ
    Ϣ
    Ϣ
    ͻͶ߹
    ҵ
    \ No newline at end of file diff --git a/20/WebRoot/Manage_News.jsp b/20/WebRoot/Manage_News.jsp new file mode 100644 index 0000000..adf43ad --- /dev/null +++ b/20/WebRoot/Manage_News.jsp @@ -0,0 +1,173 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + + + +<%! + String sql; + String vari; + String rla; + int i; + int pagecount; + int pages; + int nows; + ResultSet rs; +%> + + + + + + + + +
    + + + + + +
    <%@ include file="Manage_Left.jsp" %> + + + + + + +
     
    + + + + + + + + + + + + + +
    Ϣ
    Ϣ  
    + + + + + + + + + + +
    ؼ֣
    ؼ
    + +
    + + + + + + + + + + + + + <% +if(request.getParameter("keyword")==null||request.getParameter("keyword").equals("")){ + sql="select * from tb_News where Type='ű' or Type='Ŷ' or Type='³' or Type='վڹ'"; + rla=""; +}else{ + sql="select * from tb_News where (Type='ű' or Type='Ŷ' or Type='³' or Type='վڹ') and "+request.getParameter("Type")+" like '%"+request.getParameter("keyword")+"%'"; + rla="Type="+request.getParameter("Type")+"&keyword="+request.getParameter("keyword")+"&"; + } + rst.size=17; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rs=data.getrs(sql); + rs=rst.getrs(rs); + nows=0; + while(rs.next()&&(nows + + + + + + + <%} +data.close(); +%> + + + +
        
    ID
    ʱ
    <%=rs.getInt("ID")%>
    <%=rs.getDate("IssueDate")%>
    + ','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')"> +
    +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } + %> +
    +
    + + + + +
    ̱־
    + + + + +
    +

    <%=bottom.seturl("ʡտƼ޹˾","www.mingrisoft.com")%> <%=bottom.setnumbers("0431-4972266")%>
    + <%=bottom.setemail("mingrisoft@mingrisoft.com")%>
    + Copyright © 2005-2008

    +
    + + diff --git a/20/WebRoot/Manage_OrderForm.jsp b/20/WebRoot/Manage_OrderForm.jsp new file mode 100644 index 0000000..72005b1 --- /dev/null +++ b/20/WebRoot/Manage_OrderForm.jsp @@ -0,0 +1,148 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + +<%! + String sql; + String vari; + String rla; + int i; + int pagecount; + int pages; + int nows; + ResultSet rs; +%> + + + + + + + + +
    + + + + + +
    <%@ include file="Manage_Left.jsp" %> + + + + + + +
     
    + + + + + + + + + + + + + +
    Ϣ
    + + + + + + + + + + +
    ؼ֣
    ؼ
    + + + + + + + + + + + + + + + <% + if(request.getParameter("keyword")==null||request.getParameter("keyword").equals("")){ + sql="select * from tb_OrderForm where Whether='δ'"; + rla=""; + }else{ + sql="select * from tb_OrderForm where Whether='δ' and "+request.getParameter("Type")+" like '%"+request.getParameter("keyword")+"%'"; + rla="Type="+request.getParameter("Type")+"&keyword="+request.getParameter("keyword")+"&"; + } + rst.size=17; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rs=data.getrs(sql); + rs=rst.getrs(rs); + nows=0; + while(rs.next()&&(nows + + + + + + + + + <%} +data.close(); +%> + + + +
        
    ID
    ʱ
    û
    ϵ绰
    <%=rs.getInt("ID")%>
    <%=rs.getString("Name")%>
    <%=rs.getDate("IssueDate")%>
    <%=rs.getString("LinkMan")%>
    <%=rs.getString("Phone")%>
    + ','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')"> +
    +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } + %> +
    +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/Manage_Permute.jsp b/20/WebRoot/Manage_Permute.jsp new file mode 100644 index 0000000..8183125 --- /dev/null +++ b/20/WebRoot/Manage_Permute.jsp @@ -0,0 +1,146 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + +<%! + String sql; + String vari; + String rla; + int i; + int pagecount; + int pages; + int nows; + ResultSet rs; +%> + + + + + + + +
    + + + + + +
    <%@ include file="Manage_Left.jsp" %> + + + + + + +
     
    + + + + + + + + + + + + + +
    Ϣ
    + + + + + + + + + + +
    ؼ֣
    ؼ
    + + + + + + + + + + + + + + + <% + if(request.getParameter("keyword")==null||request.getParameter("keyword").equals("")){ + sql="select * from tb_Permute where Whether='δ'"; + rla=""; + }else{ + sql="select * from tb_Permute where Whether='δ' and "+request.getParameter("Type")+" like '%"+request.getParameter("keyword")+"%'"; + rla="Type="+request.getParameter("Type")+"&keyword="+request.getParameter("keyword")+"&"; + } + rst.size=17; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rs=data.getrs(sql); + rs=rst.getrs(rs); + nows=0; + while(rs.next()&&(nows + + + + + + + + + <%} +data.close(); +%> + + + +
        
    û
    ԭг
    ʱ
    ϵ绰
    <%=rs.getString("ChangeCar")%>
    <%=rs.getString("CarName")%>
    <%=rs.getString("Times")%>
    <%=rs.getString("Bad")%>
    <%=rs.getString("Phone")%>
    + ','','width=500,height=460,toolbar=no,location=no,status=no,menubar=no')"> +
    +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } + %> +
    +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/Manage_Record.jsp b/20/WebRoot/Manage_Record.jsp new file mode 100644 index 0000000..4003c82 --- /dev/null +++ b/20/WebRoot/Manage_Record.jsp @@ -0,0 +1,146 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + +<%! + String sql; + String vari; + String rla; + int i; + int pagecount; + int pages; + int nows; + ResultSet rs; +%> + + + + + + + + +
    + + + + + +
    <%@ include file="Manage_Left.jsp" %> + + + + + + +
     
    + + + + + + + + + + + + + +
    Ͷ
    + + + + + + + + + + +
    ؼ֣
    ؼ
    + + + + + + + + + + + + + + <% + if(request.getParameter("keyword")==null||request.getParameter("keyword").equals("")){ + sql="select * from tb_Record where Whether='δ'"; + rla=""; + }else{ + sql="select * from tb_Record where Whether='δ' and "+request.getParameter("Type")+" like '%"+request.getParameter("keyword")+"%'"; + rla="Type="+request.getParameter("Type")+"&keyword="+request.getParameter("keyword")+"&"; + } + rst.size=17; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rs=data.getrs(sql); + rs=rst.getrs(rs); + nows=0; + while(rs.next()&&(nows + + + + + + + + <%} +data.close(); +%> + + + +
        
    Ͷߵλ
    +
    Ͷʱ
    Ͷ
    ϵ绰
    <%=rs.getString("Enterprise")%>
    <%=rs.getDate("IssueDate")%>
    <%=rs.getString("RealName")%>
    <%=rs.getString("Phone")%>
    + ','','width=426,height=400,toolbar=no,location=no,status=no,menubar=no')"> +
    +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } + %> +
    +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/Manage_SparePart.jsp b/20/WebRoot/Manage_SparePart.jsp new file mode 100644 index 0000000..d95ef41 --- /dev/null +++ b/20/WebRoot/Manage_SparePart.jsp @@ -0,0 +1,147 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + +<%! + String sql; + String vari; + String rla; + int i; + int pagecount; + int pages; + int nows; + ResultSet rs; +%> + + + + + + + + +
    + + + + + +
    <%@ include file="Manage_Left.jsp" %> + + + + + + +
     
    + + + + + + + + + + + + + +
    Ϣ
      
    + + + + + + + + + + +
    ؼ֣
    ؼ
    + + + + + + + + + + + + + + <% + if(request.getParameter("keyword")==null||request.getParameter("keyword").equals("")){ + sql="select * from tb_SparePart"; + rla=""; + } + else{ + sql="select * from tb_SparePart where "+request.getParameter("Type")+" like '%"+request.getParameter("keyword")+"%'"; + rla="Type="+request.getParameter("Type")+"&keyword="+request.getParameter("keyword")+"&"; + } + rst.size=17; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rs=data.getrs(sql); + rs=rst.getrs(rs); + nows=0; + while(rs.next()&&(nows + + + + + + + + <%} +data.close(); +%> + + + +
        
    ƥ䳵
    ۸Ԫ
    <%=rs.getString("Number")%>
    <%=rs.getString("Type")%>
    <%=rs.getString("Price")%>
    + ','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')"> +
    +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } + %> +
    +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/Manage_Tenancy.jsp b/20/WebRoot/Manage_Tenancy.jsp new file mode 100644 index 0000000..819a9bd --- /dev/null +++ b/20/WebRoot/Manage_Tenancy.jsp @@ -0,0 +1,160 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> + + +ۼվ + + + + + +<%! + String sql; + String vari; + String rla; + int i; + int pagecount; + int pages; + int nows; + ResultSet rs; +%> + + + + + + + + +
    + + + + + +
    <%@ include file="Manage_Left.jsp" %> + + + + + + +
     
    + + + + + + + + + + + + + +
    Ϣ
    + + + + + + + + + + +
    ؼ֣
    ؼ
    + + + + + + + + + + + + + + + <% + if(request.getParameter("keyword")==null||request.getParameter("keyword").equals("")){ + sql="select * from tb_Tenancy where Whether='δ'"; + rla=""; + }else{ + sql="select * from tb_Tenancy where Whether='δ' and "+request.getParameter("Type")+" like '%"+request.getParameter("keyword")+"%'"; + rla="Type="+request.getParameter("Type")+"&keyword="+request.getParameter("keyword")+"&"; + } + rst.size=17; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rs=data.getrs(sql); + rs=rst.getrs(rs); + nows=0; + while(rs.next()&&(nows + + + + + + + + + <%} +data.close(); +%> + + + +
        
    ID
    ʱ
    û
    ϵ绰
    <%=rs.getInt("ID")%>
    <%=rs.getString("CarsName")%>
    <%=rs.getDate("IssueDate")%>
    <%=rs.getString("UserName")%>
    <%=rs.getString("Phone")%>
    + ','','width=472,height=346,toolbar=no,location=no,status=no,menubar=no')"> +
    +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } + %> +
    +
    + + + + +
    ̱־
    + + + + +
    +

    <%=bottom.seturl("ʡտƼ޹˾","www.mingrisoft.com")%> <%=bottom.setnumbers("0431-4972266")%>
    + <%=bottom.setemail("mingrisoft@mingrisoft.com")%>
    + Copyright © 2005-2008

    +
    + + diff --git a/20/WebRoot/New_Add.jsp b/20/WebRoot/New_Add.jsp new file mode 100644 index 0000000..62cd7a2 --- /dev/null +++ b/20/WebRoot/New_Add.jsp @@ -0,0 +1,111 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + +<% request.setCharacterEncoding("gb2312");%> + + +Ϣ + + + + +<%! + String sql; + int years,months,days; + int i,j; + ResultSet rs; + String type; + String title; + String content; + java.util.Date today; +%> +<% if(request.getParameter("action")!=null){ + type=request.getParameter("type"); + title=request.getParameter("title"); + content=request.getParameter("content"); + sql="select * from tb_News where Title='"+title+"' and Content='"+content+"' and Type='"+type+"'"; + rs=data.getrs(sql); + rs.beforeFirst(); + if(rs.next()){ + data.close(); +%> + +<% + } + else{ + data.close(); + today=new java.util.Date(); + years=today.getYear(); + months=today.getMonth(); + days=today.getDate(); + java.sql.Date dates=new java.sql.Date(years,months,days); + sql="insert into tb_News values('"+title+"','"+content+"','"+dates+"','"+type+"')"; + i=data.getint(sql); + if(i>0){ +%> + +<% + } +} +data.close(); +} +%> + + + + +
    + + + + + + + + +
    Ϣ
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    ű⣺
    + +
    ݣ
    +
    +
     
     
    +
    + + + +
    ʡлۼŹ˾ 24Сʱͻߣxxxx-xxxxxxx
    + + diff --git a/20/WebRoot/New_Change.jsp b/20/WebRoot/New_Change.jsp new file mode 100644 index 0000000..7644729 --- /dev/null +++ b/20/WebRoot/New_Change.jsp @@ -0,0 +1,93 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + +<% request.setCharacterEncoding("gb2312");%> + + +Ϣ޸ + + + + +<%! + String sql; + int i,id; + String content; +%> +<% if(request.getParameter("action")!=null){ + id=Integer.parseInt(request.getParameter("id")); + content=request.getParameter("content"); + sql="update tb_News set Content='"+content+"' where ID="+id; + i=data.getint(sql); + if(i>0){ +%> + +<% + } +} +data.close(); +%> + + + + +
    + + + + + + + + +
    Ϣ
    + <% + sql="select * from tb_News where ID="+Integer.parseInt(request.getParameter("id")); +ResultSet rs=data.getrs(sql); +rs.beforeFirst(); +if(rs.next()){ + %> + + + + + + + + + + + + + + + + + + + + + + + + + +
    " readonly="yes"> + ">
    ű⣺
    + " readonly="yes"> +
    ݣ
    +
    +
     
     
    +
    + + + +
    ʡлۼŹ˾ 24Сʱͻߣxxxx-xxxxxxx
    +<%} +data.close(); +%> +
    + + diff --git a/20/WebRoot/New_Delete.jsp b/20/WebRoot/New_Delete.jsp new file mode 100644 index 0000000..058e0e2 --- /dev/null +++ b/20/WebRoot/New_Delete.jsp @@ -0,0 +1,22 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + + +<%! + String sql; + int id; + int i; +%> +<% + request.setCharacterEncoding("gb2312"); + id=Integer.parseInt(request.getParameter("id")); + sql="delete tb_News where ID="+id; + i=data.getint(sql); + if(i>0){ +%> + +<%}%> + diff --git a/20/WebRoot/News.jsp b/20/WebRoot/News.jsp new file mode 100644 index 0000000..09b88b2 --- /dev/null +++ b/20/WebRoot/News.jsp @@ -0,0 +1,222 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<%@ page import="java.lang.Integer" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + + + +<%! + String sql; + String vari; + int i; + int pagecount; + int pages; + int nows; + int start=0; + ResultSet rs; +%> + + + + + +<%@ include file="Top.jsp" %> + + + + + +
    + + + + + + + + + + + + + + + + + + +
     ĵ
    + + + + + + + + + + + + +
    + +
    + +
    + +
    վ + +
     վ
    <%=search.getsearch()%>
     Ϣ
    <%=news.getstring()%>
    + <% if(request.getParameter("type")==null){%> + + + + + + + + + + + + + + + + + +
     ű  ³
    + + <% sql="select * from tb_News where Type='ű' order by IssueDate Desc"; + rs=data.getrs(sql); + rs.beforeFirst(); + while(rs.next()&&start<10){ + start=start+1; + %> + + + + <%} + start=0; + data.close(); + %> +
     <%=""+rs.getString("Title")+"" %>
    +
    + <% sql="select * from tb_News where Type='³' order by IssueDate Desc"; + rs=data.getrs(sql); + rs.beforeFirst(); + while(rs.next()&&start<10){ + start=start+1; + %> + + + + <%} + start=0; + data.close(); + %> +
     <%=""+rs.getString("Title")+"" %>
     Ŷ վڹ
    + <% sql="select * from tb_News where Type='Ŷ' order by IssueDate Desc"; + rs=data.getrs(sql); + rs.beforeFirst(); + while(rs.next()&&start<10){ + start=start+1; + %> + + + + <%} + start=0; + data.close(); + %> +
     <%=""+rs.getString("Title")+"" %>
    + <% sql="select * from tb_News where Type='վڹ' order by IssueDate Desc"; + rs=data.getrs(sql); + rs.beforeFirst(); + while(rs.next()&&start<10){ + start=start+1; + %> + + + + <%} + start=0; + data.close(); + %> +
     <%=""+rs.getString("Title")+"" %>
    + <% }else{%> + + + + + + + +
     <% if(request.getParameter("type")==null){ out.write("");}else{%><%=request.getParameter("type")%><%}%>
    + + <% + if(request.getParameter("type")==null){ + sql="select * from tb_News where Type='ű' or Type='Ŷ' or Type='³' or Type='վڹ' order by IssueDate"; + } + else{ + sql="select * from tb_News where Type='"+request.getParameter("type")+"' order by IssueDate"; + } + rst.size=17; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rs=data.getrs(sql); + rs=rst.getrs(rs); + nows=0; + while(rs.next()&&(nows + + + + + + + <%}%> + + + +
     
     <%=rs.getString("Type")%>   <%=""+rs.getString("Title")+"" %>
    +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("nexe"); + } + else{ + if(pages +
    +
    +
    + <%}%> +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/News_Particular.jsp b/20/WebRoot/News_Particular.jsp new file mode 100644 index 0000000..0b65356 --- /dev/null +++ b/20/WebRoot/News_Particular.jsp @@ -0,0 +1,60 @@ +<%@ page contentType="text/html; charset=gb2312" %> +<%@ page import="java.sql.*" %> + + + +<%! +String sql; +String title; +String content; +%> + + + + +<% +sql="select * from tb_News where ID="+Integer.parseInt(request.getParameter("id")); +ResultSet rs=data.getrs(sql); +rs.beforeFirst(); + if(rs.next()){ +%> + + + + +
    + + + + + + + + +
    + <%=rs.getString("Title") %> +
    + + + + + + + +
        
    +     <% + out.write(rs.getString("Content")); + } + %>
    + +
    +
    + + + + + + +
    + + diff --git a/20/WebRoot/OrderForm.jsp b/20/WebRoot/OrderForm.jsp new file mode 100644 index 0000000..5bb2e3c --- /dev/null +++ b/20/WebRoot/OrderForm.jsp @@ -0,0 +1,242 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<%@ page import="java.util.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ߶ + + + + +<%! + String sql; + ResultSet rs; + int i; + %> +<% if(request.getParameter("orderform")!=null){ + String names=request.getParameter("names"); + int counts=Integer.parseInt(request.getParameter("counts")); + String color=request.getParameter("color"); + String payment=request.getParameter("payment"); + String enterprise=request.getParameter("enterprise"); + String address=request.getParameter("address"); + String area=request.getParameter("area"); + String dealer=request.getParameter("dealer"); + String linkman=request.getParameter("linkman"); + String phone=request.getParameter("phone"); + String fax=request.getParameter("fax"); + String email=request.getParameter("email"); + String phost=request.getParameter("phone"); + String remark=request.getParameter("remark"); + java.util.Date today=new java.util.Date(); + java.sql.Date now=new java.sql.Date(today.getYear(),today.getMonth(),today.getDate()); + sql="insert into tb_OrderForm(name,counts,color,payment,EnterpriseName,Address,"+ + "Area,Dealer,Linkman,Phone,Fax,Email,PhoneNumber,Remark,IssueDate,Whether) values('"+names+"',"+counts+",'"+color+"','"+payment+"','"+enterprise+"','"+address+"','"+area+"','"+dealer+"','"+linkman+"','"+phone+"','"+fax+"','"+email+"','"+phost+"','"+remark+"','"+now+"','δ')"; + System.out.println(sql); + i=data.getint(sql); + if(i>0){ +%> + +<%} +return; +}%> + + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ͣ
    "><%=new String (request.getParameter("action").getBytes("ISO-8859-1"),"GBK")%>
    + +
    ʽ
    + +
    ѡɫ
    + + + + + + + + + + + + + + + +
    ˾ƣ
    +
    ϸַ
    +
    ڵ
    + + + + +
    +
    ƣ
    + + + + + +
    +
    +
    ϵˣ
    ϵ绰
    E-mail
      
    עϢ
    + +
     
     
    +
    + + + +
    ʡлۼŹ˾ 24Сʱͻߣxxxx-xxxxxxx
    + + diff --git a/20/WebRoot/OrderForm_Particular.jsp b/20/WebRoot/OrderForm_Particular.jsp new file mode 100644 index 0000000..16f0f8f --- /dev/null +++ b/20/WebRoot/OrderForm_Particular.jsp @@ -0,0 +1,152 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<%@ page import="java.util.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ߶ + + + + +<%! + String sql; + ResultSet rs; + int i; + %> + <% + if(request.getParameter("Submit")!=null){ + sql="delete tb_OrderForm where ID="+request.getParameter("id"); + int j=data.getint(sql); + data.close(); +%> + +<% +} +%> + <% + if(request.getParameter("Submit2")!=null){ + sql="update tb_OrderForm set Whether='' where ID="+request.getParameter("id"); + int j=data.getint(sql); + data.close(); +%> + +<% +} +%> +<% +sql="select * from tb_OrderForm where ID="+request.getParameter("id"); +rs=data.getrs(sql); +rs.beforeFirst(); +if(rs!=null&&rs.next()){ +%> + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ͣ
    "> + <%=rs.getString("Name")%>
    <%=rs.getInt("Counts")%>
    ʽ
    <%=rs.getString("Payment")%> +
    ѡɫ
    <%=rs.getString("Color")%> +
    ˾ƣ
    <%=rs.getString("EnterpriseName")%>
    ϸַ
    <%=rs.getString("Address")%>
    ڵ
    + + + + +
    <%=rs.getString("Omit")%>ʡ <%=rs.getString("City")%> <%=rs.getString("Area")%>
    +
    ƣ
    + + + + +
     <%=rs.getString("Dealer")%> +
    +
    ϵˣ
     <%=rs.getString("Linkman")%>
    ϵ绰
     <%=rs.getString("Phone")%>
     <%=rs.getString("Fax")%>
    E-mail
     <%=rs.getString("Email")%>
    <%=rs.getString("PhoneNumber")%>   
    עϢ
    +
     
     
    +
    + + + +
    ʡлۼŹ˾ 24Сʱͻߣxxxx-xxxxxxx
    + +<%}%> + diff --git a/20/WebRoot/Permute.jsp b/20/WebRoot/Permute.jsp new file mode 100644 index 0000000..c86bff9 --- /dev/null +++ b/20/WebRoot/Permute.jsp @@ -0,0 +1,223 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + + + + +<%! + ResultSet rs; + String sql; + String sql1; + int i,max; +%> +<% if(request.getParameter("order")!=null){ + String name=request.getParameter("names"); + String phone=request.getParameter("phone"); + String email=request.getParameter("email"); + String hander=request.getParameter("hander"); + String address=request.getParameter("address"); + String carname=request.getParameter("carname"); + String times=request.getParameter("times"); + String bad=request.getParameter("bad"); + String check=request.getParameter("check"); + String change=request.getParameter("change"); + java.util.Date today1=new java.util.Date(); + java.sql.Date now1=new java.sql.Date(today1.getYear(),today1.getMonth(),today1.getDate()); + sql="insert into tb_Permute values('"+name+"','"+phone+"','"+hander+"','"+email+"','"+address+"','"+carname+"','"+times+"','"+bad+"','"+check+"','"+change+"','"+now1+"','δ')"; + int j=data.getint(sql); + if(j>0){ +%> + +<%}}%> + + + +<%@ include file="Top.jsp" %> + + + + + +
    + + + + + + + + + + + + + + + + + + +
     ĵ
    + <% + menu.add("          ",""); + menu.add("          ","û"); + %> + <%=menu.table()%> + <%menu.setnull();%>
     վ
    <%=search.getsearch()%>
     ű
    <%=news.getstring()%>
    + <%if(request.getParameter("type")==null||request.getParameter("type").equals("")){%> + + + + + + + +
     û -->> û
    + <%}else{%> + + + + + + + +
     û -->> û
    + + + + +
    + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ʵ
    ϵ绰
    ֻ룺
    + +
    E-mail
    ϵַ
    +
    + +
    гƣ
    ʱ䣺
    Ƿ
    + + +
    ǷѾ죺
    + Ѿ + + ûг
    ûƣ
    +
    +
    + + +
    +
    + <%}%> +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/Permute_Particular.jsp b/20/WebRoot/Permute_Particular.jsp new file mode 100644 index 0000000..e0cd64d --- /dev/null +++ b/20/WebRoot/Permute_Particular.jsp @@ -0,0 +1,127 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<%@ page import="java.util.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ߶ + + + + +<%! + String sql; + ResultSet rs; + int i; + %> + <% + if(request.getParameter("Submit2")!=null){ + sql="delete tb_Permute where ID="+request.getParameter("id"); + int j=data.getint(sql); + data.close(); +%> + +<% +} +%> + <% + if(request.getParameter("Submit")!=null){ + sql="update tb_Permute set Whether='' where ID="+request.getParameter("id"); + int j=data.getint(sql); + data.close(); +%> + +<% +} +%> +<% +sql="select * from tb_Permute where ID="+request.getParameter("id"); +rs=data.getrs(sql); +rs.beforeFirst(); +if(rs!=null&&rs.next()){ +%> + + + + + +
    + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ʵ
    <%=rs.getString("Name")%> + ">
    ϵ绰
    <%=rs.getString("Phone")%>
    ֻ룺
    + <%=rs.getString("Hander")%> +
    E-mail
    <%=rs.getString("Email")%>
    ϵַ
    +
    + <%=rs.getString("Address")%> +
    гƣ
    <%=rs.getString("CarName")%>
    ʱ䣺
    <%=rs.getString("Times")%>
    Ƿ
    <%=rs.getString("Bad")%>
    ǷѾ죺
    <%=rs.getString("YearCheck")%>
    ûƣ
     <%=rs.getString("ChangeCar")%>
    +
    + + + +
    +<%}%> + + diff --git a/20/WebRoot/Record_Particular.jsp b/20/WebRoot/Record_Particular.jsp new file mode 100644 index 0000000..0197f48 --- /dev/null +++ b/20/WebRoot/Record_Particular.jsp @@ -0,0 +1,113 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<%@ page import="java.util.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ߶ + + + + +<%! + String sql; + ResultSet rs; + int i; + %> + <% + if(request.getParameter("Submit")!=null){ + sql="delete tb_Record where ID="+request.getParameter("id"); + int j=data.getint(sql); + data.close(); +%> + +<% +} +%> + <% + if(request.getParameter("Submit2")!=null){ + sql="update tb_Record set Whether='' where ID="+request.getParameter("id"); + int j=data.getint(sql); + data.close(); +%> + +<% +} +%> +<% +sql="select * from tb_Record where ID="+request.getParameter("id"); +rs=data.getrs(sql); +rs.beforeFirst(); +if(rs!=null&&rs.next()){ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ͷ
    ʵ
     <%=rs.getString("RealName")%> + "> +
    ϵ绰
     <%=rs.getString("Phone")%>
    Ͷߵλ
     <%=rs.getString("Enterprise")%>
    ͶĿ
     
     
    Ͷɣ
     
     
     
     
    +
    + + + +
    +<%}%> + + diff --git a/20/WebRoot/Search.jsp b/20/WebRoot/Search.jsp new file mode 100644 index 0000000..b118923 --- /dev/null +++ b/20/WebRoot/Search.jsp @@ -0,0 +1,184 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<%@ page import="java.lang.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + + + +<%! + String sql; + String rla; + String vari; + String name; + String name1,name2; + int homo; + int pagecount; + int pages; + int nows; + int i; + int cartype; + ResultSet rs; + ResultSet rs1; +%> +<% +cartype=Integer.parseInt(request.getParameter("type")); +name1=request.getParameter("name"); +name2=request.getParameter("number"); +rla="name="+request.getParameter("name")+"&number="+request.getParameter("number")+"&type="+request.getParameter("type")+"&"; +rs=cross.getrs(name1,name2,cartype); + %> + + +<%@ include file="Top.jsp" %> + + + + + +
    + + + + + + + + + + + + + + + + + + +
     վ
    + + <% + sql="select * from tb_News where Type='վڹ' order by IssueDate"; + ResultSet rs3; + rs3=data.getrs(sql); + rs3.beforeFirst(); + i=0; + while(rs3.next()&&(i<5)){ + i++; + %> + <%=""+rs3.getString("Title")+"" %>
    + + <% + } + data.close(); + %> + +
    +
     վ
    + + + + + + + + + + + + + + + + + +
    Ʒƣ
    +
    + +
    ͺţ
    +
    + +
    + +
     ű
    <%=news.getstring()%>
    + + + + + + + + + + +
     ѯչʾ
    + + <%if(rs==null){%>
    + ʱûҪҵijϢ
    + <%}else{ + rst.size=4; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rs=rst.getrs(rs); + nows=0; + while(rs!=null&&rs.next()&&(nows + + + + + + + + +
    + + + + + + + + + +
      ƣ<%=rs.getString("Ʒ")%> <%=rs.getString("ͺ")%>
     <%=rs.getString("ּ")%>
    ο۸<%=rs.getString("ۼ")%> Ԫ
    + <% }%> + <%}%> +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } + %> +
    +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/SparePart_Add.jsp b/20/WebRoot/SparePart_Add.jsp new file mode 100644 index 0000000..51a24bd --- /dev/null +++ b/20/WebRoot/SparePart_Add.jsp @@ -0,0 +1,86 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + +<% request.setCharacterEncoding("gb2312");%> + + + + + + + +<%! + String sql; + int i; + String type; + String name,price,number; +%> +<% if(request.getParameter("action")!=null){ + type=request.getParameter("type"); + number=request.getParameter("number"); + price=request.getParameter("price"); + name=request.getParameter("name"); + sql="insert into tb_SparePart values('"+number+"','"+name+"','"+price+"','"+type+"')"; + i=data.getint(sql); + if(i>0){ +%> + +<% + } +} +data.close(); +%> + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    ţ
    ƣ
    + +
    ƥ ͣ
    +
    + +
    + Ԫ
    +
    + + + +
     
    + + diff --git a/20/WebRoot/SparePart_Change.jsp b/20/WebRoot/SparePart_Change.jsp new file mode 100644 index 0000000..a79032c --- /dev/null +++ b/20/WebRoot/SparePart_Change.jsp @@ -0,0 +1,92 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + +<% request.setCharacterEncoding("gb2312");%> + + +޸ + + + + +<%! + String sql; + int id,i; + String type; + String price; + ResultSet rs; +%> +<% if(request.getParameter("action")!=null){ + id=Integer.parseInt(request.getParameter("id")); + price=request.getParameter("price"); + sql="update tb_SparePart set Price='"+price+"' where ID="+id; + i=data.getint(sql); + if(i>0){ +%> + +<% + } +} +data.close(); +%> + + + + +
    + + + + + + + + +
    + <% sql="select * from tb_SparePart where ID="+Integer.parseInt(request.getParameter("id")); + rs=data.getrs(sql); + rs.beforeFirst(); + if(rs.next()){ + %> + + + + + "> + + + + + + + + + + + + + + + + + + +
    ţ
    " readonly="yes">
    ƣ
    + " readonly="yes"> +
    ƥ ͣ
    +
    + " readonly="yes"> +
    "> + Ԫ
    +
    + + + +
     
    + <%}%> +
    + + diff --git a/20/WebRoot/SparePart_Delete.jsp b/20/WebRoot/SparePart_Delete.jsp new file mode 100644 index 0000000..7af4915 --- /dev/null +++ b/20/WebRoot/SparePart_Delete.jsp @@ -0,0 +1,22 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + + +<%! + String sql; + int id; + int i; +%> +<% + request.setCharacterEncoding("gb2312"); + id=Integer.parseInt(request.getParameter("id")); + sql="delete tb_SparePart where ID="+id; + i=data.getint(sql); + if(i>0){ +%> + +<%}%> + diff --git a/20/WebRoot/SpeakFor.jsp b/20/WebRoot/SpeakFor.jsp new file mode 100644 index 0000000..4c8ade0 --- /dev/null +++ b/20/WebRoot/SpeakFor.jsp @@ -0,0 +1,461 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + + + + + + + +<%! + ResultSet rs; + String sql; + String rla=""; + int i; +%> + +<% if(request.getParameter("order")!=null){ + String names1=request.getParameter("names"); + String pwd1=request.getParameter("password"); + String realname1=request.getParameter("realname"); + String address1=request.getParameter("address"); + String phone1=request.getParameter("phone"); + String email1=request.getParameter("email"); + String hander1=request.getParameter("hander"); + String carname1=request.getParameter("carname"); + String cartype1=request.getParameter("cartype"); + java.util.Date today1=new java.util.Date(); + java.sql.Date now1=new java.sql.Date(today1.getYear(),today1.getMonth(),today1.getDate()); + sql="insert into tb_Intent values('"+names1+"','"+pwd1+"','"+realname1+"','"+phone1+"','"+carname1+"','"+cartype1+"','"+email1+"','"+address1+"','"+hander1+"','δ','"+now1+"')"; + int j=data.getint(sql); + if(j>0){ +%> + +<%}}%> +<%=filetext.getfiletext("")%> + + +<% if(request.getParameter("orderform")!=null){ + String names=request.getParameter("names"); + int counts=Integer.parseInt(request.getParameter("counts")); + String color=request.getParameter("color"); + String payment=request.getParameter("payment"); + String enterprise=request.getParameter("enterprise"); + String address=request.getParameter("address"); + String area=request.getParameter("area"); + String dealer=request.getParameter("dealer"); + String linkman=request.getParameter("linkman"); + String phone=request.getParameter("phone"); + String fax=request.getParameter("fax"); + String email=request.getParameter("email"); + String phost=request.getParameter("phone"); + String remark=request.getParameter("remark"); + java.util.Date today=new java.util.Date(); + java.sql.Date now=new java.sql.Date(today.getYear(),today.getMonth(),today.getDate()); + sql="insert into tb_OrderForm values('"+names+"',"+counts+",'"+color+"','"+payment+"','"+enterprise+"','"+address+"','"+area+"','"+dealer+"','"+linkman+"','"+phone+"','"+fax+"','"+email+"','"+phost+"','"+remark+"','"+now+"','δ')"; + i=data.getint(sql); + if(i>0){ +%> + +<%}}%> + +<%@ include file="Top.jsp" %> + + + + + +
    + + + + + + + + + + + + + + + + + + +
     ĵ
    + <% + menu.add(" ",""); + menu.add(" ",""); + menu.add(" ","߶"); + menu.add(" ","򹺳"); + %> + <%=menu.table()%> + <%menu.setnull();%> +
     վ
    <%=search.getsearch()%>
     ű
    <%=news.getstring()%>
    + <% if(request.getParameter("type")==null){%> + <%=cus.gettable()%> + <% }else {%> + <% if(request.getParameter("type").equals("߶")){%> + + + + + + +
      -->> ߶
    + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ͣ
    + +
    ʽ
    + +
    ѡɫ
    + + + + + + + + + + + + + + + +
    ˾ƣ
    +
    ϸַ
    +
    ڵ
    + + + + +
    +
    ƣ
    + + + + + +
    + +
    +
    ϵˣ
    ϵ绰
    E-mail
      
    עϢ
    + +
     
     
    + + +
    +<%}%> +<% if(request.getParameter("type").equals("򹺳")){%> + + + + + + +
      -->> 򹺳
    + + + +
    + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ¼ƣ
    ¼룺
    ȷ룺
    + +
    ʵ
    ϵ绰
    +
    + +
    ȤƷƣ
    +
    Ȥijͣ
    +
    E-mailַ
    ֻ룺
    ͥסַ
    + + +
    +<%}%> +<% if(request.getParameter("type").equals("")){%> + <%order.setfile(application.getRealPath("/Text"),"OrderHelp.dll");%> + <%order.setsize(566,460);%> + <%order.setname(""," ");%> +<%=order.gettable()%> +<%}%> +<% if(request.getParameter("type").equals("")){%> + <%=cus.gettable()%> +<%}}%> +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/Tenancy.jsp b/20/WebRoot/Tenancy.jsp new file mode 100644 index 0000000..2e2fd02 --- /dev/null +++ b/20/WebRoot/Tenancy.jsp @@ -0,0 +1,343 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<%@ page import="java.util.Date"%> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + + + + + +<%! + ResultSet rs; + String sql; + int i,max,years,month1,month2,day1,day2; + String name,pwd,pwd2,linkman,phone,email,fax,address,hander,numbers,cars,type; +%> +<% if(request.getParameter("action")!=null){ + name=request.getParameter("name"); + pwd=request.getParameter("pwd"); + pwd2=request.getParameter("pwd2"); + linkman=request.getParameter("linkman"); + phone=request.getParameter("phone"); + hander=request.getParameter("hander"); + fax=request.getParameter("fax"); + email=request.getParameter("email"); + address=request.getParameter("address"); + numbers=request.getParameter("numbers"); + cars=request.getParameter("cars"); + java.util.Date today=new java.util.Date(); + years=today.getYear(); + month1=Integer.parseInt(request.getParameter("month1")); + day1=Integer.parseInt(request.getParameter("day1")); + month2=Integer.parseInt(request.getParameter("month2")); + day2=Integer.parseInt(request.getParameter("day2")); + java.sql.Date start=new java.sql.Date(years,month1,day1); + java.sql.Date end=new java.sql.Date(years,month2,day2); + java.sql.Date nows=new java.sql.Date(years,today.getMonth(),today.getDate()); + sql="insert into tb_Tenancy values('"+name+"','"+pwd+"','"+linkman+"','"+phone+"','"+fax+"','"+email+"','"+hander+"','"+address+"','"+numbers+"','"+cars+"','"+start+"','"+end+"','"+nows+"','δ')"; + i=data.getint(sql); + if(i>0){ +%> + +<% } +}%> + + + +<%@ include file="Top.jsp" %> + + + + + +
    + + + + + + + + + + + + + + + + + + +
     ĵ
    + <% + menu.add("          ",""); + menu.add("       Ԥ   ","Ԥ"); + %> + <%=menu.table()%> + <%menu.setnull();%>
     վ
    <%=search.getsearch()%>
     ű
    <%=news.getstring()%>
    + <% if(request.getParameter("type")==null||request.getParameter("type").equals("")){%> + <%order.setfile(application.getRealPath("/Text"),"Tenancy.txt");%> + <%order.setsize(500,450);%> + <%order.setname(""," ");%> + <%=order.gettable()%> + <%}else {%> + + + + + + + +
      -->><%if(request.getParameter("type")==null||request.getParameter("type").equals("")){%> <%=""%><%}else{%> <%=request.getParameter("type")%><%}%>
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ԥ
    ͻƣ
    + +
    ¼룺
    ȷ룺
    ϵˣ
    ϵ绰
    ֻ룺
    E-mail
    ϵַ
    ֤룺
      
    ⳵ͣ
    + +  
    ⳵ʱ䣺
    2005 + + + +  
     2005 + + + +  
        
    + + +
    +
    + <% }%> +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/Tenancy_Particular.jsp b/20/WebRoot/Tenancy_Particular.jsp new file mode 100644 index 0000000..d0c071c --- /dev/null +++ b/20/WebRoot/Tenancy_Particular.jsp @@ -0,0 +1,113 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<%@ page import="java.util.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ߶ + + + + +<%! + String sql; + ResultSet rs; + int i; + %> + <% + if(request.getParameter("Submit")!=null){ + sql="delete tb_Tenancy where ID="+request.getParameter("id"); + int j=data.getint(sql); + data.close(); +%> + +<% +} +%> + <% + if(request.getParameter("Submit2")!=null){ + sql="update tb_Tenancy set Whether='' where ID="+request.getParameter("id"); + int j=data.getint(sql); + data.close(); +%> + +<% +} +%> +<% +sql="select * from tb_Tenancy where ID="+request.getParameter("id"); +rs=data.getrs(sql); +rs.beforeFirst(); +if(rs!=null&&rs.next()){ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ">
    ϵˣ
     <%=rs.getString("UserName")%>
    ϵ绰
     <%=rs.getString("Phone")%>
    ֻ룺
     <%=rs.getString("Hander")%>
     <%=rs.getString("Fax")%>
    E-mail
     <%=rs.getString("Email")%>
    ϵַ
     <%=rs.getString("Address")%>
    ֤룺
     <%=rs.getString("Numbers")%>
    ⳵ͣ
      <%=rs.getString("CarsName")%>
    ⳵ʱ䣺
    <%=rs.getDate("StartTime")%> <%=rs.getDate("EndTime")%>
        
    + + + +
    + +<%}%> + diff --git a/20/WebRoot/Text/Customers.txt b/20/WebRoot/Text/Customers.txt new file mode 100644 index 0000000..e69de29 diff --git a/20/WebRoot/Text/Tenancy.txt b/20/WebRoot/Text/Tenancy.txt new file mode 100644 index 0000000..9efd060 --- /dev/null +++ b/20/WebRoot/Text/Tenancy.txt @@ -0,0 +1,23 @@ +һλ⳵ + +1. ͻ⳵ȵ⳵ÿƾ⳵ + +2. Ӫҵִո֤ + +3. λ + +4. ¡ + +5. ֿ֤ⷽʻ֤ + +6. ⷽܲЭ˾ʵ + +˰⳵ + +1. ͻ⳵Ȱ⳵ÿƾ⳵ + +2. ֿ˻ڲ֤ʻִ + +3. ˻ڲ֤ + +4. ֿ˼䵣˱ְҵż˫໥ \ No newline at end of file diff --git a/20/WebRoot/Top.jsp b/20/WebRoot/Top.jsp new file mode 100644 index 0000000..ecf63b7 --- /dev/null +++ b/20/WebRoot/Top.jsp @@ -0,0 +1,159 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> + + + +
    տƼ +
    + + + + +
    + + + + + + + +
      + + + + + +
    ڼ |
    + + + + + + + + +
    չʾ |
    |
    |
    û |
    ͷ |
    + + + + +
    + + + + + + +
    diff --git a/20/WebRoot/Usher.jsp b/20/WebRoot/Usher.jsp new file mode 100644 index 0000000..558212d --- /dev/null +++ b/20/WebRoot/Usher.jsp @@ -0,0 +1,375 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + + + + + +<%! + String sql; + int i; + ResultSet rs; + int row; + int number; + String keyword,type; + String vari; + String rla; + int pagecount; + int pages; + int nows; +%> + + +<%@ include file="Top.jsp" %> + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
     ĵ
    + <% + menu.add("       ",""); + menu.add("       ","ó"); + menu.add("       ","޳"); + %> + <%=menu.table()%> + <%menu.setnull();%> +
     վ
    <%=search.getsearch()%>
     ű
    <%=news.getstring()%>
     ҵ
    + + + + + + +
    + <% if(request.getParameter("type")==null||request.getParameter("type").equals("")){%> + + + + + + + + + + + + + +
     չʾ -->> ó
    + <% + if(request.getParameter("id")==null){ + rs=cross.getrs(1); + } + else{ + rs=cross.getrs(1,Integer.parseInt(request.getParameter("id"))); + } + if(rs!=null){ + rs.beforeFirst(); + if(rs!=null&&rs.next()){ + number=rs.getInt("Logo"); + %> + + + + + +
    + + + + + + + + + +
    " width="273" height="180" alt="<%=rs.getString("Ʒ")%> <%=rs.getString("ͺ")%>">
    +
    + &type=1'"> + <%=rs.getString("ͺ")%>','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')"> +
    + <%%> +
    + + + + + + + + +
    " width="110" height="90">
    " width="110" height="90">
    " width="110" height="90">
    " width="110" height="90">
    + <%rs=cross.getrs(1); + if(rs!=null){ + rs.last(); + int sum=rs.getRow(); + if(sum>6){row=2;}else{row=1;} + rs.beforeFirst(); + %> + + <%for(int j=1;j<=row;j++){%> + + <%while(rs!=null&&rs.next()){ + if(rs.getInt("Logo")!=number){%> + + <%}}%> + + <%}%> +
    + + + + + + + +
    " width="101" height="80">
    +
    + <%}%> +
    +
           + <%rs=cross.getrs(1); + if(rs!=null){ + rs.beforeFirst(); + while(rs!=null&&rs.next()){ + if(rs.getInt("Logo")==number){out.print(rs.getString("ּ"));} + } + }%> +
    + <%}else{ + out.print("ûзκγóϢ"); + }} + %> +
    + <% + } + else{ + if(request.getParameter("type").equals("޳")){%> + + + + + + + + + + +
     չʾ -->> ޳
    + <% + rst.size=5; + vari=request.getParameter("pages"); + if(vari==null){ + pages=1; + } + else{ + pages=Integer.parseInt(vari); + } + rst.page=pages; + rs=cross.getrs(4); + rla="type=޳&"; + rs=rst.getrs(rs); + nows=0; + while(rs!=null&&rs.next()&&(nows + + + + + + + + +
    " alt="" width="101" height="80">
    + + + + + + + + + + + + + + + + + + + + + + + + +
    ã
    <%=rs.getString("۸")%>
    ʱã
    <%=rs.getString("ʱ")%>Ԫ/ʱ
    ̷ã
    <%=rs.getString("̷")%>Ԫ/
    ð
    <%=rs.getString("Ŀ")%>
    ã
    <%=rs.getString("Ŀ")%>
    +
    ע
    +
    <%=rs.getString("ע")%>
    +
    + ','','width=500,height=450,toolbar=no,location=no,status=no,menubar=no')"> +
    +
    + <%}%> +
    + <% + pagecount=rst.getavg(); + if(pagecount>1){ + if(pages==1){ + out.write("һҳ"); + } + else{ + if(pagesһҳ"); + out.write("һҳ"); + } + else{ + out.write("һҳ"); + } + } + } + %> +
    + <%}%> + <%if(request.getParameter("type").equals("ó")){%> + + + + + + + + + + + + + +
     չʾ -->> ó
    + <% + if(request.getParameter("id")==null){ + rs=cross.getrs(3); + } + else{ + rs=cross.getrs(3,Integer.parseInt(request.getParameter("id"))); + } + if(rs!=null){ + rs.beforeFirst(); + if(rs!=null&&rs.next()){ + number=rs.getInt("Logo"); + %> + + + + + +
    + + + + + + + + + +
    " width="273" height="180" alt="<%=rs.getString("Ʒ")%> <%=rs.getString("ͺ")%>">
    +
    + &type=1'"> + <%=rs.getString("ͺ")%>','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')"> +
    + <%%> +
    + + + + + + + + +
    " width="110" height="90">
    " width="110" height="90">
    " width="110" height="90">
    " width="110" height="90">
    + <%rs=cross.getrs(3); + if(rs!=null){ + rs.last(); + int sum=rs.getRow(); + if(sum>6){row=2;}else{row=1;} + rs.beforeFirst(); + %> + + <%for(int j=1;j<=row;j++){%> + + <%while(rs!=null&&rs.next()){ + if(rs.getInt("Logo")!=number){%> + + <%}}%> + + <%}%> +
    + + + + + + + +
    " width="101" height="80">
    +
    + <%}%> +
    +
           + <%rs=cross.getrs(3); + if(rs!=null){ + rs.beforeFirst(); + while(rs!=null&&rs.next()){ + if(rs.getInt("Logo")==number){out.print(rs.getString("ּ"));} + } + }%> +
    + <%}else{ + out.print("ûзκóϢ"); + }} + %> +
    + <%}%> + <%}%> +
    +<%@ include file="Bottom.jsp" %> + + diff --git a/20/WebRoot/WEB-INF/classes/cars/Bean1.class b/20/WebRoot/WEB-INF/classes/cars/Bean1.class new file mode 100644 index 0000000..60694b0 Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/Bean1.class differ diff --git a/20/WebRoot/WEB-INF/classes/cars/Bean3.class b/20/WebRoot/WEB-INF/classes/cars/Bean3.class new file mode 100644 index 0000000..88c47a8 Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/Bean3.class differ diff --git a/20/WebRoot/WEB-INF/classes/cars/CrossTable.class b/20/WebRoot/WEB-INF/classes/cars/CrossTable.class new file mode 100644 index 0000000..fd91b18 Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/CrossTable.class differ diff --git a/20/WebRoot/WEB-INF/classes/cars/CustomerTable.class b/20/WebRoot/WEB-INF/classes/cars/CustomerTable.class new file mode 100644 index 0000000..f9aa801 Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/CustomerTable.class differ diff --git a/20/WebRoot/WEB-INF/classes/cars/FileText.class b/20/WebRoot/WEB-INF/classes/cars/FileText.class new file mode 100644 index 0000000..c1e5736 Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/FileText.class differ diff --git a/20/WebRoot/WEB-INF/classes/cars/NewsShow.class b/20/WebRoot/WEB-INF/classes/cars/NewsShow.class new file mode 100644 index 0000000..ee956f7 Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/NewsShow.class differ diff --git a/20/WebRoot/WEB-INF/classes/cars/OrderHelp.class b/20/WebRoot/WEB-INF/classes/cars/OrderHelp.class new file mode 100644 index 0000000..9b17bf7 Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/OrderHelp.class differ diff --git a/20/WebRoot/WEB-INF/classes/cars/Pages.class b/20/WebRoot/WEB-INF/classes/cars/Pages.class new file mode 100644 index 0000000..18eb9ab Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/Pages.class differ diff --git a/20/WebRoot/WEB-INF/classes/cars/PopMenu.class b/20/WebRoot/WEB-INF/classes/cars/PopMenu.class new file mode 100644 index 0000000..aee46dd Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/PopMenu.class differ diff --git a/20/WebRoot/WEB-INF/classes/cars/SearchTable.class b/20/WebRoot/WEB-INF/classes/cars/SearchTable.class new file mode 100644 index 0000000..d09300e Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/SearchTable.class differ diff --git a/20/WebRoot/WEB-INF/classes/cars/SendGet.class b/20/WebRoot/WEB-INF/classes/cars/SendGet.class new file mode 100644 index 0000000..9bbabe1 Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/SendGet.class differ diff --git a/20/WebRoot/WEB-INF/classes/cars/caradd.class b/20/WebRoot/WEB-INF/classes/cars/caradd.class new file mode 100644 index 0000000..cba4b7a Binary files /dev/null and b/20/WebRoot/WEB-INF/classes/cars/caradd.class differ diff --git a/20/WebRoot/WEB-INF/lib/sqljdbc.jar b/20/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/20/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/20/WebRoot/WEB-INF/web.xml b/20/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..60176f3 --- /dev/null +++ b/20/WebRoot/WEB-INF/web.xml @@ -0,0 +1,18 @@ + + + + + debugjsp + Added to compile JSPs with debug info + org.apache.jasper.servlet.JspServlet + + classdebuginfo + true + + 3 + + + debugjsp + *.jsp + + diff --git a/20/WebRoot/index.jsp b/20/WebRoot/index.jsp new file mode 100644 index 0000000..5948ddc --- /dev/null +++ b/20/WebRoot/index.jsp @@ -0,0 +1,239 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="java.io.*" %> +<% request.setCharacterEncoding("gb2312");%> + + +ۼվ + + + + + + +<%! + ResultSet rs; + String sql; + String sql1; + int i,max; +%> + + +<%@ include file="Top.jsp" %> + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
     վ
    + +<% sql="select * from tb_News where Type='վڹ' order by IssueDate"; +rs=data.getrs(sql); +rs.beforeFirst(); +i=0; +while(rs.next()&&(i<5)){ +i++; +%> +<%=""+rs.getString("Title")+"" %> +
    +<% +} +data.close(); +%> +
    +
     վ
     <%=search.getsearch()%>
     ű
    + <%=news.getstring()%>
     ҵ
    + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + +
     ³Ƽ
    + + + + + + + +
    + <%rs=cross.getrs(1); + if(rs!=null){ + rs.beforeFirst(); + if(rs!=null&&rs.next()){%> + + + + + + + +
    +
    + + + + + + + + + +
    ƣ<%=rs.getString("Ʒ")%> <%=rs.getString("ͺ")%>
    ο۸<%=rs.getString("ۼ")%>
    ʺû<%=rs.getString("Ⱥ")%>
    +
    + <%}}%> +
    + + + + + + + +
    + <%rs=cross.getrs(3); + if(rs!=null){ + rs.beforeFirst(); + if(rs!=null&&rs.next()){%> + + + + + +
    + + + + + + + + + + + + + +
      ƣ<%=rs.getString("Ʒ")%> <%=rs.getString("ͺ")%>
      ο۸<%=rs.getString("ۼ")%>
      ʺû<%=rs.getString("Ⱥ")%>
    &type=3" style=" color:#000000 ">  ϸ <%=rs.getString("ͺ")%>','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')" style=" color:#000000 ">߶
    +
    + <%}%> +
    + <%if(rs!=null&&rs.next()){%> + + + + + +
    + + + + + + + + + + + + + +
      ƣ<%=rs.getString("Ʒ")%> <%=rs.getString("ͺ")%>
      ο۸<%=rs.getString("ۼ")%>
      ʺû<%=rs.getString("Ⱥ")%>
    &type=3" style=" color:#000000 ">  ϸ <%=rs.getString("ͺ")%>','','width=500,height=560,toolbar=no,location=no,status=no,menubar=no')" style=" color:#000000 ">߶
    + <%}}%> +
    +
     չ̨ 
    + <%rs=cross.getrs(1); + if(rs!=null){ + rs.beforeFirst(); + rs.next(); + int rows=1; + while(rs!=null&&rs.next()&&rows<5){rows=rows+1;%> + + + + + +
    + + + + + + + + + +
      ƣ<%=rs.getString("Ʒ")%> <%=rs.getString("ͺ")%>
     <%=rs.getString("ּ")%>
    + <%}}%> +
     
    + + + + + + + + +
    ܳ
    ܳ
    + + + + +
    ɫʿ
    +
    + +
    +<%@ include file="Bottom.jsp" %> + + + + + diff --git a/20/WebRoot/test.jsp b/20/WebRoot/test.jsp new file mode 100644 index 0000000..61354cb --- /dev/null +++ b/20/WebRoot/test.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html; charset=GBK" %> +<%@ page import="java.sql.*" %> +<%@ page import="java.io.*"%> + + +Ӵ + + + + + +

    +<%! int counts; +int logo; +int sum; +%> +<% +gets.setdata(request.getInputStream(),request.getContentLength()); +counts=gets.getcounts(); +logo=add.getmax();%> +<% +for(int i=2;i<=counts;i++){ + sum=sum+add.getint(gets.getformname(i),gets.getdatas(i),gets.getdatas(1),logo); +} +%> +<% +if(sum==counts-1){ +sum=0; + %> + +<%}else{%> +<% sum=0; %> + +<%}%> +

    + + diff --git a/20/src/cars/Bean1.java b/20/src/cars/Bean1.java new file mode 100644 index 0000000..e0841a5 --- /dev/null +++ b/20/src/cars/Bean1.java @@ -0,0 +1,93 @@ +package cars; +import java.sql.*; +/** + *

    Title:

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company:

    + * @author not attributable + * @version 1.0 + */ + +public class Bean1 { + Connection con; + Statement st; + ResultSet rs; + String name; + int i; + boolean bln; + public Bean1() { + } + public synchronized Connection getcon() throws Exception { + try{ + + Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); + con=DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=db_Cars","sa",""); + return con; + } + catch(Exception ex){ + ex.printStackTrace(); + } + return null; + } + public Statement getst(){ + try{ + con=getcon(); + st=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); + return st; + } + catch(Exception e1){ + } + return null; + } + public ResultSet getrs(String sql){ + try{ + st=getst(); + rs=st.executeQuery(sql); + return rs; + } + catch(Exception e2){ + } + return null; + } + public int getint(String sql){ + try{ + st=getst(); + i=st.executeUpdate(sql); + return i; + } + catch(Exception e3){ + } + return 0; + } + public boolean getbln(String sql){ + try{ + st=getst(); + bln=st.execute(sql); + return bln; + } + catch(Exception e4){ + } + return false; + } + + public synchronized void close(){ + try{ + if(rs!=null){ + rs.close(); + rs = null; + } + if(st!=null){ + st.close(); + st = null; + } + if(con!=null){ + con.close(); + con = null; + } + } + catch(Exception e5){ + + } + } +} diff --git a/20/src/cars/Bean3.java b/20/src/cars/Bean3.java new file mode 100644 index 0000000..c1fce37 --- /dev/null +++ b/20/src/cars/Bean3.java @@ -0,0 +1,45 @@ +package cars; + +/** + *

    Title: ۼվ

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company: տƼ޹˾

    + * @author not attributable + * @version 1.0 + */ + +public class Bean3 { + String url; + String email; + String number1; + public Bean3() { + } + public String seturl(String name,String http){ + try{ + url=""+name+""; + return url; + } + catch(Exception e){ + } + return null; + } + public String setemail(String email1){ + try{ + email="E-mail:"+email1+""; + return email; + } + catch(Exception e1){ + } + return null; + } + public String setnumbers(String phone){ + try{ + number1="     ͷ:"+phone; + return number1; + } + catch(Exception e2){ + } + return null; + } +} \ No newline at end of file diff --git a/20/src/cars/CrossTable.java b/20/src/cars/CrossTable.java new file mode 100644 index 0000000..45a81a0 --- /dev/null +++ b/20/src/cars/CrossTable.java @@ -0,0 +1,251 @@ +package cars; + +import java.sql.*; +/** + *

    Title: ۼվ

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company: տƼ޹˾

    + * @author not attributable + * @version 1.0 + */ + +public class CrossTable { + Bean1 data=new Bean1(); + ResultSet rs; + ResultSet rs1; + int sum=0; + String sql; + String str=""; + int homo1=0; + int homo=0; + int homo2=0; + String rla=""; + int str1=0; + int str2=0; + + + public CrossTable() { + } + + public ResultSet getrs(int i){ + try{ + sql = "select Name from tb_Basic2 where Home2="+i; + rs = data.getrs(sql); + rs.last(); + sum = rs.getRow(); + rs.beforeFirst(); + while (rs.next()) { + if (rs.isLast()) { + str = str + "min(case Name when '" + rs.getString("Name") + + "' then tb_Values.Price end) AS '" + rs.getString("Name") + "'"; + } + else { + str = str + "min(case Name when '" + rs.getString("Name") + + "' then tb_Values.Price end) AS '" + rs.getString("Name") + "',"; + } + } + rs.close(); + sql = "select tb_Values.Logo," + str + " from tb_Basic2 inner join tb_Values on tb_Basic2.ID=tb_Values.Homo1 and tb_Values.Type="+i+" group by tb_Values.Logo"; + rs = data.getrs(sql); + str=""; + return rs; + } + catch(Exception e){ + e.printStackTrace(); + } + return null; + } + + public ResultSet getrs(int i,int logo){ + try{ + sql = "select Name from tb_Basic2 where Home2="+i; + rs = data.getrs(sql); + rs.last(); + sum = rs.getRow(); + rs.beforeFirst(); + while (rs.next()) { + if (rs.isLast()) { + str = str + "min(case Name when '" + rs.getString("Name") + + "' then tb_Values.Price end) AS '" + rs.getString("Name") + "'"; + } + else { + str = str + "min(case Name when '" + rs.getString("Name") + + "' then tb_Values.Price end) AS '" + rs.getString("Name") + "',"; + } + } + rs.close(); + sql = "select tb_Values.Logo," + str + " from tb_Basic2 inner join tb_Values on tb_Basic2.ID=tb_Values.Homo1 and tb_Values.Logo="+logo+" group by tb_Values.Logo"; + rs = data.getrs(sql); + str=""; + return rs; + } + catch(Exception e){ + e.printStackTrace(); + } + return null; + } + + public ResultSet getrs(int i,int logo,int type){ + try{ + sql = "select Name from tb_Basic2 where Home2="+i+" and Homo1="+type; + rs = data.getrs(sql); + rs.last(); + sum = rs.getRow(); + rs.beforeFirst(); + while (rs.next()) { + if (rs.isLast()) { + str = str + "min(case Name when '" + rs.getString("Name") + + "' then tb_Values.Price end) AS '" + rs.getString("Name") + "'"; + } + else { + str = str + "min(case Name when '" + rs.getString("Name") + + "' then tb_Values.Price end) AS '" + rs.getString("Name") + "',"; + } + } + rs.close(); + sql = "select tb_Values.Logo," + str + " from tb_Basic2 inner join tb_Values on tb_Basic2.ID=tb_Values.Homo1 and tb_Values.Logo="+logo+" group by tb_Values.Logo"; + rs = data.getrs(sql); + str=""; + return rs; + } + catch(Exception e){ + e.printStackTrace(); + } + return null; + } + + public ResultSet getrs(String name1,String name2,int logo){ + try{ + sql="select * from tb_Basic2 where Name='Ʒ' and Home2="+logo; + rs=data.getrs(sql); + rs.beforeFirst(); + if(rs.next()&&rs!=null){ + homo1 = rs.getInt("ID"); + } + sql="select * from tb_Basic2 where Name='ͺ' and Home2="+logo; + rs=data.getrs(sql); + rs.beforeFirst(); + if(rs.next()&&rs!=null){ + homo2 = rs.getInt("ID"); + } + sql="select * from tb_Values where Homo1="+homo1+" and Price like '%"+name1+"%'"; + rs=data.getrs(sql); + rs.last(); + int row1=rs.getRow(); + int[] ary1=new int[row1]; + rs.beforeFirst(); + while(rs.next()&&rs!=null){ + ary1[str2]=rs.getInt("Logo"); + str2=str2+1; + } + rs.close(); + data.close(); + Bean1 data1=new Bean1(); + sql="select * from tb_Values where Homo1="+homo2+" and Price like '%"+name2+"%'"; + rs=data1.getrs(sql); + rs.beforeFirst(); + rla=""; + while(rs.next()&&rs!=null){ + for(str1=0;str1
     ͷ -->> ͷ
    " + + "0431-8497****

    ֣0432-769****

    ƽ0434-559****
    "; + } + + public String gettable(){ + return table; + } +} \ No newline at end of file diff --git a/20/src/cars/FileText.java b/20/src/cars/FileText.java new file mode 100644 index 0000000..f5f8853 --- /dev/null +++ b/20/src/cars/FileText.java @@ -0,0 +1,80 @@ +package cars; + +import java.sql.*; + +/** + *

    Title: ۼվ

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company: տƼ޹˾

    + * @author not attributable + * @version 1.0 + */ + +public class FileText { + String[] city=new String[30]; + String filetext=""; + String sql; + String rla=""; + String mid=""; + ResultSet rs; + Bean1 data=new Bean1(); + + public FileText() { + city[0]="½"; + city[1]=""; + city[2]=""; + city[3]="Ĵ"; + city[4]=""; + city[5]="㶫"; + city[6]=""; + city[7]=""; + city[8]=""; + city[9]=""; + city[10]="㽭"; + city[11]=""; + city[12]=""; + city[13]=""; + city[14]=""; + city[15]=""; + city[16]="ӱ"; + city[17]="ɽ"; + city[18]="ɽ"; + city[19]=""; + city[20]=""; + city[21]=""; + city[22]="ຣ"; + city[23]="ɹ"; + city[24]=""; + city[25]=""; + city[26]=""; + city[27]=""; + city[28]=""; + city[29]=""; + } + + public String getfiletext(String type){ + try{ + filetext=""; + return filetext; + } + catch(Exception e){ + e.printStackTrace(); + } + return null; + } +} \ No newline at end of file diff --git a/20/src/cars/NewsShow.java b/20/src/cars/NewsShow.java new file mode 100644 index 0000000..8156cbf --- /dev/null +++ b/20/src/cars/NewsShow.java @@ -0,0 +1,40 @@ +package cars; + +import java.sql.*; + +/** + *

    Title: ۼվ

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company: տƼ޹˾

    + * @author not attributable + * @version 1.0 + */ + +public class NewsShow { + String sql; + String show; + ResultSet rs; + int i=0; + public NewsShow() { + Bean1 data=new Bean1(); + sql="select * from tb_News where Type='ű' or Type='Ŷ' or Type='³' order by IssueDate"; + try{ + rs=data.getrs(sql); + rs.beforeFirst(); + sql=""; + while (rs.next()&&(i<10)){ + sql=sql+"
        "+rs.getString("Title")+"
    "; + show=show+sql+"
    "; + } + + public String getstring(){ + return show; + } +} \ No newline at end of file diff --git a/20/src/cars/OrderHelp.java b/20/src/cars/OrderHelp.java new file mode 100644 index 0000000..9703358 --- /dev/null +++ b/20/src/cars/OrderHelp.java @@ -0,0 +1,62 @@ +package cars; +import java.io.*; + +public class OrderHelp { + String table; + String fla; + File files; + String title; + String names; + int size; + int height1; + int height2; + + public OrderHelp() { + + } + + public void setfile(String path,String name){ + try{ + files=new File(path,name); + size=(int)files.length(); + FileInputStream filein=new FileInputStream(files); + byte[] buffer=new byte[size]; + filein.read(buffer); + fla=new String(buffer); + } + catch(Exception e){ + e.printStackTrace(); + } + } + + public void setname(String name,String name2){ + title=name; + names=name2; + } + + public void setsize(int ht,int ht2){ + height1=ht; + height2=ht2; + } + + public String gettable(){ + try{ + table=""; + table=table+""; + table=table+""; + table=table+""; + table=table+"
     "+title+" -->> "+names+"
    "; + table=table+""; + table=table+""; + table=table+"
    "; + table=table+"
    "+names+"
     
     
     ";
    +      table=table+fla+"
    "; + return table; + } + catch(Exception e){ + e.printStackTrace(); + } + return null; + } + +} \ No newline at end of file diff --git a/20/src/cars/Pages.java b/20/src/cars/Pages.java new file mode 100644 index 0000000..2e6e012 --- /dev/null +++ b/20/src/cars/Pages.java @@ -0,0 +1,56 @@ +package cars; +import java.sql.*; + +/** + *

    Title: ۼվ

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company: տƼ޹˾

    + * @author not attributable + * @version 1.0 + */ + +public class Pages { + + private ResultSet rs2; + public int page; + public int size; + private int i; + public int avg; + public int sum; + private int nows; + + public Pages() { + } + + public ResultSet getrs(ResultSet rs1){ + try{ + rs2=rs1; + rs2.last(); + sum=rs2.getRow(); + avg=sum/size; + if(sum%size!=0){ + avg=avg+1; + } + nows=(page-1)*size; + rs2.beforeFirst(); + for(i=0;iTitle: ۼվ

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company: տƼ޹˾

    + * @author not attributable + * @version 1.0 + */ + +public class PopMenu { + String tablehead; + String table; + String tablebottom; + String tr=""; + int i=0; + public PopMenu() { + tablehead=""; + tablebottom="
    "; + } + + public void add(String st,String str){ + i=i+1; + tr=tr+"
    "+st+"
    "; + } + + public String table(){ + table=tablehead+tr+tablebottom; + return table; + } + + public void setnull(){ + i=0; + tr=""; + } +} \ No newline at end of file diff --git a/20/src/cars/SearchTable.java b/20/src/cars/SearchTable.java new file mode 100644 index 0000000..1a02efe --- /dev/null +++ b/20/src/cars/SearchTable.java @@ -0,0 +1,21 @@ +package cars; + +public class SearchTable { + private String table; + + public SearchTable() { + table=""; + table=table+""; + table=table+""; + table=table+""; + table=table+"
    Ʒƣ
    "; + table=table+"
    ͺţ
    "; + table=table+"
    "; + table=table+"
    "; + } + + public String getsearch(){ + return table; + } +} \ No newline at end of file diff --git a/20/src/cars/SendGet.java b/20/src/cars/SendGet.java new file mode 100644 index 0000000..9e1e56b --- /dev/null +++ b/20/src/cars/SendGet.java @@ -0,0 +1,144 @@ +package cars; + +import javax.servlet.*; +import java.io.*; + +/** + *

    Title: ۼվ

    + *

    Description:

    + *

    Copyright: Copyright (c) 2005

    + *

    Company: տƼ޹˾

    + * @author not attributable + * @version 1.0 + */ + +public class SendGet{ + + /*,洢ûϴĶ */ + DataInputStream datas; + /*洢REQUESTĿͻϴĶ*/ + ServletInputStream input; + /*תַ*/ + byte[] buffer; + private static String str="\r\n"; + int start,end,size,begin; + String path; + String all; + int counts=0; + int strs=0; + int sum; + + public SendGet() { + + } + +/* + *ȡûϴĶ + *Ϊ,ĴС + **/ + +public void setdata(ServletInputStream inputs,int len){ + try{ + input=inputs; + begin=0; + size=len; + byte[] buf=new byte[size]; + buffer=new byte[size]; + while(strs counts) { + return null; + } + else{ + String rel=all; + for(int j=0;j counts) { + return "wrong"; + } + else{ + String rel=all; + for(int j=0;j + + + + + + + diff --git a/21/.mymetadata b/21/.mymetadata new file mode 100644 index 0000000..af5f7a0 --- /dev/null +++ b/21/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/21/.project b/21/.project new file mode 100644 index 0000000..fb136c6 --- /dev/null +++ b/21/.project @@ -0,0 +1,50 @@ + + + 21 + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/21/.settings/.jsdtscope b/21/.settings/.jsdtscope new file mode 100644 index 0000000..96608b5 --- /dev/null +++ b/21/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/21/.settings/org.eclipse.jdt.core.prefs b/21/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..e267bab --- /dev/null +++ b/21/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Mon Feb 28 10:43:47 CST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/21/.settings/org.eclipse.wst.jsdt.ui.superType.container b/21/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/21/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/21/.settings/org.eclipse.wst.jsdt.ui.superType.name b/21/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/21/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/21/WebRoot/META-INF/MANIFEST.MF b/21/WebRoot/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/21/WebRoot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/21/WebRoot/WEB-INF/classes/com/bwm/db/Condb.class b/21/WebRoot/WEB-INF/classes/com/bwm/db/Condb.class new file mode 100644 index 0000000..6c01cbb Binary files /dev/null and b/21/WebRoot/WEB-INF/classes/com/bwm/db/Condb.class differ diff --git a/21/WebRoot/WEB-INF/classes/com/bwm/page/Show.class b/21/WebRoot/WEB-INF/classes/com/bwm/page/Show.class new file mode 100644 index 0000000..bbfb06a Binary files /dev/null and b/21/WebRoot/WEB-INF/classes/com/bwm/page/Show.class differ diff --git a/21/WebRoot/WEB-INF/classes/com/bwm/string/Sql.class b/21/WebRoot/WEB-INF/classes/com/bwm/string/Sql.class new file mode 100644 index 0000000..485bb29 Binary files /dev/null and b/21/WebRoot/WEB-INF/classes/com/bwm/string/Sql.class differ diff --git a/21/WebRoot/WEB-INF/classes/com/bwm/string/Str.class b/21/WebRoot/WEB-INF/classes/com/bwm/string/Str.class new file mode 100644 index 0000000..012b1e4 Binary files /dev/null and b/21/WebRoot/WEB-INF/classes/com/bwm/string/Str.class differ diff --git a/21/WebRoot/WEB-INF/lib/sqljdbc.jar b/21/WebRoot/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/21/WebRoot/WEB-INF/lib/sqljdbc.jar differ diff --git a/21/WebRoot/WEB-INF/web.xml b/21/WebRoot/WEB-INF/web.xml new file mode 100644 index 0000000..1b53333 --- /dev/null +++ b/21/WebRoot/WEB-INF/web.xml @@ -0,0 +1,33 @@ + + + + + + Welcome to Tomcat + + Welcome to Tomcat + + + + + + + + diff --git a/21/WebRoot/admin/admin.jsp b/21/WebRoot/admin/admin.jsp new file mode 100644 index 0000000..b2343e3 --- /dev/null +++ b/21/WebRoot/admin/admin.jsp @@ -0,0 +1,38 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> +<%@ page import="com.bwm.page.Show"%> + + + +ޱĵ + + + +<% + Condb con=new Condb(); + Show show=new Show(); + String name=request.getParameter("name"); + String password=request.getParameter("password"); + String sql="select * from tb_Person where Username='"+name+"' and Password='"+password+"'"; + ResultSet rs=con.executeQuery(sql); + if(rs.next()){ + int str=rs.getInt(11); + if(str==1){ + response.sendRedirect("index.htm"); + }else{ + out.print(show.errorBox("ǷĹԱ벻Ҫ¼","Ϣ")); + out.close(); + } +}else{ +%> + +<% +} +con.close(); +%> + + diff --git a/21/WebRoot/admin/admindex.jsp b/21/WebRoot/admin/admindex.jsp new file mode 100644 index 0000000..7c149c6 --- /dev/null +++ b/21/WebRoot/admin/admindex.jsp @@ -0,0 +1,149 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> + + + +Աҳ + + + + + + +map1(1) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + +
    +
    + + +
    +
    + + + + diff --git a/21/WebRoot/admin/botom.htm b/21/WebRoot/admin/botom.htm new file mode 100644 index 0000000..03234bb --- /dev/null +++ b/21/WebRoot/admin/botom.htm @@ -0,0 +1,11 @@ + + + +ޱĵ + + + + + + + diff --git a/21/WebRoot/admin/copy.htm b/21/WebRoot/admin/copy.htm new file mode 100644 index 0000000..119adea --- /dev/null +++ b/21/WebRoot/admin/copy.htm @@ -0,0 +1,19 @@ + + + + +ޱĵ + + + + + + diff --git a/21/WebRoot/admin/index.htm b/21/WebRoot/admin/index.htm new file mode 100644 index 0000000..0fd99c7 --- /dev/null +++ b/21/WebRoot/admin/index.htm @@ -0,0 +1,22 @@ + + + + +Աҳ + + + + + + + + + + + + + +<body> +</body> + + diff --git a/21/WebRoot/admin/left.htm b/21/WebRoot/admin/left.htm new file mode 100644 index 0000000..2e2c510 --- /dev/null +++ b/21/WebRoot/admin/left.htm @@ -0,0 +1,22 @@ + + + + +Աҳ + + + +
    + + + + + + + + +
    + + + diff --git a/21/WebRoot/admin/login.jsp b/21/WebRoot/admin/login.jsp new file mode 100644 index 0000000..29f69b3 --- /dev/null +++ b/21/WebRoot/admin/login.jsp @@ -0,0 +1,59 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> + + + + + +Ա¼ + + + +

     

    +

     

    + + + + + + + + + + + + + + + + + +
    Ա¼
    Ա: +
         : +
    +
    + + diff --git a/21/WebRoot/admin/top.htm b/21/WebRoot/admin/top.htm new file mode 100644 index 0000000..9a165b8 --- /dev/null +++ b/21/WebRoot/admin/top.htm @@ -0,0 +1,22 @@ + + + + +ޱĵ + + + + + + + + + diff --git a/21/WebRoot/css/style.css b/21/WebRoot/css/style.css new file mode 100644 index 0000000..2e36560 --- /dev/null +++ b/21/WebRoot/css/style.css @@ -0,0 +1,56 @@ + + \ No newline at end of file diff --git a/21/WebRoot/css/style.css.LCK b/21/WebRoot/css/style.css.LCK new file mode 100644 index 0000000..ba96be6 --- /dev/null +++ b/21/WebRoot/css/style.css.LCK @@ -0,0 +1 @@ +Crazyadept \ No newline at end of file diff --git a/21/WebRoot/flow.htm b/21/WebRoot/flow.htm new file mode 100644 index 0000000..d3a3c37 --- /dev/null +++ b/21/WebRoot/flow.htm @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      
     1.Ա걨Աû뼰Ȩޡ
    + 2.걨Աͨû¼걨档
    + 3.걨֮ǰΪ˱걨ijɹ,޸ѵĸϢ,Ȼٽ걨
    + 4.걨ͳɹд,ɹ,˿ɹ޸ġݿϵͳԱȡϵ
    + 5.Այ걨ɹʱĿǷ⡣
    + 6.걨Ա걨ѯ걨Ŀ
     
      
       

    +
    ҳ +
    + + diff --git a/21/WebRoot/images/image/Thumbs.db b/21/WebRoot/images/image/Thumbs.db new file mode 100644 index 0000000..8fec660 Binary files /dev/null and b/21/WebRoot/images/image/Thumbs.db differ diff --git a/21/WebRoot/images/image/shenbao_1.gif b/21/WebRoot/images/image/shenbao_1.gif new file mode 100644 index 0000000..e010763 Binary files /dev/null and b/21/WebRoot/images/image/shenbao_1.gif differ diff --git a/21/WebRoot/images/image/shenbao_2.gif b/21/WebRoot/images/image/shenbao_2.gif new file mode 100644 index 0000000..52aa2f6 Binary files /dev/null and b/21/WebRoot/images/image/shenbao_2.gif differ diff --git a/21/WebRoot/images/image/shenbao_4.gif b/21/WebRoot/images/image/shenbao_4.gif new file mode 100644 index 0000000..c52113d Binary files /dev/null and b/21/WebRoot/images/image/shenbao_4.gif differ diff --git a/21/WebRoot/images/image/shenbao_5.gif b/21/WebRoot/images/image/shenbao_5.gif new file mode 100644 index 0000000..35828e1 Binary files /dev/null and b/21/WebRoot/images/image/shenbao_5.gif differ diff --git a/21/WebRoot/images/image/shenpi_1.gif b/21/WebRoot/images/image/shenpi_1.gif new file mode 100644 index 0000000..aecd48f Binary files /dev/null and b/21/WebRoot/images/image/shenpi_1.gif differ diff --git a/21/WebRoot/images/image/shenpi_2.gif b/21/WebRoot/images/image/shenpi_2.gif new file mode 100644 index 0000000..175c65c Binary files /dev/null and b/21/WebRoot/images/image/shenpi_2.gif differ diff --git a/21/WebRoot/images/image/shenpi_3.gif b/21/WebRoot/images/image/shenpi_3.gif new file mode 100644 index 0000000..9cc2398 Binary files /dev/null and b/21/WebRoot/images/image/shenpi_3.gif differ diff --git a/21/WebRoot/images/image/spacer.gif b/21/WebRoot/images/image/spacer.gif new file mode 100644 index 0000000..5bfd67a Binary files /dev/null and b/21/WebRoot/images/image/spacer.gif differ diff --git a/21/WebRoot/images/image/zhuye_1.gif b/21/WebRoot/images/image/zhuye_1.gif new file mode 100644 index 0000000..475e455 Binary files /dev/null and b/21/WebRoot/images/image/zhuye_1.gif differ diff --git a/21/WebRoot/images/image/zhuye_2.gif b/21/WebRoot/images/image/zhuye_2.gif new file mode 100644 index 0000000..4beab82 Binary files /dev/null and b/21/WebRoot/images/image/zhuye_2.gif differ diff --git a/21/WebRoot/images/image/zhuye_3.gif b/21/WebRoot/images/image/zhuye_3.gif new file mode 100644 index 0000000..66624c5 Binary files /dev/null and b/21/WebRoot/images/image/zhuye_3.gif differ diff --git a/21/WebRoot/images/image/zhuye_4.gif b/21/WebRoot/images/image/zhuye_4.gif new file mode 100644 index 0000000..6e615f8 Binary files /dev/null and b/21/WebRoot/images/image/zhuye_4.gif differ diff --git a/21/WebRoot/images/images/Thumbs.db b/21/WebRoot/images/images/Thumbs.db new file mode 100644 index 0000000..71f011f Binary files /dev/null and b/21/WebRoot/images/images/Thumbs.db differ diff --git a/21/WebRoot/images/images/shenbao_1.gif b/21/WebRoot/images/images/shenbao_1.gif new file mode 100644 index 0000000..e010763 Binary files /dev/null and b/21/WebRoot/images/images/shenbao_1.gif differ diff --git a/21/WebRoot/images/images/shenbao_2.gif b/21/WebRoot/images/images/shenbao_2.gif new file mode 100644 index 0000000..52aa2f6 Binary files /dev/null and b/21/WebRoot/images/images/shenbao_2.gif differ diff --git a/21/WebRoot/images/images/shenbao_4.gif b/21/WebRoot/images/images/shenbao_4.gif new file mode 100644 index 0000000..c52113d Binary files /dev/null and b/21/WebRoot/images/images/shenbao_4.gif differ diff --git a/21/WebRoot/images/images/spacer.gif b/21/WebRoot/images/images/spacer.gif new file mode 100644 index 0000000..5bfd67a Binary files /dev/null and b/21/WebRoot/images/images/spacer.gif differ diff --git a/21/WebRoot/images/intro.gif b/21/WebRoot/images/intro.gif new file mode 100644 index 0000000..7c34a16 Binary files /dev/null and b/21/WebRoot/images/intro.gif differ diff --git a/21/WebRoot/images/kyw_net.gif b/21/WebRoot/images/kyw_net.gif new file mode 100644 index 0000000..21863d4 Binary files /dev/null and b/21/WebRoot/images/kyw_net.gif differ diff --git a/21/WebRoot/images/lc.gif b/21/WebRoot/images/lc.gif new file mode 100644 index 0000000..4d4788e Binary files /dev/null and b/21/WebRoot/images/lc.gif differ diff --git a/21/WebRoot/images/map1(1)_01.gif b/21/WebRoot/images/map1(1)_01.gif new file mode 100644 index 0000000..53e9c86 Binary files /dev/null and b/21/WebRoot/images/map1(1)_01.gif differ diff --git a/21/WebRoot/images/map1(1)_02.gif b/21/WebRoot/images/map1(1)_02.gif new file mode 100644 index 0000000..eaa0157 Binary files /dev/null and b/21/WebRoot/images/map1(1)_02.gif differ diff --git a/21/WebRoot/images/map1(1)_03.gif b/21/WebRoot/images/map1(1)_03.gif new file mode 100644 index 0000000..39a8027 Binary files /dev/null and b/21/WebRoot/images/map1(1)_03.gif differ diff --git a/21/WebRoot/images/map1(1)_04.gif b/21/WebRoot/images/map1(1)_04.gif new file mode 100644 index 0000000..daa755c Binary files /dev/null and b/21/WebRoot/images/map1(1)_04.gif differ diff --git a/21/WebRoot/images/map1(1)_05.gif b/21/WebRoot/images/map1(1)_05.gif new file mode 100644 index 0000000..bc81977 Binary files /dev/null and b/21/WebRoot/images/map1(1)_05.gif differ diff --git a/21/WebRoot/images/map1(1)_06.gif b/21/WebRoot/images/map1(1)_06.gif new file mode 100644 index 0000000..df65760 Binary files /dev/null and b/21/WebRoot/images/map1(1)_06.gif differ diff --git a/21/WebRoot/images/map1(1)_07.gif b/21/WebRoot/images/map1(1)_07.gif new file mode 100644 index 0000000..af91551 Binary files /dev/null and b/21/WebRoot/images/map1(1)_07.gif differ diff --git a/21/WebRoot/images/map1(1)_08.gif b/21/WebRoot/images/map1(1)_08.gif new file mode 100644 index 0000000..bd83c98 Binary files /dev/null and b/21/WebRoot/images/map1(1)_08.gif differ diff --git a/21/WebRoot/images/map1(1)_09.gif b/21/WebRoot/images/map1(1)_09.gif new file mode 100644 index 0000000..177cb47 Binary files /dev/null and b/21/WebRoot/images/map1(1)_09.gif differ diff --git a/21/WebRoot/images/map1(1)_10.gif b/21/WebRoot/images/map1(1)_10.gif new file mode 100644 index 0000000..d6b55f3 Binary files /dev/null and b/21/WebRoot/images/map1(1)_10.gif differ diff --git a/21/WebRoot/images/map1(1)_11.gif b/21/WebRoot/images/map1(1)_11.gif new file mode 100644 index 0000000..06f1041 Binary files /dev/null and b/21/WebRoot/images/map1(1)_11.gif differ diff --git a/21/WebRoot/images/map1(1)_12.gif b/21/WebRoot/images/map1(1)_12.gif new file mode 100644 index 0000000..cc5543d Binary files /dev/null and b/21/WebRoot/images/map1(1)_12.gif differ diff --git a/21/WebRoot/images/map1(1)_13.gif b/21/WebRoot/images/map1(1)_13.gif new file mode 100644 index 0000000..c36b212 Binary files /dev/null and b/21/WebRoot/images/map1(1)_13.gif differ diff --git a/21/WebRoot/images/map1(1)_14.gif b/21/WebRoot/images/map1(1)_14.gif new file mode 100644 index 0000000..545e0d7 Binary files /dev/null and b/21/WebRoot/images/map1(1)_14.gif differ diff --git a/21/WebRoot/images/map1(1)_15.gif b/21/WebRoot/images/map1(1)_15.gif new file mode 100644 index 0000000..393fd18 Binary files /dev/null and b/21/WebRoot/images/map1(1)_15.gif differ diff --git a/21/WebRoot/images/map1(1)_16.gif b/21/WebRoot/images/map1(1)_16.gif new file mode 100644 index 0000000..fb7a332 Binary files /dev/null and b/21/WebRoot/images/map1(1)_16.gif differ diff --git a/21/WebRoot/images/map1(1)_17.gif b/21/WebRoot/images/map1(1)_17.gif new file mode 100644 index 0000000..92e614c Binary files /dev/null and b/21/WebRoot/images/map1(1)_17.gif differ diff --git a/21/WebRoot/images/map1(1)_18.gif b/21/WebRoot/images/map1(1)_18.gif new file mode 100644 index 0000000..21f1a00 Binary files /dev/null and b/21/WebRoot/images/map1(1)_18.gif differ diff --git a/21/WebRoot/images/map1(1)_19.gif b/21/WebRoot/images/map1(1)_19.gif new file mode 100644 index 0000000..38b314a Binary files /dev/null and b/21/WebRoot/images/map1(1)_19.gif differ diff --git a/21/WebRoot/images/map1(1)_20.gif b/21/WebRoot/images/map1(1)_20.gif new file mode 100644 index 0000000..2577aa5 Binary files /dev/null and b/21/WebRoot/images/map1(1)_20.gif differ diff --git a/21/WebRoot/images/map1(1)_21.gif b/21/WebRoot/images/map1(1)_21.gif new file mode 100644 index 0000000..4997245 Binary files /dev/null and b/21/WebRoot/images/map1(1)_21.gif differ diff --git a/21/WebRoot/images/map1(1)_22.gif b/21/WebRoot/images/map1(1)_22.gif new file mode 100644 index 0000000..19417f2 Binary files /dev/null and b/21/WebRoot/images/map1(1)_22.gif differ diff --git a/21/WebRoot/images/map1(1)_23.gif b/21/WebRoot/images/map1(1)_23.gif new file mode 100644 index 0000000..216ec4b Binary files /dev/null and b/21/WebRoot/images/map1(1)_23.gif differ diff --git a/21/WebRoot/images/map1(1)_24.gif b/21/WebRoot/images/map1(1)_24.gif new file mode 100644 index 0000000..d747de8 Binary files /dev/null and b/21/WebRoot/images/map1(1)_24.gif differ diff --git a/21/WebRoot/images/map1(1)_25.gif b/21/WebRoot/images/map1(1)_25.gif new file mode 100644 index 0000000..bf114f4 Binary files /dev/null and b/21/WebRoot/images/map1(1)_25.gif differ diff --git a/21/WebRoot/images/map1(1)_26.gif b/21/WebRoot/images/map1(1)_26.gif new file mode 100644 index 0000000..c0fdffa Binary files /dev/null and b/21/WebRoot/images/map1(1)_26.gif differ diff --git a/21/WebRoot/images/map1(1)_27.gif b/21/WebRoot/images/map1(1)_27.gif new file mode 100644 index 0000000..74678b4 Binary files /dev/null and b/21/WebRoot/images/map1(1)_27.gif differ diff --git a/21/WebRoot/images/map1(1)_28.gif b/21/WebRoot/images/map1(1)_28.gif new file mode 100644 index 0000000..1f705d1 Binary files /dev/null and b/21/WebRoot/images/map1(1)_28.gif differ diff --git a/21/WebRoot/images/map1(1)_29.gif b/21/WebRoot/images/map1(1)_29.gif new file mode 100644 index 0000000..ac43100 Binary files /dev/null and b/21/WebRoot/images/map1(1)_29.gif differ diff --git a/21/WebRoot/images/map1(1)_30.gif b/21/WebRoot/images/map1(1)_30.gif new file mode 100644 index 0000000..2b4a66e Binary files /dev/null and b/21/WebRoot/images/map1(1)_30.gif differ diff --git a/21/WebRoot/images/map1(1)_31.gif b/21/WebRoot/images/map1(1)_31.gif new file mode 100644 index 0000000..89af715 Binary files /dev/null and b/21/WebRoot/images/map1(1)_31.gif differ diff --git a/21/WebRoot/images/map1(1)_32.gif b/21/WebRoot/images/map1(1)_32.gif new file mode 100644 index 0000000..22c16b5 Binary files /dev/null and b/21/WebRoot/images/map1(1)_32.gif differ diff --git a/21/WebRoot/images/map1(1)_33.gif b/21/WebRoot/images/map1(1)_33.gif new file mode 100644 index 0000000..24f8f3e Binary files /dev/null and b/21/WebRoot/images/map1(1)_33.gif differ diff --git a/21/WebRoot/images/map1(1)_34.gif b/21/WebRoot/images/map1(1)_34.gif new file mode 100644 index 0000000..1547ece Binary files /dev/null and b/21/WebRoot/images/map1(1)_34.gif differ diff --git a/21/WebRoot/images/map1(1)_35.gif b/21/WebRoot/images/map1(1)_35.gif new file mode 100644 index 0000000..d3d95f6 Binary files /dev/null and b/21/WebRoot/images/map1(1)_35.gif differ diff --git a/21/WebRoot/images/map1(1)_36.gif b/21/WebRoot/images/map1(1)_36.gif new file mode 100644 index 0000000..015b8d2 Binary files /dev/null and b/21/WebRoot/images/map1(1)_36.gif differ diff --git a/21/WebRoot/images/map1(1)_37.gif b/21/WebRoot/images/map1(1)_37.gif new file mode 100644 index 0000000..76b7668 Binary files /dev/null and b/21/WebRoot/images/map1(1)_37.gif differ diff --git a/21/WebRoot/images/map1(1)_38.gif b/21/WebRoot/images/map1(1)_38.gif new file mode 100644 index 0000000..4649d18 Binary files /dev/null and b/21/WebRoot/images/map1(1)_38.gif differ diff --git a/21/WebRoot/images/map1(1)_39.gif b/21/WebRoot/images/map1(1)_39.gif new file mode 100644 index 0000000..b60e44c Binary files /dev/null and b/21/WebRoot/images/map1(1)_39.gif differ diff --git a/21/WebRoot/images/map1(1)_40.gif b/21/WebRoot/images/map1(1)_40.gif new file mode 100644 index 0000000..019e1a9 Binary files /dev/null and b/21/WebRoot/images/map1(1)_40.gif differ diff --git a/21/WebRoot/images/map1(1)_41.gif b/21/WebRoot/images/map1(1)_41.gif new file mode 100644 index 0000000..f442d2e Binary files /dev/null and b/21/WebRoot/images/map1(1)_41.gif differ diff --git a/21/WebRoot/images/map1(1)_42.gif b/21/WebRoot/images/map1(1)_42.gif new file mode 100644 index 0000000..d3aa1e8 Binary files /dev/null and b/21/WebRoot/images/map1(1)_42.gif differ diff --git a/21/WebRoot/images/map1(1)_43.gif b/21/WebRoot/images/map1(1)_43.gif new file mode 100644 index 0000000..96d12b4 Binary files /dev/null and b/21/WebRoot/images/map1(1)_43.gif differ diff --git a/21/WebRoot/images/map1(1)_44.gif b/21/WebRoot/images/map1(1)_44.gif new file mode 100644 index 0000000..22db2ce Binary files /dev/null and b/21/WebRoot/images/map1(1)_44.gif differ diff --git a/21/WebRoot/images/map1(1)_45.gif b/21/WebRoot/images/map1(1)_45.gif new file mode 100644 index 0000000..614ade3 Binary files /dev/null and b/21/WebRoot/images/map1(1)_45.gif differ diff --git a/21/WebRoot/images/shenbao_2.gif b/21/WebRoot/images/shenbao_2.gif new file mode 100644 index 0000000..52aa2f6 Binary files /dev/null and b/21/WebRoot/images/shenbao_2.gif differ diff --git a/21/WebRoot/images/shenbao_4.gif b/21/WebRoot/images/shenbao_4.gif new file mode 100644 index 0000000..c52113d Binary files /dev/null and b/21/WebRoot/images/shenbao_4.gif differ diff --git a/21/WebRoot/index.html b/21/WebRoot/index.html new file mode 100644 index 0000000..56f9af4 --- /dev/null +++ b/21/WebRoot/index.html @@ -0,0 +1,47 @@ + + + + +ҳ + + + + + + + +
    + + + + + + + + + +
     
    + + + + +
     
     
    + + + + + + + + + diff --git a/21/WebRoot/index.jsp b/21/WebRoot/index.jsp new file mode 100644 index 0000000..d871e53 --- /dev/null +++ b/21/WebRoot/index.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + My JSP 'index.jsp' starting page + + + + + + + + + + This is my JSP page.
    + + diff --git a/21/WebRoot/js/check.js b/21/WebRoot/js/check.js new file mode 100644 index 0000000..3e26eda --- /dev/null +++ b/21/WebRoot/js/check.js @@ -0,0 +1,24 @@ + +function CheckDate(INDate) +{ if(INDate=="") + {return true;} + subYY=INDate.substr(0,4) + //转换月份 + if(INDate.indexOf('-',0)!=-1){ separate="-"} + else{ + if(INDate.indexOf('/',0)!=-1){separate="/"} + else {return true;}} + area=INDate.indexOf(separate,0) + subMM=INDate.substr(area+1,INDate.indexOf(separate,area+1)-(area+1)) + if(subMM.length<2){subMM="0"+subMM} + //转换日 + area=INDate.lastIndexOf(separate) + subDD=INDate.substr(area+1,INDate.length-area-1) + if(eval(subDD)<10){subDD="0"+eval(subDD)} + NewDate=subYY+"-"+subMM+"-"+subDD + if(NewDate.length!=10){return true;} + if(NewDate.substr(4,1)!="-"){return true;} + if(NewDate.substr(7,1)!="-"){return true;} + if(NewDate.substr(5,2)>"12"){return true;} + if(NewDate.substr(8,2)>"31"){return true;} + return false;} diff --git a/21/WebRoot/js/dcheck.js b/21/WebRoot/js/dcheck.js new file mode 100644 index 0000000..8bbf191 --- /dev/null +++ b/21/WebRoot/js/dcheck.js @@ -0,0 +1,24 @@ + +function CheckDate(INDate) +{ if(INDate=="") + {return true;} + subYY=INDate.substr(0,4) + //转换月份 + if(INDate.indexOf('-',0)!=-1){ separate="-"} + else{ + if(INDate.indexOf('/',0)!=-1){separate="/"} + else {return true;}} + area=INDate.indexOf(separate,0) + subMM=INDate.substr(area+1,INDate.indexOf(separate,area+1)-(area+1)) + if(subMM.length<2){subMM="0"+subMM} + //转换日 + area=INDate.lastIndexOf(separate) + subDD=INDate.substr(area+1,INDate.length-area-1) + if(eval(subDD)<10){subDD="0"+eval(subDD)} + NewDate=subYY+"-"+subMM+"-"+subDD + if(NewDate.length!=10){return true;} + if(NewDate.substr(4,1)!="-"){return true;} + if(NewDate.substr(7,1)!="-"){return true;} + if(NewDate.substr(5,2)>"12"){return true;} + if(NewDate.substr(8,2)>"31"){return true;} + return false;} diff --git a/21/WebRoot/manage/Rcheck.jsp b/21/WebRoot/manage/Rcheck.jsp new file mode 100644 index 0000000..f236aa0 --- /dev/null +++ b/21/WebRoot/manage/Rcheck.jsp @@ -0,0 +1,29 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> + + + +ޱĵ + + + +<% + Condb con=new Condb(); + String temp=request.getParameter("Numbic"); + String choose=request.getParameter("choose"); + + String sql=""; + if(choose.equals("on")){ + sql="Update tb_Result set Result=1 where Resultname='"+temp+"'"; + } + int te=con.executeUpdate(sql); + if(te>0){ + response.sendRedirect("resultedit.jsp"); + }else{ + out.println("ݿ!!!"); + } + +%> + + diff --git a/21/WebRoot/manage/Rparticular.jsp b/21/WebRoot/manage/Rparticular.jsp new file mode 100644 index 0000000..db60bc0 --- /dev/null +++ b/21/WebRoot/manage/Rparticular.jsp @@ -0,0 +1,98 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> +<%@ page import="com.bwm.string.Str"%> + + + +ɹ굥 + + + + +<% + Str str=new Str(); + Condb con=new Condb(); + String temp=str.toChinese(request.getParameter("temp")); + String sql=""; + sql="select * from tb_Result where Result='"+1+"'and Resultname='"+temp+"'"; + ResultSet rs=con.executeQuery(sql); + while(rs.next()){ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ɹ +
     ɹʽ:<%=rs.getString(1)%>
     ɹ:<%=rs.getString(2)%>
     о:<%=rs.getString(3)%>
     ɹ:<%=rs.getString(4)%>
     о:<%=rs.getString(5)%>
     ɹ:<%=rs.getString(6)%>
     ɹ:<%=rs.getString(7)%>
     ʱ:<%=rs.getDate(8)%>
     :<%=rs.getString(9)%>
     ժҪ:<%=rs.getString(10)%>
     ע:<%=rs.getString(11)%>
    +<% +} +con.close(); +%> + + diff --git a/21/WebRoot/manage/Tcheck.jsp b/21/WebRoot/manage/Tcheck.jsp new file mode 100644 index 0000000..09935a3 --- /dev/null +++ b/21/WebRoot/manage/Tcheck.jsp @@ -0,0 +1,28 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> + + + +ޱĵ + + + +<% + Condb con=new Condb(); + String str=request.getParameter("Numbic"); + out.println(str); + String choose=request.getParameter("choose"); + String sql=""; + if(choose.equals("on")){ + sql="update tb_Task set Whether=1 where Taskname='"+str+"'"; + } + int temp=con.executeUpdate(sql); + if(temp>0){ + response.sendRedirect("taskedit.jsp"); + }else{ + out.println("ݿϵͳͳԱϵ"); + } +%> + + diff --git a/21/WebRoot/manage/Tparticular.jsp b/21/WebRoot/manage/Tparticular.jsp new file mode 100644 index 0000000..f3c7b58 --- /dev/null +++ b/21/WebRoot/manage/Tparticular.jsp @@ -0,0 +1,107 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<%@ page import="com.bwm.db.Condb"%> +<%@ page import="com.bwm.string.Str"%> + + + + + + + + + + <% + Str str=new Str(); + Condb con=new Condb(); + String st=str.toChinese(request.getParameter("temp")); + String sql="select * from tb_Task where Taskname='"+st+"'"; + ResultSet rs=con.executeQuery(sql); + while(rs.next()){ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
     ׼:<%=rs.getString(1)%>
     :<%=rs.getString(2)%>
     о:<%=rs.getString(3)%>
     :<%=rs.getString(4)%>
     ɹʽ:<%=rs.getString(5)%>
     оʽ:<%=rs.getString(6)%>
     Դ:<%=rs.getString(7)%>
     ׼λ:<%=rs.getString(8)%>
     ʱ:<%=rs.getDate(9)%>
     ʱ:<%=rs.getDate(10)%>
     :<%=rs.getString(11)%>
     ժҪ:<%=rs.getString(12)%>
     ע:<%=rs.getString(13)%>
    +<% + } + con.close(); +%> +
    + + diff --git a/21/WebRoot/manage/Ucheck.jsp b/21/WebRoot/manage/Ucheck.jsp new file mode 100644 index 0000000..39bd8b6 --- /dev/null +++ b/21/WebRoot/manage/Ucheck.jsp @@ -0,0 +1,54 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> + + + +û + + +<% + Condb con=new Condb(); + String username=request.getParameter("username"); + String password=request.getParameter("password"); + String office=request.getParameter("office"); + String name=request.getParameter("name"); + String popedom=request.getParameter("popedom"); + String str="select * from tb_Person where Username='"+username+"'"; + ResultSet rs=con.executeQuery(str); + int temp=0; + if(rs.next()){ +%> + +<% + }else{ + String sql="insert into tb_Person(Username,Password,Office,Name,Popedom) values('"+username+"','"+password+"','"+office+"','"+name+"','"+popedom+"')"; + temp=con.executeUpdate(sql); + if(temp>0){ +%> + +<% + }if(temp==0){ +%> + +<% + }if(temp<0){ +%> + + +<% + } + } +%> + + diff --git a/21/WebRoot/manage/Uparticular.jsp b/21/WebRoot/manage/Uparticular.jsp new file mode 100644 index 0000000..c32842a --- /dev/null +++ b/21/WebRoot/manage/Uparticular.jsp @@ -0,0 +1,54 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> + + + +û굥 + + + + + + + + + + + + + + + + + + <% + int num=0; + Condb con=new Condb(); + String sql="select * from tb_Person"; + ResultSet rs=con.executeQuery(sql); + while(rs.next()){ + num++; + %> + + + + + + + + + + + <% + } + %> +
    + Ա굥 +
    ûְְʱɾǷ
    <%=num%><%String str=rs.getString(2);out.println(str);%><%=rs.getString(5)%><%=rs.getInt(6)%><%String zw=rs.getString(7);if(zw==null){out.println(" ");}else{out.println(zw);}%><%String zc=rs.getString(8);if(zc==null){out.println(" ");}else{out.println(zc);}%><%Date dt=rs.getDate(9);if(dt==null){out.println(" ");}else{out.println(dt);}%>ɾ
    + + diff --git a/21/WebRoot/manage/adduser.htm b/21/WebRoot/manage/adduser.htm new file mode 100644 index 0000000..af2ad81 --- /dev/null +++ b/21/WebRoot/manage/adduser.htm @@ -0,0 +1,89 @@ + + + +ԱϢ + + + + + +

     

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ûϢ +
     û:
     :
     ȷ:
     :
     ʵ:
     Ȩ޷:
    + +
    + + diff --git a/21/WebRoot/manage/delresult.jsp b/21/WebRoot/manage/delresult.jsp new file mode 100644 index 0000000..79dbe17 --- /dev/null +++ b/21/WebRoot/manage/delresult.jsp @@ -0,0 +1,27 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> + + + +ɹɾҳ + + + +<% + Condb con=new Condb(); + String str=request.getParameter("te"); + if(str!=null){ + String sql="delete from tb_Result where Resultname='"+str+"'"; + String te="delete from tb_Con where TaskRname='"+str+"'"; + con.executeUpdate(te); + int temp=con.executeUpdate(sql); + if(temp<1){ + out.println("ɾʧ"); + }else{ + response.sendRedirect("lackresult.jsp"); + } + } +%> + + diff --git a/21/WebRoot/manage/deltask.jsp b/21/WebRoot/manage/deltask.jsp new file mode 100644 index 0000000..6e61b73 --- /dev/null +++ b/21/WebRoot/manage/deltask.jsp @@ -0,0 +1,29 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<%@ page import="com.bwm.db.Condb"%> + + + +ɾҳ + + +<% + Condb con=new Condb(); + String str=new String(request.getParameter("te").getBytes("iso-8859-1"),"gb2312"); + if(str!=null){ + //String sql="delete from tb_Task where Taskname='"+str+"'"; + String te1="delete from tb_Task where Taskname='"+str+"'"; + String te="delete from tb_Con where Taskname='"+str+"'"; + int tem=con.executeUpdate(te); + out.println(te1); + //con.executeUpdate(sql); + //con.executeUpdate(te); + int temp=con.executeUpdate(te1); + if(temp==1){ + response.sendRedirect("lacktask.jsp"); + }else{ + out.print("ɾʧܣ"); + } + } +%> + + diff --git a/21/WebRoot/manage/deluser.jsp b/21/WebRoot/manage/deluser.jsp new file mode 100644 index 0000000..aa54372 --- /dev/null +++ b/21/WebRoot/manage/deluser.jsp @@ -0,0 +1,26 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> +<%@ page import="com.bwm.string.Str"%> + + + +ޱĵ + + +<% + Str str=new Str(); + Condb con=new Condb(); + String temp=str.toChinese(request.getParameter("temp")); + String tem="select * from tb_Person where Uername='"+temp+"'"; + String sql="delete from tb_Person where Username='"+temp+"'"; + int te=con.executeUpdate(sql); + if(te<0){ + out.println("ݿϵͳԱϵ"); + }else{ + response.sendRedirect("Uparticular.jsp"); + } + con.close(); +%> + + diff --git a/21/WebRoot/manage/lackresult.jsp b/21/WebRoot/manage/lackresult.jsp new file mode 100644 index 0000000..9c34ac2 --- /dev/null +++ b/21/WebRoot/manage/lackresult.jsp @@ -0,0 +1,49 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<%@ page import="com.bwm.db.Condb"%> + +δɹ + + + + + + + + + + + + + + + + <% + int num=0; + Condb con=new Condb(); + String sql="select * from tb_Result where Result='"+0+"'"; + ResultSet rs=null; + rs=con.executeQuery(sql); + while(rs.next()){ + num++; + %> + + + + + + + +<% + } + con.close(); +%> + +
    + δɹ +
    ɹʱǷɾ
    <%=num%><%String str=rs.getString(2);out.println(str);%> <%=rs.getDate(8)%><%=rs.getString(9)%>ɾ
    + + diff --git a/21/WebRoot/manage/lacktask.jsp b/21/WebRoot/manage/lacktask.jsp new file mode 100644 index 0000000..3d66d06 --- /dev/null +++ b/21/WebRoot/manage/lacktask.jsp @@ -0,0 +1,57 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<%@ page import="com.bwm.db.Condb"%> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.string.Str"%> + + + +δ + + + + + + + + + + + + + + + + + + <% + int num=0; + Condb con=new Condb(); + String sql="select * from tb_Task where Whether='"+0+"'"; + ResultSet rs=null; + rs=con.executeQuery(sql); + while(rs.next()){ + String temp=rs.getString(2); + num++; + %> + + + + + + + + +<% + } +con.close(); +%> + +
    + δ +
    ʱʱǷɾ
    <%=num%><%=temp%><%=rs.getDate(9)%><%=rs.getDate(10)%>ɾ
    + + diff --git a/21/WebRoot/manage/province.jsp b/21/WebRoot/manage/province.jsp new file mode 100644 index 0000000..9173aab --- /dev/null +++ b/21/WebRoot/manage/province.jsp @@ -0,0 +1,36 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<%@ page import="com.bwm.string.Str"%> +<%@ page import="com.bwm.db.Condb"%> + + + + + +<% + Condb con=new Condb(); + Str str=new Str(); + String province=request.getParameter("jl"); + String sql="select * from tb_Result where Province='"+str.toChinese(request.getParameter("jl"))+"' and Result='"+1+"'"; + String sq="select * from tb_Task where Province='"+str.toChinese(request.getParameter("jl"))+"' and Whether='"+1+"'"; + ResultSet rst=con.executeQuery(sq); + ResultSet rs=con.executeQuery(sql); + int num=0; + int temp=0; + while(rs.next()){ + num++; + + } + while(rst.next()){ + temp++; + } +%> +

     

    +

     

    +

     

    +

     

    +

     

    +
    <%=str.toChinese(province)%>Ŀгɹ<%=num%>
    +
    <%=str.toChinese(province)%>걨<%=temp%>

    +
    + + diff --git a/21/WebRoot/manage/putinresult.jsp b/21/WebRoot/manage/putinresult.jsp new file mode 100644 index 0000000..b5a62f3 --- /dev/null +++ b/21/WebRoot/manage/putinresult.jsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%> +<%@ page import="com.bwm.db.Condb"%> +<% request.setCharacterEncoding("gb2312"); %> + + + +ɹ + + + + + + + + + + + + + + + <% + Condb con=new Condb(); + int num=0; + String sql="select * from tb_Result where Result='"+1+"'"; + ResultSet rs=con.executeQuery(sql); + while(rs.next()){ + num++; + %> + + + + + + + <% + } + con.close(); + %> +
    + 已ɹ +
    ɹʱ
    <%=num%> + <%String str=rs.getString(2);out.println(str);%> + <%=rs.getDate(8)%><%=rs.getString(9)%>
    + + diff --git a/21/WebRoot/manage/putintask.jsp b/21/WebRoot/manage/putintask.jsp new file mode 100644 index 0000000..e74bc67 --- /dev/null +++ b/21/WebRoot/manage/putintask.jsp @@ -0,0 +1,48 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> + + + + + + + + + + + + + + + + + + + <% + Condb con=new Condb(); + int num=0; + String sql="select * from tb_Task where Whether='"+1+"'"; + ResultSet rs=con.executeQuery(sql); + while(rs.next()){ + num++; + %> + + + + + + + <% + } + con.close(); + %> +
    + +
    ʱʱ
    <%=num%><%String str=rs.getString(2);out.println(str);%><%=rs.getDate(9)%><%=rs.getDate(10)%>
    + + diff --git a/21/WebRoot/manage/resultedit.jsp b/21/WebRoot/manage/resultedit.jsp new file mode 100644 index 0000000..11a7b49 --- /dev/null +++ b/21/WebRoot/manage/resultedit.jsp @@ -0,0 +1,122 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.string.Str"%> +<%@ page import="com.bwm.db.Condb"%> + + + +δɹ굥 + + + + + +<% + Condb con=new Condb(); + Str str1=new Str(); + String temp=str1.toChinese(request.getParameter("temp")); + String sql="select * from tb_Result where Resultname='"+temp+"'"; + ResultSet rs=con.executeQuery(sql); + if(rs.next()){ +%> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + }else{ + %> + +
      + +
    + δɹ걨굥 + +
     ɹʽ:<%=rs.getString(1)%>
     ɹ:<%String str=rs.getString(2);out.println(str);%>
     о:<%=rs.getString(3)%>
     ɹ:<%=rs.getString(4)%>
     о:<%=rs.getString(5)%>
     ɹ:<%=rs.getString(6)%>
     ɹ:<%=rs.getString(7)%>
     ʱ:<%=rs.getDate(8)%>
     :<%=rs.getString(9)%>
     ժҪ:<%=rs.getString(10)%>
     ע:<%=rs.getString(11)%>
     Ƿ: + + onClick="check()"> + +/
    +<% +} +con.close(); +%> + + diff --git a/21/WebRoot/manage/taskedit.jsp b/21/WebRoot/manage/taskedit.jsp new file mode 100644 index 0000000..5db4dc5 --- /dev/null +++ b/21/WebRoot/manage/taskedit.jsp @@ -0,0 +1,124 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.string.Str"%> +<%@ page import="com.bwm.db.Condb"%> + + + + + + + + + +<% + Condb con=new Condb(); + Str str1=new Str(); + String temp=str1.toChinese(request.getParameter("temp")); + String sql="select * from tb_Task where Taskname='"+temp+"'"; + ResultSet rs=con.executeQuery(sql); + if(rs.next()){ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
     ׼:<%=rs.getString(1)%>
     :<%String str=rs.getString(2);out.println(str);%>
     о:<%=rs.getString(3)%>
     :<%=rs.getString(4)%>
     ɹʽ:<%=rs.getString(5)%>
     оʽ:<%=rs.getString(6)%>
     Դ:<%=rs.getString(7)%>
     ׼λ:<%=rs.getString(8)%>
     ʱ:<%=rs.getDate(9)%>
     ʱ:<%=rs.getDate(10)%>
     :<%=rs.getString(11)%>
     ժҪ:<%=rs.getString(12)%>
     ע:<%=rs.getString(13)%>
     Ƿ: + onClick="check()"> + +/
    + <% +} + con.close(); +%> + + diff --git a/21/WebRoot/mr.htm b/21/WebRoot/mr.htm new file mode 100644 index 0000000..5079e5c --- /dev/null +++ b/21/WebRoot/mr.htm @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + +


    + + +

           ,֪ͨҵ,տƼѧʶĺտƼԴһֱ׷ѰΪ,Ͻȡ,׷׿,һֱѵĿƼƷơͼ鴴վ裬ȡ˽˵ijɼ˾ȫԱԱ鲻Уϣλ϶ߴ߾Ĺؼָѡ  
     
     

    + +
    ҳ
    + + diff --git a/21/WebRoot/query/Rparticular.jsp b/21/WebRoot/query/Rparticular.jsp new file mode 100644 index 0000000..23344a4 --- /dev/null +++ b/21/WebRoot/query/Rparticular.jsp @@ -0,0 +1,85 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> +<%@ page import="com.bwm.string.Str"%> + + + +ɹ굥 + + + + +<% + Str str=new Str(); + Condb con=new Condb(); + String temp=str.toChinese(request.getParameter("temp")); + String sql=""; + sql="select * from tb_Result where Result='"+1+"'and Resultname='"+temp+"'"; + ResultSet rs=con.executeQuery(sql); + while(rs.next()){ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ɹ +
    ɹʽ:<%=rs.getString(1)%>
    ɹ:<%=rs.getString(2)%>
    о:<%=rs.getString(3)%>
    ɹ:<%=rs.getString(4)%>
    о:<%=rs.getString(5)%>
    ɹ:<%=rs.getString(6)%>
    ɹ:<%=rs.getString(7)%>
    ʱ:<%=rs.getDate(8)%>
    :<%=rs.getString(9)%>
    ժҪ:<%=rs.getString(10)%>
    ע:<%=rs.getString(11)%>
    +<% +} +con.close(); +%> + + diff --git a/21/WebRoot/query/Tparticular.jsp b/21/WebRoot/query/Tparticular.jsp new file mode 100644 index 0000000..d3e7006 --- /dev/null +++ b/21/WebRoot/query/Tparticular.jsp @@ -0,0 +1,90 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<%@ page import="com.bwm.db.Condb"%> +<%@ page import="com.bwm.string.Str"%> + + + + + + + + + <% + Str str=new Str(); + Condb con=new Condb(); + String st=str.toChinese(request.getParameter("temp")); + String sql="select * from tb_Task where Taskname='"+st+"'"; + ResultSet rs=con.executeQuery(sql); + while(rs.next()){ +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    ׼:<%=rs.getString(1)%>
    :<%=rs.getString(2)%>
    о:<%=rs.getString(3)%>
    :<%=rs.getString(4)%>
    ɹʽ:<%=rs.getString(5)%>
    оʽ:<%=rs.getString(6)%>
    Դ:<%=rs.getString(7)%>
    ׼λ:<%=rs.getString(8)%>
    ʱ:<%=rs.getDate(9)%>
    ʱ:<%=rs.getDate(10)%>
    :<%=rs.getString(11)%>
    ժҪ:<%=rs.getString(12)%>
    ע:<%=rs.getString(13)%>
    +<% + } + con.close(); +%> + + diff --git a/21/WebRoot/query/find.jsp b/21/WebRoot/query/find.jsp new file mode 100644 index 0000000..38386af --- /dev/null +++ b/21/WebRoot/query/find.jsp @@ -0,0 +1,103 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> + + + + + + + +<% + Condb con=new Condb(); + String keyID=request.getParameter("keyID"); + String query=request.getParameter("query"); + String txt1=request.getParameter("txt1"); + String txt2=request.getParameter("txt2"); + String kid=""; + String te=""; + String tem=""; + int num=0; + int temp=0; + if(!keyID.equals("")){ + kid="and keyid='"+keyID+"'"; + } + if(!txt1.equals("")){ + te="and Resultname='"+txt1+"'"; + } + if(!txt2.equals("")){ + tem="and Taskname='"+txt2+"'"; + } + if(query.equals("ɹѯ")){ +%> + + + + + + + + + + + <% + ResultSet rs=null; + String sql="select * from tb_Result where Result='"+1+"'"+te+kid; + rs=con.executeQuery(sql); + while(rs.next()){ + num++; +%> + + + + + + + + <% + } + %> +
    + ɹ +
    ɹʱ
    <%=num%> + <%String str=rs.getString(2);out.println(str);%> + <%=rs.getDate(8)%><%=rs.getString(9)%>
    + <% + } + else if(query.equals("ѯ")){ +%> + + + + + + + + + + +<% + String sq="select * from tb_Task where Whether='"+1+"'"+kid+tem; + ResultSet rst=con.executeQuery(sq); + while(rst.next()){ + num++; +%> + + + + + + + <% + } + } +%> +
    +
    ʱʱ
    <%=num%><%String str=rst.getString(2);out.println(str);%><%=rst.getDate(9)%><%=rst.getDate(10)%>
    +<% + con.close(); + + //String sql="select * from where namesql"; +%> + + diff --git a/21/WebRoot/query/found.jsp b/21/WebRoot/query/found.jsp new file mode 100644 index 0000000..c409a00 --- /dev/null +++ b/21/WebRoot/query/found.jsp @@ -0,0 +1,76 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<%request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> + + + +ޱĵ + + + +<% +Condb con=new Condb(); +String keyID=request.getParameter("keyID"); +String query=request.getParameter("query"); +if(query.equals("ɹѯ")){ +%> + + + + + + + + + + + <% + String sql="select * from tb_Result where keyid like '%"+keyID+"%'"; + ResultSet rs=con.executeQuery(sql); + int num=0; + while(rs.next()){ + num++; + %> + + + + + + +
    ɹ嵥
    ɹʱ
    <%=num%><%out.println(rs.getString(2));%><%=rs.getDate(8)%><%=rs.getString(9)%>
    + <% + } +} +if(query.equals("ѯ")){ +%> + + + + + + + + + + + <% + String sq="select * from tb_Task where keyid like '%"+keyID+"%'"; + ResultSet rss=con.executeQuery(sq); + int sum=0; + while(rss.next()){ + sum++; + %> + + + + + + + <% + } +} +con.close(); + %> +
    ʱ
    <%=sum%><%String str=rss.getString(2);out.println(str);%><%=rss.getDate(9)%><%=rss.getString(11)%>
    + + diff --git a/21/WebRoot/query/index.htm b/21/WebRoot/query/index.htm new file mode 100644 index 0000000..ec31b68 --- /dev/null +++ b/21/WebRoot/query/index.htm @@ -0,0 +1,26 @@ + + + +ѯҳ + + + + + + + + + + +<body> +</body> + + diff --git a/21/WebRoot/query/left.htm b/21/WebRoot/query/left.htm new file mode 100644 index 0000000..f500701 --- /dev/null +++ b/21/WebRoot/query/left.htm @@ -0,0 +1,57 @@ + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + +
    ѯؼ
    +
    ѯ
    + +
    + + diff --git a/21/WebRoot/query/right.htm b/21/WebRoot/query/right.htm new file mode 100644 index 0000000..849f623 --- /dev/null +++ b/21/WebRoot/query/right.htm @@ -0,0 +1,26 @@ + + + +ޱĵ + + +
    +

    + + + + + + +

    +
    + + diff --git a/21/WebRoot/query/top.htm b/21/WebRoot/query/top.htm new file mode 100644 index 0000000..edbbe90 --- /dev/null +++ b/21/WebRoot/query/top.htm @@ -0,0 +1,43 @@ + + + + +ޱĵ + + + + + + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + diff --git a/21/WebRoot/taskR/check.jsp b/21/WebRoot/taskR/check.jsp new file mode 100644 index 0000000..3e6026e --- /dev/null +++ b/21/WebRoot/taskR/check.jsp @@ -0,0 +1,66 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> +<%@ page import="com.bwm.string.Str"%> + + + +ޱĵ + + + +<% + Str sterr=new Str(); + Condb con=new Condb(); + String resultform=request.getParameter("resultform"); + String resultname=request.getParameter("resultname"); + String resultword=request.getParameter("resultword"); + String resultnum=request.getParameter("resultnum"); + String subject=request.getParameter("subject"); + String resultype=request.getParameter("resultype"); + String resultLan=request.getParameter("resultLan"); + String dattime=request.getParameter("dattime"); + String workname=request.getParameter("workname"); + String test=request.getParameter("text"); + String Demo=request.getParameter("Demo"); + String province=request.getParameter("province"); + String key=request.getParameter("key"); + String textID=request.getParameter("text"); + String booker=request.getParameter("booker"); + String publish=request.getParameter("publish"); + int temp=0; + int inttemp=0; + String sql="select Resultname from tb_Result where Resultname='"+resultname+"'"; + ResultSet rs=con.executeQuery(sql); + if(rs.next()){ + inttemp=0; + %> +
    +

    + <%out.print("˳ɹѾ㲻걨");%> + + +

    +
    + <% + }else{ + String str="insert into tb_Result(Resultform,Resultname,Resultword,Resultnum,Subject,Resultype,Resultlan,Dattime,Workname,Test,Demo,Result,Province,keyid,Text,Booker,Publish)values('"+resultform+"','"+resultname+"','"+resultword+"','"+resultnum+"','"+subject+"','"+resultype+"','"+resultLan+"','"+dattime+"','"+workname+"','"+test+"','"+Demo+"','"+0+"','"+province+"','"+key+"','"+textID+"','"+booker+"','"+publish+"')"; + temp=con.executeUpdate(str); + String strsql="insert into tb_Con(GroupId,TaskRname) values('"+session.getAttribute("groupid")+"','"+resultname+"')"; + con.executeUpdate(strsql); + }if(temp>0){ + %> +
    +

    + <%out.println("걨ɹ");%> + +

    +
    + <% + }if(temp<0){ + out.println("ϵͳԺ"); + } + con.close(); +%> + + diff --git a/21/WebRoot/taskR/member.jsp b/21/WebRoot/taskR/member.jsp new file mode 100644 index 0000000..0ad97fc --- /dev/null +++ b/21/WebRoot/taskR/member.jsp @@ -0,0 +1,51 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<%@ page import="com.bwm.db.Condb"%> +<% request.setCharacterEncoding("gb2312"); %> + + + + +Ա + + + +

     

    +<% + Condb con=new Condb(); + String result=request.getParameter("result"); + String mname=request.getParameter("mname"); + String munit=request.getParameter("munit"); + String moffice=request.getParameter("moffice"); + int inttem=0; + if(result!=null||result.equals("")||mname!=null||munit!=null||moffice!=null){ + String str="select Member from tb_Member where MemID='"+result+"'"; + ResultSet rs=con.executeQuery(str); + while(rs.next()){ + inttem=1; + %> +

     

    +

     

    +

     

    +
    <%out.println("˳ԱIDѾռ÷!");%>
    + <% + } + if(inttem==0){ + String sql="insert into tb_Member(MemID,Member,Munit,Moffice)values('"+result+"','"+mname+"','"+munit+"','"+moffice+"')"; + con.executeUpdate(sql); + String mem="insert into tb_Work(Username,MemID) values('"+session.getAttribute("name")+"','"+result+"')"; + con.executeUpdate(mem); + %> +

     

    +

     

    +

     

    +
    <%out.println("ӳɹ");%>
    +
    ³Ա
    +
    ϵͳ
    + <% + } + } + con.close(); +%> + + + diff --git a/21/WebRoot/taskR/memberadd.htm b/21/WebRoot/taskR/memberadd.htm new file mode 100644 index 0000000..bb29d98 --- /dev/null +++ b/21/WebRoot/taskR/memberadd.htm @@ -0,0 +1,49 @@ + + + + +Ա + + + + + + + + + + + + + +
    ӭгɹ걨 +
    + --------->>>>걨
    + + diff --git a/21/WebRoot/taskR/putin.jsp b/21/WebRoot/taskR/putin.jsp new file mode 100644 index 0000000..2d84ebe --- /dev/null +++ b/21/WebRoot/taskR/putin.jsp @@ -0,0 +1,33 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<%@ page import="com.bwm.db.Condb"%> +<% request.setCharacterEncoding("gb2312"); %> + + + +ޱĵ + + + +<% + Condb con=new Condb(); + String Username=request.getParameter("Username"); + String Password=request.getParameter("Password"); + String Office=request.getParameter("Office"); + String Name=request.getParameter("Name"); + String Age=request.getParameter("Age"); + String Business=request.getParameter("Business"); + String Post=request.getParameter("Post"); + String Dattime=request.getParameter("Datetime"); + String Bio=request.getParameter("Bio"); + String Strupd="update tb_Person set Username='"+Username+"',Password='"+Password+"',Office='"+Office+"',Name='"+Name+"',Age='"+Age+"',Business='"+Business+"',Post='"+Post+"',Datetime='"+Dattime+"',Bio='"+Bio+"' where Username='"+session.getAttribute("name")+"'"; + int temp=con.executeUpdate(Strupd); + if(temp==1){ +%> + +<% +} +%> + + diff --git a/21/WebRoot/taskR/resulsql.jsp b/21/WebRoot/taskR/resulsql.jsp new file mode 100644 index 0000000..6b60340 --- /dev/null +++ b/21/WebRoot/taskR/resulsql.jsp @@ -0,0 +1,64 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<%@ page import="com.bwm.db.Condb"%> +<% request.setCharacterEncoding("gb2312"); %> + + + +ѯ + + + + + + + + + + + + + + + + + + + + <% + Condb con=new Condb(); + String datetime=request.getParameter("datetime"); + String dattime=request.getParameter("dattime"); + String resultname=request.getParameter("resultname"); + String sql="select * from tb_Result where Dattime between '"+datetime+"' and '"+dattime+"' and Resultname like '%"+resultname+"%'"; + ResultSet rs=con.executeQuery(sql); + int num=0; + while(rs.next()){ + num++; +%> + + + + + + + + + + + <% +} +con.close(); +%> + + + + +
    + ѯɹ +
    ɹʽɹɹժҪǷ
    <%=num%><%=rs.getString(1)%> <%=rs.getString(2)%> <%=rs.getString(4)%> <%=rs.getDate(8)%> <%=rs.getString(10)%> <%String str=rs.getString(12);if(str.equals("0")) out.println("");if(str.equals("1")) out.println("");%>
    + + diff --git a/21/WebRoot/taskR/resultadd.htm b/21/WebRoot/taskR/resultadd.htm new file mode 100644 index 0000000..78b4eaf --- /dev/null +++ b/21/WebRoot/taskR/resultadd.htm @@ -0,0 +1,255 @@ + + + +ɹ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + гɹ申 +
     ɹʽ:
     ɹ:
     ؼ:
     :
     : + + +
     о:
     ɹ:ʡ
     о:ɹɹ 
     ʱ:
     :
     :  
     ժҪ:

    + +

    +
     ע:
    +
    + + diff --git a/21/WebRoot/taskR/rquery.htm b/21/WebRoot/taskR/rquery.htm new file mode 100644 index 0000000..cecc808 --- /dev/null +++ b/21/WebRoot/taskR/rquery.htm @@ -0,0 +1,87 @@ + + + +ޱĵ + + + + + + + + + + + + + + + + + +
    + ѯɹ +

    ѯ: + + + + ɹ: + + + +

    + + diff --git a/21/WebRoot/taskR/taskadd.htm b/21/WebRoot/taskR/taskadd.htm new file mode 100644 index 0000000..bd8fa16 --- /dev/null +++ b/21/WebRoot/taskR/taskadd.htm @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + 题申 +
    ѡ⣺ + + Ҽ + + ʡ + + + +
     :
     :
     о:
     ؼ:
     :ɹʽ:  
     оʽ:Դ:  
     ׼λ:
     ʱ:ʱ: +
     : ʡ: +
     ժҪ:
     ע:
    +
    + + diff --git a/21/WebRoot/taskR/tasksql.jsp b/21/WebRoot/taskR/tasksql.jsp new file mode 100644 index 0000000..e4ca86d --- /dev/null +++ b/21/WebRoot/taskR/tasksql.jsp @@ -0,0 +1,62 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.db.Condb"%> + + + +ѯ + + + + + + + + + + + + + + + + + + <% + Condb con=new Condb(); + String datetime=request.getParameter("datetime"); + String dattime=request.getParameter("dattime"); + String resultname=request.getParameter("resultname"); + String sql="select * from tb_Task where Taskname='"+resultname+"'"; + ResultSet rs=con.executeQuery(sql); + int num=0; + while(rs.next()){ + num++; +%> + + + + + + + + + + + + <% +} +con.close(); +%> + +
    + ʾIJѯ +
    ʽ׼λǷ
    <%=num%><%=rs.getString(1)%><%=rs.getString(2)%><%=rs.getString(4)%><%=rs.getString(8)%><%int str=rs.getInt(14);if(str==0) out.println("");if(str==1) out.println("");%>
    +
    +
    + + diff --git a/21/WebRoot/taskR/tcheck.jsp b/21/WebRoot/taskR/tcheck.jsp new file mode 100644 index 0000000..f17484a --- /dev/null +++ b/21/WebRoot/taskR/tcheck.jsp @@ -0,0 +1,67 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> +<%@ page import="com.bwm.db.Condb"%> +<% request.setCharacterEncoding("gb2312"); %> + + + + + + + +<% +Condb con=new Condb(); +String Choose=request.getParameter("Choose"); +String Taskname=request.getParameter("Taskname"); +String Taskword=request.getParameter("Taskword"); +String Tasktype=request.getParameter("Tasktype"); +String Result=request.getParameter("Result"); +String Study=request.getParameter("Study"); +String Outlay=request.getParameter("Outlay"); +String Taskpass=request.getParameter("Taskpass"); +String Ctime=request.getParameter("Ctime"); +String Fultime=request.getParameter("Fultime"); +String Workname=request.getParameter("Workname"); +String Test=request.getParameter("Test"); +String Demo=request.getParameter("Demo"); +String province=request.getParameter("Province"); +String Text=request.getParameter("text"); +String Keyid=request.getParameter("keyid"); +String sql="select Taskname from tb_Task where Taskname='"+Taskname+"'"; +ResultSet rs=con.executeQuery(sql); +int temp=0; +if(rs.next()){ + temp=0; +}else{ + String str="insert into tb_Task(Choose,Taskname,Taskword,Tasktype,Result,Study,Outlay,Taskpass,Ctime,Fultime,Workname,Test,Demo,Whether,Province,Text,Keyid)values('"+Choose+"','"+Taskname+"','"+Taskword+"','"+Tasktype+"','"+Result+"','"+Study+"','"+Outlay+"','"+Taskpass+"','"+Ctime+"','"+Fultime+"','"+Workname+"','"+Test+"','"+Demo+"','"+0+"','"+province+"','"+Text+"','"+Keyid+"')"; + temp=con.executeUpdate(str); + String strsql="insert into tb_Con(GroupId,TaskRname) values('"+session.getAttribute("groupid")+"','"+Taskname+"')"; + int temp1=con.executeUpdate(strsql); +} +if(temp>0){ +%> +

     

    +

     

    +

     

    +
    <%out.println("걨ɹ");%>
    +
    +<% +}if(temp==0){ +%> +

     

    +

     

    +

     

    +
    <%out.println("˿Ѿ걨");%>
    +
    +<% +}if(temp<0){ +%> +

     

    +

     

    +

     

    +
    <%out.println("ϵͳ");%>
    +
    +<% +} +%> + + diff --git a/21/WebRoot/taskR/tmcheck.jsp b/21/WebRoot/taskR/tmcheck.jsp new file mode 100644 index 0000000..3cdbe1e --- /dev/null +++ b/21/WebRoot/taskR/tmcheck.jsp @@ -0,0 +1,61 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<%@ page import="com.bwm.db.Condb"%> + + + +ޱĵ + + + +<% + Condb con=new Condb(); + String result=request.getParameter("result"); + String mname=request.getParameter("mname"); + String munit=request.getParameter("munit"); + String moffice=request.getParameter("moffice"); + int inttem=0; + if(result!=null||result.equals("")||mname!=null||munit!=null||moffice!=null){ + String str="select Member from tb_Member where MemID='"+result+"'"; + ResultSet rs=con.executeQuery(str); + while(rs.next()){ + inttem++; + } + if(inttem==1){ + %> +
    +

     

    +

     

    +

    + <%out.println("˳ԱIDѾռ÷!");%> +

    +
    + <% + } + else if(inttem==0){ + String sql="insert into tb_Member(MemID,Member,Munit,Moffice)values('"+result+"','"+mname+"','"+munit+"','"+moffice+"')"; + con.executeUpdate(sql); + + %> +
    +

     

    +

     

    +

    + <%out.println("ӳɹ");%> +

    +
    +
    +

     

    +

     

    +

    ³Ա

    +
    +
    +

    申ϵͳ

    +
    + <% + } + } + con.close(); +%> + + + diff --git a/21/WebRoot/taskR/tmember.htm b/21/WebRoot/taskR/tmember.htm new file mode 100644 index 0000000..48953e3 --- /dev/null +++ b/21/WebRoot/taskR/tmember.htm @@ -0,0 +1,26 @@ + + + + +ޱĵ + + + + +

     

    +

     

    + + + + + + + + + +
    + ӭп걨 +
    + + diff --git a/21/WebRoot/taskR/tquery.htm b/21/WebRoot/taskR/tquery.htm new file mode 100644 index 0000000..6d8cc33 --- /dev/null +++ b/21/WebRoot/taskR/tquery.htm @@ -0,0 +1,49 @@ + + + +ޱĵ + + + + + + + + + + + + + + + + + + + + + + +
    + ѯ +

    : + + + +

    +
    ʽժҪǷ
    + + diff --git a/21/WebRoot/taskR/uedit.jsp b/21/WebRoot/taskR/uedit.jsp new file mode 100644 index 0000000..2c6d4a4 --- /dev/null +++ b/21/WebRoot/taskR/uedit.jsp @@ -0,0 +1,169 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %> +<%@ page import="com.bwm.db.Condb"%> +<% request.setCharacterEncoding("gb2312"); %> + + + +޸ĸϢ + + + + + +<% + Condb con=new Condb(); + String sql="select * from tb_Person where Username='"+session.getAttribute("name")+"' and Password='"+session.getAttribute("password")+"'"; + ResultSet rs=con.executeQuery(sql); + while(rs.next()){ + String rs2=rs.getString(2); + String rs4=rs.getString(4); + String rs5=rs.getString(5); + String rs6=rs.getString(6); + String rs7=rs.getString(7); + String rs8=rs.getString(8); + String rs9=rs.getString(9); + if(rs6==null||rs7==null||rs8==null||rs9==null) + { + rs6="";rs7="";rs8="";rs9=""; + } +%> + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ޸ĸϢ +
     û:
     :
     ȷ:
     :
     ʵ:
     :
     ְ:
     ְ:
     ʱ:
     :
    +
    +<% +} + con.close(); +%> + + diff --git a/21/WebRoot/user/bottom.htm b/21/WebRoot/user/bottom.htm new file mode 100644 index 0000000..82b6808 --- /dev/null +++ b/21/WebRoot/user/bottom.htm @@ -0,0 +1,19 @@ + + + + +ޱĵ + + + +
    տƼι˾  ַ:www.mingrisoft.com
    + + diff --git a/21/WebRoot/user/check.jsp b/21/WebRoot/user/check.jsp new file mode 100644 index 0000000..30cb1f4 --- /dev/null +++ b/21/WebRoot/user/check.jsp @@ -0,0 +1,37 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<% request.setCharacterEncoding("gb2312"); %> +<%@ page import="com.bwm.page.Show"%> +<%@ page import="com.bwm.db.Condb"%> + + + +ޱĵ + + + +<% + Condb con=new Condb(); + //Connection conn=con.getConnection(); + Show show=new Show(); + String name=request.getParameter("name"); + String password=request.getParameter("password"); + String sql="select * from tb_Person where Username='"+name+"' and Password='"+password+"'"; + ResultSet rs=con.executeQuery(sql); + if(rs.next()){ + String strsql=rs.getString(1); + session.setAttribute("name",name); + session.setAttribute("password",password); + session.setAttribute("groupid",strsql); + response.sendRedirect("index.htm"); + }else{ + out.print(show.errorBox("û","Ϣ")); + out.close(); +} +//if(conn!=null){ +// conn.close(); +//} +con.close(); +%> + + + diff --git a/21/WebRoot/user/index.htm b/21/WebRoot/user/index.htm new file mode 100644 index 0000000..c09c09a --- /dev/null +++ b/21/WebRoot/user/index.htm @@ -0,0 +1,23 @@ + + + +ûҳ + + + + + + + + + + + +<body> +<table width="176" border="1"> + <tr> + <td>&nbsp;</td> + </tr> +</table> +</body> + diff --git a/21/WebRoot/user/left.htm b/21/WebRoot/user/left.htm new file mode 100644 index 0000000..dc574b1 --- /dev/null +++ b/21/WebRoot/user/left.htm @@ -0,0 +1,28 @@ + + + + +ޱĵ + + + + +
    + + + + + + + +
    + + diff --git a/21/WebRoot/user/login.htm b/21/WebRoot/user/login.htm new file mode 100644 index 0000000..27b9789 --- /dev/null +++ b/21/WebRoot/user/login.htm @@ -0,0 +1,60 @@ + + + + +걨Ա¼ + + + + + +

     

    +

     

    + + + + + + + + + + + + + + + + + +
    걨Ա¼
    û: + +
      : + +
    +
    + + diff --git a/21/WebRoot/user/top.htm b/21/WebRoot/user/top.htm new file mode 100644 index 0000000..f4b1509 --- /dev/null +++ b/21/WebRoot/user/top.htm @@ -0,0 +1,22 @@ + + + + +ޱĵ + + + + + + + + + diff --git a/21/WebRoot/user/useindex.jsp b/21/WebRoot/user/useindex.jsp new file mode 100644 index 0000000..3f863f8 --- /dev/null +++ b/21/WebRoot/user/useindex.jsp @@ -0,0 +1,75 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %> +<%@ page import="com.bwm.db.Condb"%> + + + +ɹͳҳ + + + +<% + Condb con=new Condb(); + String sql="select * from tb_Con where GroupID='"+session.getAttribute("groupid")+"'"; + ResultSet rs=con.executeQuery(sql); + int tem=0; + int temp=0; + int num=0; + int tnum=0; + int ttem=0; + int ttemp=0; + while(rs.next()){ + tnum++; + String result=rs.getString(2); + String strr="select * from tb_Result where Resultname='"+result+"'"; + String strt="select * from tb_Task where Taskname='"+result+"'"; + ResultSet rst=con.executeQuery(strt); + while(rst.next()){ + int wether1=rst.getInt("Whether"); + if(wether1==0){ + ttem++;//ͳƿδ + }else{ + ttemp++;//ͳƿ + } + } + ResultSet rss=con.executeQuery(strr); + while(rss.next()){ + num++;//ͳݿ󱨵гɹ + int wether=rss.getInt(12); + if(wether==0){ + tem++;//ͳݿ󱨵δɹ + }else{ + temp++;//ͳݿ󱨵ɹ + } + + } + } +con.close(); +%> +
         +
    + + + + + + + + + + + + + + + + + + + + + + + +
    걨˿<%=(tnum-num)%>
    걨˳ɹ<%=num%>
    <%=ttemp%>
    δ<%=ttem%>
    ɹ<%=temp%>
    δɹ<%=tem%>
     
    + + diff --git a/21/WebRoot/user/userindex.jsp b/21/WebRoot/user/userindex.jsp new file mode 100644 index 0000000..413589d --- /dev/null +++ b/21/WebRoot/user/userindex.jsp @@ -0,0 +1,11 @@ +<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> + + + +Աҳ + + + + + + diff --git a/21/database/db_Scenince_Data.MDF b/21/database/db_Scenince_Data.MDF new file mode 100644 index 0000000..573fe4c Binary files /dev/null and b/21/database/db_Scenince_Data.MDF differ diff --git a/21/database/db_Scenince_Log.LDF b/21/database/db_Scenince_Log.LDF new file mode 100644 index 0000000..f21ff9a Binary files /dev/null and b/21/database/db_Scenince_Log.LDF differ diff --git a/21/src/com/bwm/db/Condb.class b/21/src/com/bwm/db/Condb.class new file mode 100644 index 0000000..2a716ba Binary files /dev/null and b/21/src/com/bwm/db/Condb.class differ diff --git a/21/src/com/bwm/db/Condb.java b/21/src/com/bwm/db/Condb.java new file mode 100644 index 0000000..ca2476f --- /dev/null +++ b/21/src/com/bwm/db/Condb.java @@ -0,0 +1,47 @@ +package com.bwm.db; +import java.sql.*; +public class Condb{ + private static String driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"; + private static String url="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=db_Scenince;user=sa;password="; + private static Connection con=null;//Connection + private static ResultSet rs=null;//һ¼ + public Condb(){ + try{ + Class.forName(driverClass);//classforname + con = DriverManager.getConnection(url); + }catch(Exception e){ + System.err.println(e); + } + + }public ResultSet executeQuery(String sql){//ִɾȲ + try{ + Statement stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); + rs=stmt.executeQuery(sql); + }catch(SQLException er){ + System.err.println(er.getMessage()); + } + return rs; + }public int executeUpdate(String sql){//ݿĸ² + int result=0; + try{ + Statement stmt=con.createStatement(); + result=stmt.executeUpdate(sql); + }catch(SQLException ex){ + System.err.println(ex.getMessage()); + } + return result; + } + public void close(){ + try{ + if(con!=null) + con.close(); + }catch(Exception e){ + System.out.print(e); + }try{ + if(rs!=null) + rs.close(); + }catch(Exception e){ + System.out.println(e); + } + } +} diff --git a/21/src/com/bwm/page/Show.class b/21/src/com/bwm/page/Show.class new file mode 100644 index 0000000..2914b8a Binary files /dev/null and b/21/src/com/bwm/page/Show.class differ diff --git a/21/src/com/bwm/page/Show.java b/21/src/com/bwm/page/Show.java new file mode 100644 index 0000000..4c46cf9 --- /dev/null +++ b/21/src/com/bwm/page/Show.java @@ -0,0 +1,36 @@ +/* + * Created on 2004-12-1 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package com.bwm.page; + +/*************************************************** + *class explain: String deal with
    + *set up name: crazyadept
    + *set up time: 12/01/2004 +****************************************************/ +public class Show { + + /*************************************************** + *return : Html page
    + *parameter: message title and content
    + *set up name: crazyadept
    + *set up time: 11/29/2004
    + *change time: 11/30/2004 + ****************************************************/ + public String errorBox(String str1, String str2) + { + String str="

    "; + str=str+""; + str=str+"
    "; + str=str+"1"+str2+"
    "; + str=str+"
    "; + str=str+"A"; + str=str+"

    "+str1+"

    "; + str=str+""; + str=str+"
    "; + return str; + } +} diff --git a/21/src/com/bwm/string/Sql.java b/21/src/com/bwm/string/Sql.java new file mode 100644 index 0000000..963f4d6 --- /dev/null +++ b/21/src/com/bwm/string/Sql.java @@ -0,0 +1,60 @@ +/* + * Created on 2004-12-10 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package com.bwm.string; + +/** + *class explain: String deal with
    + *set up name: crazyadept
    + *set up time: 12/10/2004 + */ +public class Sql { + + /** + *return value: select DataBase be use SQL
    + *parameter : str
    + *set up name: crazyadept
    + *set up time: 08/26/2004
    + */ + public String doubleStr(String str){ + if(str.equals("")){ + str=" LIKE '%' "; + }else{ + str=(" LIKE '%"+str+"%' "); + } + return str; + } + + /** + *return value: select DataBase be use SQL,left have %
    + *parameter : str
    + *set up name: crazyadept
    + *set up time: 08/26/2004
    + */ + public String leftStr(String str){ + if(str.equals("")){ + str=" LIKE '%' "; + }else{ + str=(" LIKE '%"+str+"' "); + } + return str; + } + + /** + *return value: select DataBase be use SQL,right have %
    + *parameter : str
    + *set up name: crazyadept
    + *set up time: 08/26/2004
    + */ + public String rightStr(String str){ + if(str.equals("")){ + str=" LIKE '%' "; + }else{ + str=(" LIKE '"+str+"%' "); + } + return str; + } +} \ No newline at end of file diff --git a/21/src/com/bwm/string/Str.java b/21/src/com/bwm/string/Str.java new file mode 100644 index 0000000..c4fb580 --- /dev/null +++ b/21/src/com/bwm/string/Str.java @@ -0,0 +1,142 @@ +/* + * Created on 2004-9-18 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package com.bwm.string; + +import java.io.UnsupportedEncodingException; + +/** + *class explain:String deal with
    + *set up name: crazyadept
    + *set up time: 11/25/2004 + */ +public class Str { + + /** + *method explain:initialization Str
    + *set up name: crazyadept
    + *set up time: 11/25/2004
    + */ + public Str() { + } + + /** + *return : GB2312
    + *parameter: iso-8859-1
    + *set up name: crazyadept
    + *change time: 11/25/2004 + */ + public String toChinese(String str){ + if(str==null||str.length()<1){ + + str=""; + }else{ + try { + str=(new String(str.getBytes("iso-8859-1"),"GB2312")); + } catch (UnsupportedEncodingException e) { + System.err.print(e.getMessage()); + e.printStackTrace(); + return str; + } + } + return str; + } + + /** + *return : it's not have "'"
    + *parameter: it's have "'"
    + *set up name: crazyadept
    + *change time: 11/25/2004 + */ + public String dbEncode(String str){ + if(str==null){ + str=""; + }else{ + try{ + str=str.replace('\'',(char)1).trim(); + }catch(Exception e){ + System.err.print(e.getMessage()); + e.printStackTrace(); + return str; + } + } + return str; + } + + /** + *return : it's have " ' "
    + *parameter: it's not have " ' "
    + *set up name: crazyadept
    + *change time: 11/25/2004 + */ + public String dbDecode(String str){ + if(str==null){ + str=""; + }else{ + try{ + str=str.replace((char)1,'\'').trim(); + }catch(Exception e){ + System.err.print(e.getMessage()); + e.printStackTrace(); + return str; + } + } + return str; + } + + /*************************************************** + *return : it's have ">,<"
    + *parameter: it's have "<,>"
    + *set up name: crazyadept
    + *change time: 11/30/2004 + ****************************************************/ + public String htmlEncode(String str){ + str=this.replace(str,">",">"); + str=this.replace(str,"<","<"); + return str; + } + + /*************************************************** + *return : include str2
    + *parameter: include str1
    + *set up name: crazyadept
    + *change time: 11/30/2004 + ****************************************************/ + public String replace(String str,String str1,String str2){ + String str3=""; + if(str.indexOf(str1)==-1){ + return str; + }else{ + int i,j; + for(i=0;(j=str.indexOf(str1,i))!=-1;i=j+str1.length()){ + str3=str3+str.substring(i,j); + str3=str3+str2; + } + str3=str3+str.substring(i,str.length()); + return str3; + } + } + + /*************************************************** + *return : get data type
    + *parameter: data type
    + *set up name: crazyadept
    + *change time: 12/01/2004 + ****************************************************/ + public String getData(String str) + { + if(str.indexOf("int")!=-1||str.indexOf("bit")!=-1){ + str="getInt"; + }else if(str.indexOf("char")!=-1){ + str="getString"; + }else if(str.indexOf("date")!=-1){ + str="getDate"; + }else{ + str="getObject"; + } + return str; + } +} diff --git "a/21/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" "b/21/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" new file mode 100644 index 0000000..3eb29aa Binary files /dev/null and "b/21/\347\250\213\345\272\217\344\275\277\347\224\250\350\257\264\346\230\216.doc" differ diff --git a/README.md b/README.md index bd4bde4..3a5f0bd 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,25 @@ Java_Web_Examples ================= 《实战突击:Java Web项目整合开发》源码 + +01 - 都市供求信息网 +02 - 物流配货网 +03 - 编程爱好者博客地带 +04 - 明日知道 +05 - 天下陶网络商城 +06 - 网络在线考试 +07 - 物资管理系统 +08 - 企业办公自动化系统 +09 - 校园管理系统 +10 - 高校学生选课系统 +11 - MR网络购物中心 +12 - 图书馆管理系统 +13 - 讯友网络相册 +14 - 企业门户网站 +15 - 芝麻开门博客网 +16 - 进销存管理系统 +17 - 网上淘书吧 +18 - 新奥家电连锁网络系统 +19 - 大学生求职就业网 +20 - 华奥汽车销售集团网 +21 - 科研成果申报管理系统