Commit fd0087a8883d595f77e6fe081553631518f48ffa
1 parent
3f6c3003
添加英语语言
Showing
22 changed files
with
851 additions
and
76 deletions
.settings/org.eclipse.core.resources.prefs
| 1 | 1 | eclipse.preferences.version=1 |
| 2 | 2 | encoding//WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp=UTF-8 |
| 3 | 3 | encoding//WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp=UTF-8 |
| 4 | +encoding//WebRoot/WEB-INF/jsp/sunvote/teacher/en_set_question.jsp=UTF-8 | |
| 5 | +encoding//WebRoot/WEB-INF/jsp/sunvote/teacher/en_stduent_report.jsp=UTF-8 | |
| 4 | 6 | encoding//WebRoot/WEB-INF/jsp/sunvote/teacher/indexPage.jsp=UTF-8 |
| 5 | 7 | encoding//WebRoot/WEB-INF/jsp/sunvote/teacher/paper_view.jsp=UTF-8 |
| 6 | 8 | encoding//WebRoot/WEB-INF/jsp/sunvote/teacher/set_question.jsp=UTF-8 | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/sclass/sclass_list2.jsp
| ... | ... | @@ -37,9 +37,9 @@ |
| 37 | 37 | </div> |
| 38 | 38 | <div class="clearfix"></div> |
| 39 | 39 | </div> |
| 40 | - <div style="background:#fff;"> | |
| 40 | + <div style="background:#fff;" > | |
| 41 | 41 | |
| 42 | - <table class="table table-striped"> | |
| 42 | + <table class="table table-striped" style="margin: 0px 5%"> | |
| 43 | 43 | <col style="width: 10%" /> |
| 44 | 44 | <col style="width: 22%" /> |
| 45 | 45 | <col style="width: 22%" /> |
| ... | ... | @@ -62,7 +62,7 @@ |
| 62 | 62 | |
| 63 | 63 | </div> |
| 64 | 64 | <div class="table_box" style="padding:0px"> |
| 65 | - <table class="table table-striped"> | |
| 65 | + <table class="table table-striped" style="margin: 0px 5%"> | |
| 66 | 66 | <col style="width: 10%" /> |
| 67 | 67 | <col style="width: 22%" /> |
| 68 | 68 | <col style="width: 22%" /> |
| ... | ... | @@ -91,13 +91,13 @@ |
| 91 | 91 | </c:choose> |
| 92 | 92 | </tbody> |
| 93 | 93 | </table> |
| 94 | - <div class="footer" style="width:auto"> | |
| 94 | + <div class="footer" style="width:auto;margin: 0px 5%;"> | |
| 95 | 95 | <div class="creat"> |
| 96 | - <!-- <input type="button" onclick="add();" value="添加学生" /> --> | |
| 97 | - </div> | |
| 98 | - <div class="creat"> | |
| 99 | - <!-- <input type="button" onclick="upload();" value="批量导入" /> --> | |
| 96 | + <input type="button" onclick="add();" value="添加班级" /> | |
| 100 | 97 | </div> |
| 98 | + <div class="removeAll"> | |
| 99 | + <input type="button" onclick="delete();" value="删除" /> | |
| 100 | + </div> | |
| 101 | 101 | |
| 102 | 102 | <div class="page_box"> |
| 103 | 103 | <div class="pagination" |
| ... | ... | @@ -124,6 +124,16 @@ |
| 124 | 124 | window.top.loading.remove(); |
| 125 | 125 | $(".table_box").css("padding-top",$(".head_box").height()); |
| 126 | 126 | }); |
| 127 | + | |
| 128 | + $('#ids').on('click', function(){ | |
| 129 | + var th_checked = $("#ids").prop('checked');//checkbox inside "TH" table header | |
| 130 | + | |
| 131 | + $(".table_box .table").find('tbody > tr').each(function(){ | |
| 132 | + var row = this; | |
| 133 | + if(th_checked) $(row).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 134 | + else $(row).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 135 | + }); | |
| 136 | + }); | |
| 127 | 137 | </script> |
| 128 | 138 | |
| 129 | 139 | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/student/en_student_edit2.jsp
0 → 100644
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | |
| 2 | + pageEncoding="UTF-8"%> | |
| 3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
| 4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
| 5 | +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> | |
| 6 | +<% | |
| 7 | + String path = request.getContextPath(); | |
| 8 | + String basePath = request.getScheme() + "://" | |
| 9 | + + request.getServerName() + ":" + request.getServerPort() | |
| 10 | + + path + "/"; | |
| 11 | +%> | |
| 12 | +<!DOCTYPE html> | |
| 13 | +<html lang="en"> | |
| 14 | +<head> | |
| 15 | +<base href="<%=basePath%>"> | |
| 16 | +<!-- 日期框 --> | |
| 17 | +<link rel="stylesheet" href="../static/ace/css/datepicker.css" /> | |
| 18 | +<style type="text/css"> | |
| 19 | +li { | |
| 20 | + list-style: none; | |
| 21 | + margin-top: 10px; | |
| 22 | + clear: right; | |
| 23 | + clear: both; | |
| 24 | +} | |
| 25 | + | |
| 26 | +li p { | |
| 27 | + width: 5em; | |
| 28 | + text-align: right; | |
| 29 | + margin: 0; | |
| 30 | + margin-right: 0.5em; | |
| 31 | + float: left; | |
| 32 | + line-height: 30px; | |
| 33 | +} | |
| 34 | + | |
| 35 | +li .li_r { | |
| 36 | + margin-left: 6em; | |
| 37 | + margin-right: 1em; | |
| 38 | + clear: right; | |
| 39 | +} | |
| 40 | + | |
| 41 | +li .li_r select { | |
| 42 | + height: 30px; | |
| 43 | + line-height: 30px; | |
| 44 | + background: #f5f5f5; | |
| 45 | + border: 1px solid #ccc; | |
| 46 | + outline-style: none; | |
| 47 | + width: 100%; | |
| 48 | +} | |
| 49 | + | |
| 50 | +li input { | |
| 51 | + height: 30px; | |
| 52 | + line-height: 30px; | |
| 53 | + background: #f5f5f5; | |
| 54 | + border: 1px solid #ccc; | |
| 55 | + outline-style: none; | |
| 56 | + width: 100%; | |
| 57 | +} | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | +.btn { | |
| 62 | + width: 80%; | |
| 63 | + height: 40px; | |
| 64 | + margin: 0 auto; | |
| 65 | + background: #3bc2d6; | |
| 66 | + margin-top: 5%; | |
| 67 | +} | |
| 68 | + | |
| 69 | +.btn a { | |
| 70 | + display: block; | |
| 71 | + width: 100%; | |
| 72 | + height: 100%; | |
| 73 | + color: #fff; | |
| 74 | + text-decoration: none; | |
| 75 | + text-align: center; | |
| 76 | + line-height: 40px; | |
| 77 | + font-size: 20px; | |
| 78 | +} | |
| 79 | + | |
| 80 | +input[type="text"],select { | |
| 81 | + padding-left: 6px; | |
| 82 | +} | |
| 83 | +</style> | |
| 84 | + | |
| 85 | +</head> | |
| 86 | +<body> | |
| 87 | + <form action="student/${msg }.do" name="Form" id="Form" | |
| 88 | + method="post"> | |
| 89 | + <input type="hidden" name="ID" id="ID" value="${pd.ID}" /> <input | |
| 90 | + type="hidden" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}" /> | |
| 91 | + <input type="hidden" name="TERM_ID" id="TERM_ID" value="${pd.TERM_ID}" /> | |
| 92 | + <div id="zhongxin"> | |
| 93 | + <li> | |
| 94 | + <p><span style="color:#f00">*</span>Name:</p> | |
| 95 | + <div class="li_r"> | |
| 96 | + <input type="text" name="NAME" id="NAME" value="${pd.NAME}" | |
| 97 | + maxlength="255" placeholder="please input student name" title="Name" /> | |
| 98 | + </div> | |
| 99 | + </li> | |
| 100 | + <li> | |
| 101 | + <p><span style="color:#f00">*</span>No.:</p> | |
| 102 | + <div class="li_r"> | |
| 103 | + <input type="text" name="NUMBER" id="NUMBER" value="${pd.NUMBER}" | |
| 104 | + maxlength="255" placeholder="please input the No." title="No." /> | |
| 105 | + </div> | |
| 106 | + </li> | |
| 107 | + <li> | |
| 108 | + <p><span style="color:#f00">*</span>Keypad ID:</p> | |
| 109 | + <div class="li_r"> | |
| 110 | + <input type="text" name="KEYPAD_ID" id="KEYPAD_ID" | |
| 111 | + value="${pd.KEYPAD_ID}" placeholder="please input the keypad id" | |
| 112 | + title="Keypad Id" /> | |
| 113 | + </div> | |
| 114 | + </li> | |
| 115 | + | |
| 116 | + <li> | |
| 117 | + <p>Sex:</p> | |
| 118 | + <div class="li_r"> | |
| 119 | + <select class="chosen-select form-control" name="SEX" id="SEX" | |
| 120 | + data-placeholder="please choose the sex"> | |
| 121 | + <option value="1" <c:if test="${pd.SEX==1}">selected="true"</c:if>>Man</option> | |
| 122 | + <option value="0" <c:if test="${pd.SEX==0}">selected="true"</c:if>>Woman</option> | |
| 123 | + </select> | |
| 124 | + </div> | |
| 125 | + </li> | |
| 126 | + | |
| 127 | + | |
| 128 | + <div class="btn"> | |
| 129 | + <a onclick="save();">Save</a> | |
| 130 | + </div> | |
| 131 | + </div> | |
| 132 | + <div id="zhongxin2" class="center" style="display:none"> | |
| 133 | + | |
| 134 | + <img src="static/images/jiazai.gif" /><br /> | |
| 135 | + <h4 class="lighter block green">Submit...</h4> | |
| 136 | + </div> | |
| 137 | + </form> | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + <!-- 页面底部js¨ --> | |
| 142 | + <%@ include file="../../system/index/foot2.jsp"%> | |
| 143 | + <!-- 下拉框 --> | |
| 144 | + <script src="../static/ace/js/chosen.jquery.js"></script> | |
| 145 | + <!-- 日期框 --> | |
| 146 | + <script src="../static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 147 | + <!--提示框--> | |
| 148 | + <script type="text/javascript" src="../static/js/jquery.tips.js"></script> | |
| 149 | + <script type="text/javascript"> | |
| 150 | + //保存 | |
| 151 | + function save() { | |
| 152 | + if ($("#NAME").val() == "") { | |
| 153 | + $("#NAME").tips({ | |
| 154 | + side : 3, | |
| 155 | + msg : 'Please input the student name', | |
| 156 | + bg : '#AE81FF', | |
| 157 | + time : 2 | |
| 158 | + }); | |
| 159 | + $("#NAME").focus(); | |
| 160 | + return false; | |
| 161 | + } | |
| 162 | + | |
| 163 | + if ($("#NUMBER").val() == "") { | |
| 164 | + $("#NUMBER").tips({ | |
| 165 | + side : 3, | |
| 166 | + msg : 'Please input the student number.', | |
| 167 | + bg : '#AE81FF', | |
| 168 | + time : 2 | |
| 169 | + }); | |
| 170 | + $("#NUMBER").focus(); | |
| 171 | + return false; | |
| 172 | + } | |
| 173 | + | |
| 174 | + if ($("#KEYPAD_ID").val() == "") { | |
| 175 | + $("#KEYPAD_ID").tips({ | |
| 176 | + side : 3, | |
| 177 | + msg : 'Please input the keypad id', | |
| 178 | + bg : '#AE81FF', | |
| 179 | + time : 2 | |
| 180 | + }); | |
| 181 | + $("#KEYPAD_ID").focus(); | |
| 182 | + return false; | |
| 183 | + } | |
| 184 | + | |
| 185 | + $("#Form").submit(); | |
| 186 | + $("#zhongxin").hide(); | |
| 187 | + $("#zhongxin2").show(); | |
| 188 | + } | |
| 189 | + | |
| 190 | + $(function() { | |
| 191 | + //日期框 | |
| 192 | + | |
| 193 | + }); | |
| 194 | + </script> | |
| 195 | +</body> | |
| 196 | +</html> | |
| 0 | 197 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/student/en_student_list2.jsp
0 → 100644
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | |
| 2 | + pageEncoding="UTF-8"%> | |
| 3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
| 4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
| 5 | +<% | |
| 6 | + String path = request.getContextPath(); | |
| 7 | + String basePath = request.getScheme() + "://" | |
| 8 | + + request.getServerName() + ":" + request.getServerPort() + path + "/"; | |
| 9 | +%> | |
| 10 | +<html lang="zh-CN"> | |
| 11 | +<head> | |
| 12 | +<meta charset="utf-8"> | |
| 13 | +<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| 14 | +<meta name="viewport" content="width=device-width, initial-scale=1"> | |
| 15 | +<title>SunVote-Education Management System</title> | |
| 16 | + | |
| 17 | +<!-- Bootstrap --> | |
| 18 | +<link | |
| 19 | + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" | |
| 20 | + rel="stylesheet"> | |
| 21 | +<link href="../static/css/teach.css" rel="stylesheet"> | |
| 22 | + | |
| 23 | +<!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 --> | |
| 24 | +<!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 --> | |
| 25 | +<!--[if lt IE 9]> | |
| 26 | + <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> | |
| 27 | + <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> | |
| 28 | + <![endif]--> | |
| 29 | +</head> | |
| 30 | +<body> | |
| 31 | + | |
| 32 | +<form action="../student/listcs.do" method="post" name="Form" id="Form"> | |
| 33 | + <input type="hidden" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}"/> | |
| 34 | + <input type="hidden" name="TERM_ID" id="TERM_ID" value="${pd.TERM_ID}"/> | |
| 35 | + <div class="head_box"> | |
| 36 | + <div class="box_header"> | |
| 37 | + <div class="head_box_l"> | |
| 38 | + <p> | |
| 39 | + <span class="right_b"></span>Student Management | |
| 40 | + </p> | |
| 41 | + </div><div class="clearfix"></div> | |
| 42 | + </div> | |
| 43 | + <div style="padding:0 5%;background:#fff;"> | |
| 44 | + <table class="table table-striped"> | |
| 45 | + <col style="width: 10%" /> | |
| 46 | + <col style="width: 22%" /> | |
| 47 | + <col style="width: 22%" /> | |
| 48 | + <col style="width: 23%" /> | |
| 49 | + <col style="width: 23%" /> | |
| 50 | + <thead> | |
| 51 | + <tr> | |
| 52 | + <th><input type="checkbox" value="0" name='ids' id="ids" />Serial No.</th> | |
| 53 | + <th>Name</th> | |
| 54 | + <th>Student ID</th> | |
| 55 | + <th>Keypad ID</th> | |
| 56 | + <th>Operation</th> | |
| 57 | + </tr> | |
| 58 | + </thead> | |
| 59 | + </table></div> | |
| 60 | + | |
| 61 | + <div class="clearfix"></div> | |
| 62 | + </div> | |
| 63 | + <div class="table_box"> | |
| 64 | + <table class="table table-striped"> | |
| 65 | + <col style="width: 10%" /> | |
| 66 | + <col style="width: 22%" /> | |
| 67 | + <col style="width: 22%" /> | |
| 68 | + <col style="width: 23%" /> | |
| 69 | + <col style="width: 23%" /> | |
| 70 | + <tbody> | |
| 71 | + <c:choose> | |
| 72 | + <c:when test="${not empty varList}"> | |
| 73 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 74 | + <tr> | |
| 75 | + <td><input type="checkbox" name='ids' id="ids" value="${var.ID}" />${vs.index+1}</td> | |
| 76 | + <td class='center'>${var.NAME}</td> | |
| 77 | + <td>${var.NUMBER}</td> | |
| 78 | + <td>${var.KEYPAD_ID}</td> | |
| 79 | + <td><a href="#" onclick="edit('${var.ID}');" style="margin-right:10px;"><img src="../static/images/eidtor.png" /></a><a href="#" onclick="del('${var.ID}');"><img src="../static/images/remove.png" /></a></td> | |
| 80 | + </tr> | |
| 81 | + | |
| 82 | + </c:forEach> | |
| 83 | + </c:when> | |
| 84 | + <c:otherwise> | |
| 85 | + <tr class="main_info"> | |
| 86 | + <td colspan="100" class="center" >No Data</td> | |
| 87 | + </tr> | |
| 88 | + </c:otherwise> | |
| 89 | + </c:choose> | |
| 90 | + </tbody> | |
| 91 | + </table> | |
| 92 | + | |
| 93 | + | |
| 94 | + <div class="footer"> | |
| 95 | + <div class="creat"> | |
| 96 | + <input type="button" onclick="add();" value="Add Student" /> | |
| 97 | + </div> | |
| 98 | + <div class="creat"> | |
| 99 | + <input type="button" onclick="upload();" value="Batch Import" /> | |
| 100 | + </div> | |
| 101 | + <div class="removeAll" > | |
| 102 | + <input type="button" onclick="deleteAll();" value="Batch Delete" /> | |
| 103 | + </div> | |
| 104 | + <div class="page_box"> | |
| 105 | + <div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div> | |
| 106 | + </div> | |
| 107 | + </div> | |
| 108 | + </div> | |
| 109 | + </form> | |
| 110 | +</body> | |
| 111 | + | |
| 112 | +<%@ include file="../../system/index/foot2.jsp"%> | |
| 113 | +<script type="text/javascript"> | |
| 114 | + $(document).ready(function(){ | |
| 115 | + window.top.loading.remove(); | |
| 116 | + }); | |
| 117 | + function tosearch(){ | |
| 118 | + $("#Form").submit(); | |
| 119 | + } | |
| 120 | + | |
| 121 | + $('#ids').on('click', function(){ | |
| 122 | + var th_checked = $("#ids").prop('checked');//checkbox inside "TH" table header | |
| 123 | + | |
| 124 | + $(".table_box .table").find('tbody > tr').each(function(){ | |
| 125 | + var row = this; | |
| 126 | + if(th_checked) $(row).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 127 | + else $(row).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 128 | + }); | |
| 129 | + }); | |
| 130 | + | |
| 131 | + function del(Id){ | |
| 132 | + window.top.remove.init({"title":"Delete","func":function(success){ | |
| 133 | + if(success){ | |
| 134 | + var url = "<%=basePath%>student/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 135 | + window.top.loading.show(); | |
| 136 | + $.get(url,function(data){ | |
| 137 | + tosearch(); | |
| 138 | + }); | |
| 139 | + } | |
| 140 | + else{ | |
| 141 | + console.log("false"); | |
| 142 | + } | |
| 143 | + }}); | |
| 144 | + window.top.remove.show(); | |
| 145 | + } | |
| 146 | + | |
| 147 | + function add(){ | |
| 148 | + window.top.modal.init({ | |
| 149 | + 'title':'Add Student', | |
| 150 | + 'url':'<%=basePath%>student/goAdd2.do?class_id=${pd.CLASS_ID}&term_id=${pd.TERM_ID}', | |
| 151 | + func:function() { | |
| 152 | + tosearch(); | |
| 153 | + } | |
| 154 | + }); | |
| 155 | + window.top.modal.show(); | |
| 156 | + } | |
| 157 | + | |
| 158 | + function edit(Id){ | |
| 159 | + window.top.modal.init({ | |
| 160 | + 'title':'添加学生', | |
| 161 | + 'url':'<%=basePath%>student/goEdit2.do?ID='+Id, | |
| 162 | + func:function() { | |
| 163 | + tosearch(); | |
| 164 | + } | |
| 165 | + }); | |
| 166 | + window.top.modal.show(); | |
| 167 | + } | |
| 168 | + | |
| 169 | + function deleteAll(){ | |
| 170 | + window.top.remove.init({"title":"Delete","func":function(success){ | |
| 171 | + if(success){ | |
| 172 | + var str = ''; | |
| 173 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 174 | + if(document.getElementsByName('ids')[i].checked){ | |
| 175 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 176 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 177 | + } | |
| 178 | + } | |
| 179 | + if(str==''){ | |
| 180 | + | |
| 181 | + }else{ | |
| 182 | + $.ajax({ | |
| 183 | + type: "POST", | |
| 184 | + url: '<%=basePath%>student/deleteAll.do?tm='+new Date().getTime(), | |
| 185 | + data: {DATA_IDS:str}, | |
| 186 | + dataType:'json', | |
| 187 | + //beforeSend: validateData, | |
| 188 | + cache: false, | |
| 189 | + success: function(data){ | |
| 190 | + tosearch(); | |
| 191 | + } | |
| 192 | + }); | |
| 193 | + } | |
| 194 | + } | |
| 195 | + else{ | |
| 196 | + console.log("false"); | |
| 197 | + } | |
| 198 | + }}); | |
| 199 | + window.top.remove.show(); | |
| 200 | + } | |
| 201 | + | |
| 202 | + function upload(){ | |
| 203 | + window.top.modal.init({ | |
| 204 | + 'title':'Import excel student name list', | |
| 205 | + 'url':'<%=basePath%>student/goUploadExcel.do?class_id=${pd.CLASS_ID}&term_id=${pd.TERM_ID}', | |
| 206 | + func:function() { | |
| 207 | + tosearch(); | |
| 208 | + } | |
| 209 | + }); | |
| 210 | + window.top.modal.show(); | |
| 211 | + } | |
| 212 | + | |
| 213 | +</script> | |
| 214 | +</html> | |
| 0 | 215 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/student/en_uploadexcel.jsp
0 → 100644
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | |
| 2 | + pageEncoding="UTF-8"%> | |
| 3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
| 4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
| 5 | +<% | |
| 6 | + String path = request.getContextPath(); | |
| 7 | + String basePath = request.getScheme() + "://" | |
| 8 | + + request.getServerName() + ":" + request.getServerPort() | |
| 9 | + + path + "/"; | |
| 10 | +%> | |
| 11 | +<!DOCTYPE html> | |
| 12 | +<html lang="en"> | |
| 13 | +<head> | |
| 14 | +<base href="<%=basePath%>"> | |
| 15 | + | |
| 16 | +<!-- jsp文件头和头部 --> | |
| 17 | +<%@ include file="../../system/index/top.jsp"%> | |
| 18 | + | |
| 19 | + | |
| 20 | +<style> | |
| 21 | + | |
| 22 | +.ace-file-input .ace-file-container{ | |
| 23 | +display: block; | |
| 24 | + position: absolute; | |
| 25 | + top: 0; | |
| 26 | + left: 0; | |
| 27 | + right: 0; | |
| 28 | + height: 40px; | |
| 29 | + background-color: #ffffff; | |
| 30 | + border: 1px solid #d5d5d5; | |
| 31 | + cursor: pointer; | |
| 32 | + -webkit-box-shadow: none; | |
| 33 | + box-shadow: none; | |
| 34 | + -webkit-transition: all 0.15s; | |
| 35 | + -o-transition: all 0.15s; | |
| 36 | + transition: all 0.15s; | |
| 37 | +} | |
| 38 | +.ace-file-input .ace-file-container:before{ | |
| 39 | + display: inline-block; | |
| 40 | + content: attr(data-title); | |
| 41 | + position: absolute; | |
| 42 | + right: 0; | |
| 43 | + top: 0; | |
| 44 | + bottom: 0; | |
| 45 | + line-height: 34px; | |
| 46 | + text-align: center; | |
| 47 | + padding: 0 8px; | |
| 48 | + background-color: #3bc2d6; | |
| 49 | + color: #FFF; | |
| 50 | + font-size: 11px; | |
| 51 | + font-weight: bold; | |
| 52 | + border: 2px solid #FFF; | |
| 53 | + border-left-width: 4px; | |
| 54 | + -webkit-transition: all 0.3s; | |
| 55 | + -o-transition: all 0.3s; | |
| 56 | + transition: all 0.3s; | |
| 57 | +} | |
| 58 | +.ace-file-input .ace-file-container .ace-file-name { | |
| 59 | + display: inline-block; | |
| 60 | + height: 38px; | |
| 61 | + max-width: 80%; | |
| 62 | + white-space: nowrap; | |
| 63 | + overflow: hidden; | |
| 64 | + line-height: 38px; | |
| 65 | + color: #888888; | |
| 66 | + font-size: 13px; | |
| 67 | + vertical-align: top; | |
| 68 | + position: static; | |
| 69 | + padding-left: 36px; | |
| 70 | + } | |
| 71 | + | |
| 72 | + .ace-file-input .ace-file-container .ace-icon { | |
| 73 | + display: inline-block; | |
| 74 | + position: absolute; | |
| 75 | + left: 0; | |
| 76 | + top: 0; | |
| 77 | + bottom: 0; | |
| 78 | + line-height: 34px; | |
| 79 | + width: 36px; | |
| 80 | + text-align: center; | |
| 81 | + font-family: FontAwesome; | |
| 82 | + font-size: 13px; | |
| 83 | + border: 2px solid #FFF; | |
| 84 | + color: #FFF; | |
| 85 | + -webkit-transition: all 0.1s; | |
| 86 | + -o-transition: all 0.1s; | |
| 87 | + transition: all 0.1s; | |
| 88 | + background-color: #3bc2d6; | |
| 89 | + } | |
| 90 | + | |
| 91 | + .ace-file-input .ace-file-container .ace-file-name:after { | |
| 92 | + display: inline-block; | |
| 93 | + content: attr(data-title); | |
| 94 | +} | |
| 95 | + | |
| 96 | + | |
| 97 | +</style> | |
| 98 | + | |
| 99 | +</head> | |
| 100 | +<body class="no-skin"> | |
| 101 | + | |
| 102 | + <!-- /section:basics/navbar.layout --> | |
| 103 | + <div class="main-container" id="main-container"> | |
| 104 | + <!-- /section:basics/sidebar --> | |
| 105 | + <div class="main-content"> | |
| 106 | + <div class="main-content-inner"> | |
| 107 | + <div class="page-content"> | |
| 108 | + <div class="row"> | |
| 109 | + <div class="col-xs-12"> | |
| 110 | + <form action="student/readExcel.do?CLASS_ID=${pd.CLASS_ID}&TERM_ID=${pd.TERM_ID}" name="Form" id="Form" method="post" enctype="multipart/form-data"> | |
| 111 | + <div id="zhongxin"> | |
| 112 | + <input type="hidden" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}"/> | |
| 113 | + <input type="hidden" name="TERM_ID" id="TERM_ID" value="${pd.TERM_ID}"/> | |
| 114 | + <table style="width:95%;" > | |
| 115 | + <tr> | |
| 116 | + <td style="padding-top: 20px;"><input type="file" id="excel" name="excel" style="width:50px;" onchange="fileType(this)" /></td> | |
| 117 | + </tr> | |
| 118 | + <tr> | |
| 119 | + <td style="text-align: center;padding-top: 10px;"> | |
| 120 | + <a class="btn btn-mini btn-primary" style="background-color:#3bc2d6 !important;border-color:#3bc2d6 !important;width:200px; height:50px;line-height:50px;font-size:18px;margin-top:5%;padding:0" onclick="save();">Import</a> | |
| 121 | + <a class="btn btn-mini btn-primary" style="background-color:#87b87f !important;border-color:#87b87f !important;width:200px; height:50px;line-height:50px;font-size:18px;margin-top:5%;padding:0" href="static/files/Template.xls" target="_blank" >Download template</a> | |
| 122 | + </td> | |
| 123 | + </tr> | |
| 124 | + </table> | |
| 125 | + </div> | |
| 126 | + <div id="zhongxin2" class="center" style="display:none"><br/><img src="static/images/jzx.gif" /><br/><h4 class="lighter block green"></h4></div> | |
| 127 | + </form> | |
| 128 | + </div> | |
| 129 | + <!-- /.col --> | |
| 130 | + </div> | |
| 131 | + <!-- /.row --> | |
| 132 | + </div> | |
| 133 | + <!-- /.page-content --> | |
| 134 | + </div> | |
| 135 | + </div> | |
| 136 | + <!-- /.main-content --> | |
| 137 | + </div> | |
| 138 | + <!-- /.main-container --> | |
| 139 | + | |
| 140 | + <!-- basic scripts --> | |
| 141 | + <!-- 页面底部js¨ --> | |
| 142 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 143 | + <!-- ace scripts --> | |
| 144 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 145 | + <!-- 上传控件 --> | |
| 146 | + <script src="static/ace/js/ace/elements.fileinput.js"></script> | |
| 147 | + <!--提示框--> | |
| 148 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 149 | + <script type="text/javascript"> | |
| 150 | + $(function() { | |
| 151 | + //上传 | |
| 152 | + $('#excel').ace_file_input({ | |
| 153 | + no_file:'Please select a file in xls format', | |
| 154 | + btn_choose:'Select', | |
| 155 | + btn_change:'Modify', | |
| 156 | + droppable:false, | |
| 157 | + onchange:null, | |
| 158 | + thumbnail:false, //| true | large | |
| 159 | + whitelist:'xls|xls', | |
| 160 | + blacklist:'gif|png|jpg|jpeg' | |
| 161 | + //onchange:'' | |
| 162 | + }); | |
| 163 | + }); | |
| 164 | + | |
| 165 | + //保存 | |
| 166 | + function save(){ | |
| 167 | + if($("#excel").val()=="" || document.getElementById("excel").files[0] =='Please select a file in xls format'){ | |
| 168 | + | |
| 169 | + $("#excel").tips({ | |
| 170 | + side:3, | |
| 171 | + msg:'Please select file', | |
| 172 | + bg:'#AE81FF', | |
| 173 | + time:3 | |
| 174 | + }); | |
| 175 | + return false; | |
| 176 | + } | |
| 177 | + $("#Form").submit(); | |
| 178 | + $("#zhongxin").hide(); | |
| 179 | + $("#zhongxin2").show(); | |
| 180 | + } | |
| 181 | + function fileType(obj){ | |
| 182 | + var fileType=obj.value.substr(obj.value.lastIndexOf(".")).toLowerCase();//获得文件后缀名 | |
| 183 | + if(fileType != '.xls'){ | |
| 184 | + $("#excel").tips({ | |
| 185 | + side:3, | |
| 186 | + msg:'Please select a file in xls format', | |
| 187 | + bg:'#AE81FF', | |
| 188 | + time:3 | |
| 189 | + }); | |
| 190 | + $("#excel").val(''); | |
| 191 | + document.getElementById("excel").files[0] = 'Please select a file in xls format'; | |
| 192 | + } | |
| 193 | + } | |
| 194 | + </script> | |
| 195 | + | |
| 196 | + | |
| 197 | +</body> | |
| 198 | +</html> | |
| 0 | 199 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teach_paper.jsp
| ... | ... | @@ -119,7 +119,12 @@ |
| 119 | 119 | </div><!-- /.modal-dialog --> |
| 120 | 120 | </div><!-- /.modal --> |
| 121 | 121 | <script type="text/javascript"> |
| 122 | - var url = "<%=basePath%>" | |
| 122 | + var url = "<%=basePath%>" ; | |
| 123 | + $('.date-picker').datepicker({ | |
| 124 | + autoclose: true, | |
| 125 | + todayHighlight: true, | |
| 126 | + }); | |
| 127 | + var view = "查看" ; | |
| 123 | 128 | </script> |
| 124 | 129 | |
| 125 | 130 | <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_list.jsp
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | <c:if test="${QX.cha == 1 }"> |
| 47 | 47 | <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> |
| 48 | 48 | </c:if> |
| 49 | - <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
| 49 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="c"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
| 50 | 50 | </tr> |
| 51 | 51 | </table> |
| 52 | 52 | <!-- 检索 --> | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp
| ... | ... | @@ -148,7 +148,7 @@ |
| 148 | 148 | <div class="form-group"> |
| 149 | 149 | <label for="enter_time" class="col-sm-4 control-label">模板</label> |
| 150 | 150 | <div class="col-sm-6"> |
| 151 | - <select class="chosen-select form-control" name="TEMPLATE_ID" id="TEMPLATE_ID" data-placeholder="这里输入所属学校"> | |
| 151 | + <select class="chosen-select form-control" name="TEMPLATE_ID" id="TEMPLATE_ID" data-placeholder=""> | |
| 152 | 152 | <option value="">自定义</option> |
| 153 | 153 | <c:forEach items="${templateInfos}" var="var" varStatus="vs"> |
| 154 | 154 | <option value="${var.PAGETEMPLATE_ID}">${var.NAME}</option> | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp
| ... | ... | @@ -277,7 +277,7 @@ |
| 277 | 277 | $(document).ready(function(){ |
| 278 | 278 | window.top.loading.remove(); |
| 279 | 279 | |
| 280 | - /* var sour = "${testpaperList}"; | |
| 280 | + var sour = "${testpaperList}"; | |
| 281 | 281 | |
| 282 | 282 | if(sour != null && sour.length > 3){ |
| 283 | 283 | var _width = $('#mainFrame', parent.document).width()-40; |
| ... | ... | @@ -295,7 +295,7 @@ |
| 295 | 295 | console.log(name_height); |
| 296 | 296 | $(".th_name").height(name_height); |
| 297 | 297 | } |
| 298 | - */ | |
| 298 | + | |
| 299 | 299 | }); |
| 300 | 300 | |
| 301 | 301 | </script> | ... | ... |
WebRoot/WEB-INF/jsp/system/index/login.jsp
| ... | ... | @@ -27,6 +27,12 @@ |
| 27 | 27 | <script type="text/javascript" src="static/js/jQuery.md5.js"></script> |
| 28 | 28 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> |
| 29 | 29 | <script type="text/javascript" src="static/js/jquery.cookie.js"></script> |
| 30 | +<script type="text/javascript" src="static/js/lang.js"></script> | |
| 31 | +<script type="text/javascript" > | |
| 32 | + if(lang() != 'zh'){ | |
| 33 | + | |
| 34 | + } | |
| 35 | +</script> | |
| 30 | 36 | <style type="text/css"> |
| 31 | 37 | .div_foot { |
| 32 | 38 | height: 30px; |
| ... | ... | @@ -187,7 +193,6 @@ |
| 187 | 193 | <script src="static/login/js/jquery.mobile.customized.min.js"></script> |
| 188 | 194 | <script src="static/login/js/camera.min.js"></script> |
| 189 | 195 | <script src="static/login/js/templatemo_script.js"></script> |
| 190 | - <script src="static/login/js/ban.js"></script> | |
| 191 | 196 | <script type="text/javascript" src="static/js/jQuery.md5.js"></script> |
| 192 | 197 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> |
| 193 | 198 | <script type="text/javascript" src="static/js/jquery.cookie.js"></script> | ... | ... |
WebRoot/static/js/control.js
WebRoot/static/js/teach_paper.js
| ... | ... | @@ -27,17 +27,13 @@ |
| 27 | 27 | getList(); |
| 28 | 28 | }, |
| 29 | 29 | error: function (XMLHttpRequest, textStatus, errorThrown) { |
| 30 | - // 错误信息 | |
| 31 | - alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | |
| 30 | + // wrong massage | |
| 31 | + alert("Status code:"+XMLHttpRequest.status+"Status"+XMLHttpRequest.readyState+"wrong massage:"+textStatus+""); | |
| 32 | 32 | window.top.loading.remove(); |
| 33 | 33 | } |
| 34 | 34 | }) |
| 35 | 35 | |
| 36 | - //日期框 | |
| 37 | - $('.date-picker').datepicker({ | |
| 38 | - autoclose: true, | |
| 39 | - todayHighlight: true | |
| 40 | - }); | |
| 36 | + | |
| 41 | 37 | window.top.loading.remove(); |
| 42 | 38 | }) |
| 43 | 39 | |
| ... | ... | @@ -60,14 +56,14 @@ |
| 60 | 56 | success:function(data){ |
| 61 | 57 | console.log(data); |
| 62 | 58 | for(var i=0;i<data.data.length;i++){ |
| 63 | - tab_html += '<tr data-id="'+data.data[i].PAPER_ID+'" data-classid="'+data.data[i].CLASS_ID+'"><td><input type="checkbox" name="ids" id="ids" value="'+data.data[i].PAPER_ID+'"/>'+(i+1)+'</td><td>'+data.data[i].TITLE+'</td><td>'+getClassName(data.data[i].CLASS_ID)+'</td><td>'+getSubjectName(data.data[i].SUBJECT_ID)+'</td><td>'+data.data[i].EXAM_TIME+'分钟</td><td>'+data.data[i].CREATE_DATE+'</td><td><a onclick="jump($(this))">查看</a></td><td><a href="#" onclick="del($(this));"><img src="../static/images/remove.png" /></a></td></tr>'; | |
| 59 | + tab_html += '<tr data-id="'+data.data[i].PAPER_ID+'" data-classid="'+data.data[i].CLASS_ID+'"><td><input type="checkbox" name="ids" id="ids" value="'+data.data[i].PAPER_ID+'"/>'+(i+1)+'</td><td>'+data.data[i].TITLE+'</td><td>'+getClassName(data.data[i].CLASS_ID)+'</td><td>'+getSubjectName(data.data[i].SUBJECT_ID)+'</td><td>'+data.data[i].EXAM_TIME+'分钟</td><td>'+data.data[i].CREATE_DATE+'</td><td><a onclick="jump($(this))">' + view + '</a></td><td><a href="#" onclick="del($(this));"><img src="../static/images/remove.png" /></a></td></tr>'; | |
| 64 | 60 | } |
| 65 | 61 | $("#tab_body").html(tab_html); |
| 66 | 62 | window.top.loading.remove(); |
| 67 | 63 | }, |
| 68 | 64 | error: function (XMLHttpRequest, textStatus, errorThrown) { |
| 69 | - // 错误信息 | |
| 70 | - alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | |
| 65 | + // wrong massage | |
| 66 | + alert("Status code:"+XMLHttpRequest.status+"Status"+XMLHttpRequest.readyState+"wrong massage:"+textStatus+""); | |
| 71 | 67 | window.top.loading.remove(); |
| 72 | 68 | } |
| 73 | 69 | }); |
| ... | ... | @@ -100,7 +96,7 @@ |
| 100 | 96 | class_id=$(".classList .active").attr("data-classid"); |
| 101 | 97 | location.href="set_question.do?subject_id="+subject_id+"&class_id="+class_id+"&user_id="+user_id; |
| 102 | 98 | }else{ |
| 103 | - alert("请先选择班级"); | |
| 99 | + alert("Please select class first"); | |
| 104 | 100 | } |
| 105 | 101 | window.top.loading.show(); |
| 106 | 102 | console.log($(".classList .active").length); |
| ... | ... | @@ -117,8 +113,8 @@ |
| 117 | 113 | subjectName=data.data; |
| 118 | 114 | }, |
| 119 | 115 | error: function (XMLHttpRequest, textStatus, errorThrown) { |
| 120 | - // 错误信息 | |
| 121 | - alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | |
| 116 | + // wrong massage | |
| 117 | + alert("Status code:"+XMLHttpRequest.status+"Status"+XMLHttpRequest.readyState+"wrong massage:"+textStatus+""); | |
| 122 | 118 | window.top.loading.remove(); |
| 123 | 119 | } |
| 124 | 120 | }) |
| ... | ... | @@ -135,8 +131,8 @@ |
| 135 | 131 | className=data.data; |
| 136 | 132 | }, |
| 137 | 133 | error: function (XMLHttpRequest, textStatus, errorThrown) { |
| 138 | - // 错误信息 | |
| 139 | - alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | |
| 134 | + // wrong massage | |
| 135 | + alert("Status code:"+XMLHttpRequest.status+"Status:"+XMLHttpRequest.readyState+"wrong massage:"+textStatus+""); | |
| 140 | 136 | window.top.loading.remove(); |
| 141 | 137 | } |
| 142 | 138 | }) |
| ... | ... | @@ -194,7 +190,7 @@ |
| 194 | 190 | function del(obj){ //删除 |
| 195 | 191 | //var remove = new remove(); |
| 196 | 192 | var id=obj.closest("tr").attr("data-id"); |
| 197 | - window.top.remove.init({"title":"删除","func":function(success){ | |
| 193 | + window.top.remove.init({"title":"Delete","func":function(success){ | |
| 198 | 194 | if(success){ |
| 199 | 195 | var url1 = url+ "/paper/delete.do?PAPER_ID="+id+"&tm="+new Date().getTime(); |
| 200 | 196 | window.top.loading.show(); |
| ... | ... | @@ -209,7 +205,7 @@ |
| 209 | 205 | window.top.remove.show(); |
| 210 | 206 | } |
| 211 | 207 | function deleteAll(){ //批量删除 |
| 212 | - window.top.remove.init({"title":"删除","func":function(success){ | |
| 208 | + window.top.remove.init({"title":"Delete","func":function(success){ | |
| 213 | 209 | if(success){ |
| 214 | 210 | var str = ''; |
| 215 | 211 | for(var i=0;i < document.getElementsByName('ids').length;i++){ | ... | ... |
WebRoot/static/js/test_list.js
| ... | ... | @@ -33,7 +33,7 @@ $(document).ready( |
| 33 | 33 | }, |
| 34 | 34 | error: function (XMLHttpRequest, textStatus, errorThrown) { |
| 35 | 35 | // 错误信息 |
| 36 | - alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | |
| 36 | + alert("Status code:"+XMLHttpRequest.status+"Status:"+XMLHttpRequest.readyState+"wrong massage:"+textStatus+""); | |
| 37 | 37 | window.top.loading.remove(); |
| 38 | 38 | } |
| 39 | 39 | }) |
| ... | ... | @@ -83,7 +83,7 @@ function getList(start_date, end_date, class_id) { // 获取测验列表 |
| 83 | 83 | }, |
| 84 | 84 | error: function (XMLHttpRequest, textStatus, errorThrown) { |
| 85 | 85 | // 错误信息 |
| 86 | - alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | |
| 86 | + alert("Status code:"+XMLHttpRequest.status+"Status:"+XMLHttpRequest.readyState+"wrong massage:"+textStatus+""); | |
| 87 | 87 | window.top.loading.remove(); |
| 88 | 88 | } |
| 89 | 89 | }); |
| ... | ... | @@ -128,7 +128,7 @@ function getClassName(id) { // 获取班级中文名 |
| 128 | 128 | }, |
| 129 | 129 | error: function (XMLHttpRequest, textStatus, errorThrown) { |
| 130 | 130 | // 错误信息 |
| 131 | - alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | |
| 131 | + alert("Status code:"+XMLHttpRequest.status+"Status:"+XMLHttpRequest.readyState+"wrong massage:"+textStatus+""); | |
| 132 | 132 | window.top.loading.remove(); |
| 133 | 133 | } |
| 134 | 134 | }) | ... | ... |
resources/dbconfig.properties
| 1 | 1 | #数据源 1 |
| 2 | -url:jdbc:mysql://47.107.98.47:3306/education?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | |
| 2 | +url:jdbc:mysql://47.107.98.47:3306/education2?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | |
| 3 | 3 | #url:jdbc:mysql://120.78.57.84:3306/education3?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 |
| 4 | 4 | #url:jdbc:mysql://192.168.0.3:3306/education?autoReconnect=true&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 |
| 5 | 5 | driverClassName:com.mysql.jdbc.Driver | ... | ... |
resources/mybatis1/api/V1Mapper.xml
| ... | ... | @@ -139,10 +139,12 @@ |
| 139 | 139 | SELECT |
| 140 | 140 | sv_teacher.`NAME` AS TEACHER_NAME, |
| 141 | 141 | sv_grade.`NAME` AS GRADE_NAME, |
| 142 | + sv_grade.`ENAME` AS GRADE_ENAME, | |
| 142 | 143 | sv_grade.ID AS GRADE_ID, |
| 143 | 144 | sv_sclass.CLASS_NAME AS CLASS_NAME, |
| 144 | 145 | sv_sclass.ID AS CLASS_ID, |
| 145 | 146 | sv_subject.CNAME AS SUBJECT_NAME, |
| 147 | + sv_subject.ENAME AS SUBJECT_ENAME, | |
| 146 | 148 | sv_subject.ID AS SUBJECT_ID, |
| 147 | 149 | sv_school.`NAME` as SCHOOL_NAME, |
| 148 | 150 | sv_school.ID AS SCHOOL_ID, | ... | ... |
src/com/fh/controller/base/BaseController.java
| 1 | 1 | package com.fh.controller.base; |
| 2 | 2 | |
| 3 | 3 | |
| 4 | +import javax.servlet.http.Cookie; | |
| 4 | 5 | import javax.servlet.http.HttpServletRequest; |
| 5 | 6 | |
| 6 | 7 | import org.apache.shiro.session.Session; |
| ... | ... | @@ -148,4 +149,32 @@ public class BaseController { |
| 148 | 149 | return schoolName; |
| 149 | 150 | } |
| 150 | 151 | |
| 152 | + public String getCookieLanguage(){ | |
| 153 | + Cookie[] cookies = getRequest().getCookies(); | |
| 154 | + if (cookies != null) { | |
| 155 | + for (Cookie cookie : cookies) { | |
| 156 | + if (cookie.getName().equals("lang")) { | |
| 157 | + return cookie.getValue(); | |
| 158 | + } | |
| 159 | + } | |
| 160 | + } | |
| 161 | + return null; | |
| 162 | + } | |
| 163 | + | |
| 164 | + public String getLang() { | |
| 165 | + String lang = getCookieLanguage(); | |
| 166 | + if(lang == null){ | |
| 167 | + lang = getRequest().getLocale().getLanguage(); | |
| 168 | + } | |
| 169 | + return lang; | |
| 170 | + } | |
| 171 | + | |
| 172 | + public boolean isChineseLanguageClient(){ | |
| 173 | + String lang = getLang(); | |
| 174 | + if(lang != null && lang.length() >= 2){ | |
| 175 | + lang = lang.substring(0,2); | |
| 176 | + } | |
| 177 | + return "zh".equals(getLang()); | |
| 178 | + } | |
| 179 | + | |
| 151 | 180 | } | ... | ... |
src/com/fh/controller/sunvote/paper/PaperController.java
| ... | ... | @@ -239,7 +239,11 @@ public class PaperController extends BaseController { |
| 239 | 239 | ex.printStackTrace(); |
| 240 | 240 | } |
| 241 | 241 | } |
| 242 | - mv.setViewName("sunvote/teacher/creat_question"); | |
| 242 | + if(isChineseLanguageClient()){ | |
| 243 | + mv.setViewName("sunvote/teacher/creat_question"); | |
| 244 | + }else{ | |
| 245 | + mv.setViewName("sunvote/teacher/en_creat_question"); | |
| 246 | + } | |
| 243 | 247 | mv.addObject("pd", pd); |
| 244 | 248 | mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 |
| 245 | 249 | return mv; |
| ... | ... | @@ -278,7 +282,11 @@ public class PaperController extends BaseController { |
| 278 | 282 | mv.addObject("TEMPLEATE", template); |
| 279 | 283 | } |
| 280 | 284 | |
| 281 | - mv.setViewName("sunvote/teacher/creat_question"); | |
| 285 | + if(isChineseLanguageClient()){ | |
| 286 | + mv.setViewName("sunvote/teacher/creat_question"); | |
| 287 | + }else{ | |
| 288 | + mv.setViewName("sunvote/teacher/en_creat_question"); | |
| 289 | + } | |
| 282 | 290 | mv.addObject("pd", pd); |
| 283 | 291 | if(paperType != null && "2".equals(paperType)){ |
| 284 | 292 | mv.addObject("JUMP_URL", "/main/admin"); |
| ... | ... | @@ -311,14 +319,19 @@ public class PaperController extends BaseController { |
| 311 | 319 | pd.put("PAPER_TYPE","1"); |
| 312 | 320 | page.setPd(pd); |
| 313 | 321 | List<PageData> varList = paperService.list(page); //列出Paper列表 |
| 314 | - mv.setViewName("sunvote/paper/paper_list2"); | |
| 322 | + page.setLangIsChina(isChineseLanguageClient()); | |
| 323 | + if(isChineseLanguageClient()){ | |
| 324 | + mv.setViewName("sunvote/paper/paper_list2"); | |
| 325 | + }else{ | |
| 326 | + mv.setViewName("sunvote/paper/en_paper_list2"); | |
| 327 | + } | |
| 315 | 328 | |
| 316 | 329 | for(PageData p:varList){ |
| 317 | 330 | String examTime = p.getString("EXAM_TIME"); |
| 318 | 331 | if(examTime != null){ |
| 319 | 332 | try{ |
| 320 | 333 | int et = Integer.parseInt(examTime); |
| 321 | - String min = (et / 60 ) + "" ; | |
| 334 | + String min = (et / 60 ) + "" ; | |
| 322 | 335 | if(min.length() < 2){ |
| 323 | 336 | min = "0" + min ; |
| 324 | 337 | } | ... | ... |
src/com/fh/controller/sunvote/report/ReportController.java
| ... | ... | @@ -201,7 +201,11 @@ public class ReportController extends BaseController { |
| 201 | 201 | mv.addObject("start_date", pd.get("START_DATE")); |
| 202 | 202 | mv.addObject("end_date", pd.get("END_DATE")); |
| 203 | 203 | mv.addObject("pd", pd); |
| 204 | - mv.setViewName("sunvote/teacher/teacher_report_1"); | |
| 204 | + if(isChineseLanguageClient()){ | |
| 205 | + mv.setViewName("sunvote/teacher/teacher_report_1"); | |
| 206 | + }else{ | |
| 207 | + mv.setViewName("sunvote/teacher/en_teacher_report_1"); | |
| 208 | + } | |
| 205 | 209 | return mv; |
| 206 | 210 | } |
| 207 | 211 | |
| ... | ... | @@ -235,7 +239,11 @@ public class ReportController extends BaseController { |
| 235 | 239 | url += "&SUBJECT_ID=" + pd.getString("SUBJECT_ID"); |
| 236 | 240 | } |
| 237 | 241 | mv.addObject("URL",url); |
| 238 | - mv.setViewName("sunvote/teacher/stduent_report"); | |
| 242 | + if(isChineseLanguageClient()){ | |
| 243 | + mv.setViewName("sunvote/teacher/stduent_report"); | |
| 244 | + }else{ | |
| 245 | + mv.setViewName("sunvote/teacher/en_stduent_report"); | |
| 246 | + } | |
| 239 | 247 | mv.addObject("start_date", pd.get("START_DATE")); |
| 240 | 248 | mv.addObject("end_date", pd.get("END_DATE")); |
| 241 | 249 | mv.addObject("pd", pd); |
| ... | ... | @@ -534,8 +542,11 @@ public class ReportController extends BaseController { |
| 534 | 542 | mv.addObject("studentInfo", studentList); |
| 535 | 543 | mv.addObject("teacherPd", teacherPd); |
| 536 | 544 | mv.addObject("subjectPd", subjectPd); |
| 537 | - | |
| 538 | - mv.setViewName("sunvote/teacher/teacher_report_test"); | |
| 545 | + if(isChineseLanguageClient()){ | |
| 546 | + mv.setViewName("sunvote/teacher/teacher_report_test"); | |
| 547 | + }else{ | |
| 548 | + mv.setViewName("sunvote/teacher/en_teacher_report_test"); | |
| 549 | + } | |
| 539 | 550 | return mv; |
| 540 | 551 | } |
| 541 | 552 | ... | ... |
src/com/fh/controller/sunvote/student/StudentController.java
| ... | ... | @@ -107,8 +107,11 @@ public class StudentController extends BaseController { |
| 107 | 107 | ModelAndView mv = this.getModelAndView(); |
| 108 | 108 | mv.addObject("pd", getPageData()); |
| 109 | 109 | |
| 110 | - | |
| 111 | - mv.setViewName("sunvote/student/uploadexcel"); | |
| 110 | + if(isChineseLanguageClient()){ | |
| 111 | + mv.setViewName("sunvote/student/uploadexcel"); | |
| 112 | + }else{ | |
| 113 | + mv.setViewName("sunvote/student/en_uploadexcel"); | |
| 114 | + } | |
| 112 | 115 | return mv; |
| 113 | 116 | } |
| 114 | 117 | |
| ... | ... | @@ -257,7 +260,12 @@ public class StudentController extends BaseController { |
| 257 | 260 | pd = this.getPageData(); |
| 258 | 261 | page.setPd(pd); |
| 259 | 262 | List<PageData> varList = studentService.datalistclassPage(page); //列出Student列表 |
| 260 | - mv.setViewName("sunvote/student/student_list2"); | |
| 263 | + page.setLangIsChina(isChineseLanguageClient()); | |
| 264 | + if(isChineseLanguageClient()){ | |
| 265 | + mv.setViewName("sunvote/student/student_list2"); | |
| 266 | + }else{ | |
| 267 | + mv.setViewName("sunvote/student/en_student_list2"); | |
| 268 | + } | |
| 261 | 269 | mv.addObject("varList", varList); |
| 262 | 270 | mv.addObject("pd", pd); |
| 263 | 271 | mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 |
| ... | ... | @@ -288,7 +296,11 @@ public class StudentController extends BaseController { |
| 288 | 296 | ModelAndView mv = this.getModelAndView(); |
| 289 | 297 | PageData pd = new PageData(); |
| 290 | 298 | pd = this.getPageData(); |
| 291 | - mv.setViewName("sunvote/student/student_edit2"); | |
| 299 | + if(isChineseLanguageClient()){ | |
| 300 | + mv.setViewName("sunvote/student/student_edit2"); | |
| 301 | + }else{ | |
| 302 | + mv.setViewName("sunvote/student/en_student_edit2"); | |
| 303 | + } | |
| 292 | 304 | mv.addObject("msg", "save2"); |
| 293 | 305 | mv.addObject("pd", pd); |
| 294 | 306 | return mv; |
| ... | ... | @@ -320,7 +332,11 @@ public class StudentController extends BaseController { |
| 320 | 332 | String classID = pd.getString("CLASS_ID"); |
| 321 | 333 | pd = studentService.findById(pd); //根据ID读取 |
| 322 | 334 | pd.put("CLASS_ID", classID); |
| 323 | - mv.setViewName("sunvote/student/student_edit2"); | |
| 335 | + if(isChineseLanguageClient()){ | |
| 336 | + mv.setViewName("sunvote/student/student_edit2"); | |
| 337 | + }else{ | |
| 338 | + mv.setViewName("sunvote/student/en_student_edit2"); | |
| 339 | + } | |
| 324 | 340 | mv.addObject("msg", "edit2"); |
| 325 | 341 | mv.addObject("pd", pd); |
| 326 | 342 | return mv; | ... | ... |
src/com/fh/controller/sunvote/teacher/TeacherController.java
| ... | ... | @@ -166,7 +166,11 @@ public class TeacherController extends BaseController { |
| 166 | 166 | ModelAndView mv = this.getModelAndView(); |
| 167 | 167 | PageData pd = new PageData(); |
| 168 | 168 | pd = this.getPageData(); |
| 169 | - mv.setViewName("sunvote/teacher/teach_paper"); | |
| 169 | + if(isChineseLanguageClient()){ | |
| 170 | + mv.setViewName("sunvote/teacher/teach_paper"); | |
| 171 | + }else{ | |
| 172 | + mv.setViewName("sunvote/teacher/en_teach_paper"); | |
| 173 | + } | |
| 170 | 174 | pd.put("userId", userId); |
| 171 | 175 | mv.addObject("pd", pd); |
| 172 | 176 | return mv; |
| ... | ... | @@ -204,7 +208,11 @@ public class TeacherController extends BaseController { |
| 204 | 208 | PageData pd = new PageData(); |
| 205 | 209 | pd = this.getPageData(); |
| 206 | 210 | pd.put("userId", userId); |
| 207 | - mv.setViewName("sunvote/teacher/test_list"); | |
| 211 | + if(isChineseLanguageClient()){ | |
| 212 | + mv.setViewName("sunvote/teacher/test_list"); | |
| 213 | + }else{ | |
| 214 | + mv.setViewName("sunvote/teacher/en_test_list"); | |
| 215 | + } | |
| 208 | 216 | mv.addObject("pd", pd); |
| 209 | 217 | return mv; |
| 210 | 218 | } |
| ... | ... | @@ -224,7 +232,11 @@ public class TeacherController extends BaseController { |
| 224 | 232 | pd = this.getPageData(); |
| 225 | 233 | pd.put("userId", userId); |
| 226 | 234 | pd.put("subject_id", getSubjectID(userId)); |
| 227 | - mv.setViewName("sunvote/teacher/paper_view"); | |
| 235 | + if(isChineseLanguageClient()){ | |
| 236 | + mv.setViewName("sunvote/teacher/paper_view"); | |
| 237 | + }else{ | |
| 238 | + mv.setViewName("sunvote/teacher/en_paper_view"); | |
| 239 | + } | |
| 228 | 240 | mv.addObject("pd", pd); |
| 229 | 241 | return mv; |
| 230 | 242 | } |
| ... | ... | @@ -255,7 +267,11 @@ public class TeacherController extends BaseController { |
| 255 | 267 | PageData pd = new PageData(); |
| 256 | 268 | pd = this.getPageData(); |
| 257 | 269 | pd.put("userId", userId); |
| 258 | - mv.setViewName("sunvote/teacher/paper_view2"); | |
| 270 | + if(isChineseLanguageClient()){ | |
| 271 | + mv.setViewName("sunvote/teacher/paper_view2"); | |
| 272 | + }else{ | |
| 273 | + mv.setViewName("sunvote/teacher/en_paper_view2"); | |
| 274 | + } | |
| 259 | 275 | mv.addObject("pd", pd); |
| 260 | 276 | return mv; |
| 261 | 277 | } |
| ... | ... | @@ -356,7 +372,11 @@ public class TeacherController extends BaseController { |
| 356 | 372 | PageData pd = new PageData(); |
| 357 | 373 | pd = this.getPageData(); |
| 358 | 374 | pd.put("userId", userId); |
| 359 | - mv.setViewName("sunvote/teacher/set_question"); | |
| 375 | + if(isChineseLanguageClient()){ | |
| 376 | + mv.setViewName("sunvote/teacher/set_question"); | |
| 377 | + }else{ | |
| 378 | + mv.setViewName("sunvote/teacher/en_set_question"); | |
| 379 | + } | |
| 360 | 380 | mv.addObject("pd", pd); |
| 361 | 381 | return mv; |
| 362 | 382 | } | ... | ... |
src/com/fh/controller/system/login/LoginController.java
| ... | ... | @@ -110,7 +110,11 @@ public class LoginController extends BaseController { |
| 110 | 110 | PageData pd = new PageData(); |
| 111 | 111 | pd = this.getPageData(); |
| 112 | 112 | pd = this.setLoginPd(pd); // 设置登录页面的配置参数 |
| 113 | - mv.setViewName("system/index/login"); | |
| 113 | + if(isChineseLanguageClient()){ | |
| 114 | + mv.setViewName("system/index/login"); | |
| 115 | + }else{ | |
| 116 | + mv.setViewName("system/index/en_login"); | |
| 117 | + } | |
| 114 | 118 | mv.addObject("pd", pd); |
| 115 | 119 | return mv; |
| 116 | 120 | } |
| ... | ... | @@ -272,7 +276,11 @@ public class LoginController extends BaseController { |
| 272 | 276 | session.setAttribute(USERNAME + Const.ROLE_ID, |
| 273 | 277 | "teacher"); |
| 274 | 278 | session.setAttribute(Const.SESSION_USERNAME, USERNAME); // 放入用户名到session |
| 275 | - mv.setViewName("sunvote/teacher/teacher_main"); | |
| 279 | + if(isChineseLanguageClient()){ | |
| 280 | + mv.setViewName("sunvote/teacher/teacher_main"); | |
| 281 | + }else{ | |
| 282 | + mv.setViewName("sunvote/teacher/en_teacher_main"); | |
| 283 | + } | |
| 276 | 284 | mv.addObject("user", user); |
| 277 | 285 | pd.put("SYSNAME", Tools.readTxtFile(Const.SYSNAME)); // 读取系统名称 |
| 278 | 286 | if(pd.get("DEFAULTURL") == null){ |
| ... | ... | @@ -313,7 +321,11 @@ public class LoginController extends BaseController { |
| 313 | 321 | mv.addObject("gradeInfos", gradeInfos); |
| 314 | 322 | mv.addObject("subjectInfos", subjectInfos); |
| 315 | 323 | session.setAttribute(Const.SESSION_USERNAME, USERNAME); // 放入用户名到session |
| 316 | - mv.setViewName("sunvote/admin/admin_main"); | |
| 324 | + if(isChineseLanguageClient()){ | |
| 325 | + mv.setViewName("sunvote/admin/admin_main"); | |
| 326 | + }else{ | |
| 327 | + mv.setViewName("sunvote/admin/en_admin_main"); | |
| 328 | + } | |
| 317 | 329 | mv.addObject("user", user); |
| 318 | 330 | pd.put("SYSNAME", Tools.readTxtFile(Const.SYSNAME)); // 读取系统名称 |
| 319 | 331 | if(pd.get("DEFAULTURL") == null){ |
| ... | ... | @@ -352,10 +364,18 @@ public class LoginController extends BaseController { |
| 352 | 364 | mv.addObject("user", user); |
| 353 | 365 | mv.addObject("menuList", menuList); |
| 354 | 366 | } else { |
| 355 | - mv.setViewName("system/index/login");// session失效后跳转登录页面 | |
| 367 | + if(isChineseLanguageClient()){ | |
| 368 | + mv.setViewName("system/index/login"); | |
| 369 | + }else{ | |
| 370 | + mv.setViewName("system/index/en_login"); | |
| 371 | + } | |
| 356 | 372 | } |
| 357 | 373 | } catch (Exception e) { |
| 358 | - mv.setViewName("system/index/login"); | |
| 374 | + if(isChineseLanguageClient()){ | |
| 375 | + mv.setViewName("system/index/login"); | |
| 376 | + }else{ | |
| 377 | + mv.setViewName("system/index/en_login"); | |
| 378 | + } | |
| 359 | 379 | logger.error(e.getMessage(), e); |
| 360 | 380 | } |
| 361 | 381 | pd.put("SYSNAME", Tools.readTxtFile(Const.SYSNAME)); // 读取系统名称 |
| ... | ... | @@ -593,7 +613,11 @@ public class LoginController extends BaseController { |
| 593 | 613 | pd = this.getPageData(); |
| 594 | 614 | pd.put("msg", pd.getString("msg")); |
| 595 | 615 | pd = this.setLoginPd(pd); // 设置登录页面的配置参数 |
| 596 | - mv.setViewName("system/index/login"); | |
| 616 | + if(isChineseLanguageClient()){ | |
| 617 | + mv.setViewName("system/index/login"); | |
| 618 | + }else{ | |
| 619 | + mv.setViewName("system/index/en_login"); | |
| 620 | + } | |
| 597 | 621 | mv.addObject("pd", pd); |
| 598 | 622 | return mv; |
| 599 | 623 | } | ... | ... |
src/com/fh/entity/Page.java
| ... | ... | @@ -57,23 +57,56 @@ public class Page { |
| 57 | 57 | this.currentPage = currentPage; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | + | |
| 61 | + private String total = "共" ; | |
| 62 | + private String articles = "条"; | |
| 63 | + private String frist = "首页" ; | |
| 64 | + private String previous = "上一页"; | |
| 65 | + private String next = "下一页"; | |
| 66 | + private String tail = "尾页" ; | |
| 67 | + private String jump = "跳转" ; | |
| 68 | + private String pageNumber = "页码"; | |
| 69 | + private String displayNumber = "显示条数" ; | |
| 70 | + public void setLangIsChina(boolean is){ | |
| 71 | + if(is){ | |
| 72 | + total = "共" ; | |
| 73 | + articles = "条"; | |
| 74 | + frist = "首页" ; | |
| 75 | + previous = "上一页"; | |
| 76 | + next = "下一页"; | |
| 77 | + tail = "尾页" ; | |
| 78 | + jump = "跳转" ; | |
| 79 | + pageNumber = "页码"; | |
| 80 | + displayNumber = "显示条数" ; | |
| 81 | + }else{ | |
| 82 | + total = "" ; | |
| 83 | + articles = " articles"; | |
| 84 | + frist = "Frist" ; | |
| 85 | + previous = "Previous"; | |
| 86 | + next = "Next"; | |
| 87 | + tail = "Tail" ; | |
| 88 | + jump = "JUMP" ; | |
| 89 | + pageNumber = "Page number"; | |
| 90 | + displayNumber = "Display Number" ; | |
| 91 | + } | |
| 92 | + } | |
| 60 | 93 | //拼接分页 页面及JS函数 |
| 61 | 94 | public String getPageStr() { |
| 62 | 95 | StringBuffer sb = new StringBuffer(); |
| 63 | 96 | if(totalResult>0){ |
| 64 | 97 | sb.append(" <ul class=\"pagination pull-right no-margin\">\n"); |
| 65 | 98 | if(currentPage==1){ |
| 66 | - sb.append(" <li><a>共"+totalResult+"条</a></li>\n"); | |
| 67 | - sb.append(" <li><span style='padding:0'><input type=\"number\" value=\"\" id=\"toGoPage\" style=\"width:50px;text-align:center;float:left\" placeholder=\"页码\"/></span></li>\n"); | |
| 68 | - sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"toTZ();\" class=\"btn btn-mini btn-success\">跳转</a></li>\n"); | |
| 69 | - sb.append(" <li><a>首页</a></li>\n"); | |
| 70 | - sb.append(" <li><a>上页</a></li>\n"); | |
| 99 | + sb.append(" <li><a>" + total +totalResult+articles + "</a></li>\n"); | |
| 100 | + sb.append(" <li><span style='padding:0'><input type=\"number\" value=\"\" id=\"toGoPage\" style=\"width:50px;text-align:center;float:left\" placeholder=\"" + pageNumber + "\"/></span></li>\n"); | |
| 101 | + sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"toTZ();\" class=\"btn btn-mini btn-success\">" + jump + "</a></li>\n"); | |
| 102 | + sb.append(" <li><a>" + frist + "</a></li>\n"); | |
| 103 | + sb.append(" <li><a>" + previous + "</a></li>\n"); | |
| 71 | 104 | }else{ |
| 72 | - sb.append(" <li><a>共<font color=red>"+totalResult+"</font>条</a></li>\n"); | |
| 73 | - sb.append(" <li><input type=\"number\" value=\"\" id=\"toGoPage\" style=\"width:50px;text-align:center;float:left\" placeholder=\"页码\"/></li>\n"); | |
| 74 | - sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"toTZ();\" class=\"btn btn-mini btn-success\">跳转</a></li>\n"); | |
| 75 | - sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage(1)\">首页</a></li>\n"); | |
| 76 | - sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+(currentPage-1)+")\">上页</a></li>\n"); | |
| 105 | + sb.append(" <li><a>"+ total +"<font color=red>"+totalResult+"</font>" + articles + "</a></li>\n"); | |
| 106 | + sb.append(" <li><input type=\"number\" value=\"\" id=\"toGoPage\" style=\"width:50px;text-align:center;float:left\" placeholder=\"" + pageNumber + "\"/></li>\n"); | |
| 107 | + sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"toTZ();\" class=\"btn btn-mini btn-success\">" + jump + "</a></li>\n"); | |
| 108 | + sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage(1)\">" + frist + "</a></li>\n"); | |
| 109 | + sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+(currentPage-1)+")\">" + previous + "</a></li>\n"); | |
| 77 | 110 | } |
| 78 | 111 | int showTag = 5;//分页标签显示数量 |
| 79 | 112 | int startTag = 1; |
| ... | ... | @@ -88,14 +121,14 @@ public class Page { |
| 88 | 121 | sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+i+")\">"+i+"</a></li>\n"); |
| 89 | 122 | } |
| 90 | 123 | if(currentPage==totalPage){ |
| 91 | - sb.append(" <li><a>下页</a></li>\n"); | |
| 92 | - sb.append(" <li><a>尾页</a></li>\n"); | |
| 124 | + sb.append(" <li><a>" + next + "</a></li>\n"); | |
| 125 | + sb.append(" <li><a>" + tail + "</a></li>\n"); | |
| 93 | 126 | }else{ |
| 94 | - sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+(currentPage+1)+")\">下页</a></li>\n"); | |
| 95 | - sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+totalPage+")\">尾页</a></li>\n"); | |
| 127 | + sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+(currentPage+1)+")\">" + next + "</a></li>\n"); | |
| 128 | + sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+totalPage+")\">" + tail + "</a></li>\n"); | |
| 96 | 129 | } |
| 97 | - sb.append(" <li><a>共"+totalPage+"页</a></li>\n"); | |
| 98 | - sb.append(" <li><span class=\"enter\"><select title='显示条数' style=\"width:55px;float:left;height:32px;margin-top:1px;border:0\" onchange=\"changeCount(this.value)\">\n"); | |
| 130 | + sb.append(" <li><a>" + total +totalResult+articles + "</a></li>\n"); | |
| 131 | + sb.append(" <li><span class=\"enter\"><select title='" + displayNumber + "' style=\"width:55px;float:left;height:32px;margin-top:1px;border:0\" onchange=\"changeCount(this.value)\">\n"); | |
| 99 | 132 | sb.append(" <option value='"+showCount+"'>"+showCount+"</option>\n"); |
| 100 | 133 | sb.append(" <option value='10'>10</option>\n"); |
| 101 | 134 | sb.append(" <option value='20'>20</option>\n"); |
| ... | ... | @@ -216,4 +249,5 @@ public class Page { |
| 216 | 249 | this.pd = pd; |
| 217 | 250 | } |
| 218 | 251 | |
| 252 | + | |
| 219 | 253 | } | ... | ... |