浏览代码

上传文件至 'WebRoot2'

1801010514 5 年之前
父节点
当前提交
fd15e62390
共有 5 个文件被更改,包括 520 次插入0 次删除
  1. 79 0
      WebRoot2/edit_player.jsp
  2. 35 0
      WebRoot2/header.jsp
  3. 160 0
      WebRoot2/index1.jsp
  4. 191 0
      WebRoot2/login.jsp
  5. 55 0
      WebRoot2/player_gl.jsp

+ 79 - 0
WebRoot2/edit_player.jsp

@@ -0,0 +1,79 @@
+<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%
+String path = request.getContextPath();
+String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <base href="<%=basePath%>">
+    
+    <title>My JSP 'updateuser.jsp' starting page</title>
+    
+	<meta http-equiv="pragma" content="no-cache">
+	<meta http-equiv="cache-control" content="no-cache">
+	<meta http-equiv="expires" content="0">    
+	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
+	<meta http-equiv="description" content="This is my page">
+	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.css">
+	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.0.min.js"></script>
+	<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
+  </head>
+  
+  <body>
+    <body>
+    
+ 
+	<div style="padding: 0px 0px 0px 0px;">
+	<div class="panel panel-info">
+	<div class="panel-heading">
+		<h3 class="panel-title">修改运动员信息</h3>
+	</div>
+	<div class="panel-body">
+	<form class="form-horizontal" role="form" method="post" action="SportServlet?method=redit_player">
+	<div class="col-md-3">
+  
+   <div class="form-group">
+    <label for="lastname" class="col-sm-2 control-label">运动员编号</label>
+    <div class="col-sm-10">
+      <input type="text" class="form-control" name="id" value="${player.id}" readonly = "true">
+    </div>
+  </div>
+  <div class="form-group">
+    <label for="lastname" class="col-sm-2 control-label">运动员姓名</label>
+    <div class="col-sm-10">
+      <input type="text" class="form-control" name="name" value="${player.name}">
+    </div>
+  </div>
+  <div class="form-group">
+     <label for="lastname" class="col-sm-2 control-label">性别</label>
+    <div class="col-sm-10">
+    	<select name="sex" class="form-control">
+    			<option <c:if test="${player.sex=='男'}">selected</c:if> value="男" >男</option>
+				<option <c:if test="${player.sex=='女'}">selected</c:if> value="女" >女</option>
+    	</select>
+    </div>
+  </div>
+   <div class="form-group">
+     <label for="lastname" class="col-sm-2 control-label">所在单位</label>
+    <div class="col-sm-10">
+    	 <input type="text" class="form-control" name="area" value="${player.area}">
+    </div>
+  </div>
+  </div>
+  <div class="col-md-3">
+  <div class="form-group">
+    <div class="col-sm-offset-2 col-sm-10">
+      <button type="submit" class="btn btn-primary">修改</button>
+    </div>
+  </div>
+  </div>
+</form>
+		
+	</div>
+</div>
+  </body>
+  </body>
+</html>

+ 35 - 0
WebRoot2/header.jsp

@@ -0,0 +1,35 @@
+<%@ page language="java" contentType="text/html;utf-8" pageEncoding="utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<div class="container-fluid header">
+	<div class="row" >
+		<div class="col-md-4">
+			<h1>运动会管理系统</h1>
+		</div>
+		
+		<div class="col-md-8">
+		
+			 <div class="btn-group pull-right" >
+					
+                <button class="btn btn-info dropdown-toggle btn-lg" data-toggle="dropdown" id="dropdownMenu1" >
+               
+                   <span class="hidden-sm hidden-xs">欢迎:${sessionScope.user.name}</span>
+                   
+                 
+                    <span class="caret"></span>
+                </button>
+                
+                <ul class="dropdown-menu btn-md" aria-labelledby="dropdownMenu1" >
+                	
+                    <li><a href="SportServlet?method=loginout">退出登录</a></li>
+                </ul>
+                <!-- 第二个 -->
+                 
+                
+            </div>
+          
+         </div>
+		
+		
+	</div>
+
+</div>

+ 160 - 0
WebRoot2/index1.jsp

@@ -0,0 +1,160 @@
+<%@ page language="java" contentType="text/html;utf-8" pageEncoding="utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+	<meta charset="UTF-8">
+	<title>运动会管理系统</title>
+	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.css">
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/admin.css">
+    <link rel="stylesheet" href="CSS/sweetalert.css" type="text/css"></link>
+  
+    	<style>
+           
+            .leftMenu{margin:0px;margin-top:5px;}
+            .leftMenu .panel-heading{font-size:14px;padding-left:20px;height:40px;line-height:36px;color:white;position:relative;cursor:pointer;}/*转成手形图标*/
+            .leftMenu .panel-heading span{position:absolute;right:10px;top:12px;}
+            .leftMenu .menu-item-left{padding: 2px; background: transparent; border:1px solid transparent;border-radius: 6px;}
+            .leftMenu .list-group-item:hover{background:#C4E3F3;border:1px solid #1E90FF;}
+        </style>
+</head>
+<body>
+
+<jsp:include page="header.jsp"/>
+<div class="container-fluid main" >
+	<div class="row">
+		     <div class="col-md-2" >
+		     <div class="mainContent" style="height:850px;">
+                <div class="panel-group table-responsive" role="tablist">
+                   <c:if test="${sessionScope.user.type==2}">
+                    <div class="panel panel-primary leftMenu" >
+                        <!-- 利用data-target指定要折叠的分组列表 -->
+                     
+                        <div class="panel-heading" id="collapseListGroupHeading1" data-toggle="collapse" data-target="#collapseListGroup1" role="tab" >
+                            <h4 class="panel-title" >
+                               	运动管理
+                                <span class="glyphicon glyphicon-chevron-up right"></span>
+                            </h4>
+                        </div>
+                        <!-- .panel-collapse和.collapse标明折叠元素 .in表示要显示出来 -->
+                        <div id="collapseListGroup1" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="collapseListGroupHeading1">
+                            <ul class="list-group">
+                           
+                              <li class="list-group-item">
+                                <a class="menu-item-left" href="add_sport.jsp" target="MainFrame">
+                                    <span class="glyphicon glyphicon-triangle-right"></span>添加运动
+                                </a>
+                              </li>
+                               <li class="list-group-item">
+                                <a class="menu-item-left" href="SportServlet?method=sport_gl" target="MainFrame">
+                                    <span class="glyphicon glyphicon-triangle-right"></span>管理运动
+                                </a>
+                              </li>
+                        </div>
+                    </div><!--panel end-->
+                   
+                    <div class="panel panel-primary leftMenu" >
+                        <!-- 利用data-target指定要折叠的分组列表 -->
+                        <div class="panel-heading" id="collapseListGroupHeading1" data-toggle="collapse" data-target="#collapseListGroup1" role="tab" >
+                            <h4 class="panel-title" >
+                               	管理运动员
+                                <span class="glyphicon glyphicon-chevron-up right"></span>
+                            </h4>
+                        </div>
+                        <!-- .panel-collapse和.collapse标明折叠元素 .in表示要显示出来 -->
+                        <div id="collapseListGroup1" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="collapseListGroupHeading1">
+                            <ul class="list-group">
+                           
+                              <li class="list-group-item">
+                                <a class="menu-item-left" href="add_player.jsp" target="MainFrame">
+                                    <span class="glyphicon glyphicon-triangle-right"></span>添加运动员
+                                </a>
+                              </li>
+                               <li class="list-group-item">
+                                <a class="menu-item-left" href="SportServlet?method=player_gl" target="MainFrame">
+                                    <span class="glyphicon glyphicon-triangle-right"></span>管理运动员
+                                </a>
+                              </li>
+                        </div>
+                    </div><!--panel end-->
+                     <div class="panel panel-primary leftMenu" >
+                        <!-- 利用data-target指定要折叠的分组列表 -->
+                        <div class="panel-heading" id="collapseListGroupHeading1" data-toggle="collapse" data-target="#collapseListGroup1" role="tab" >
+                            <h4 class="panel-title" >
+                               	成绩管理
+                                <span class="glyphicon glyphicon-chevron-up right"></span>
+                            </h4>
+                        </div>
+                        <!-- .panel-collapse和.collapse标明折叠元素 .in表示要显示出来 -->
+                        <div id="collapseListGroup1" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="collapseListGroupHeading1">
+                            <ul class="list-group">
+                           
+                              <li class="list-group-item">
+                                <a class="menu-item-left" href="SportServlet?method=add_score" target="MainFrame">
+                                    <span class="glyphicon glyphicon-triangle-right"></span>录入成绩
+                                </a>
+                              </li>
+                               <li class="list-group-item">
+                                <a class="menu-item-left" href="SportServlet?method=score_gl" target="MainFrame">
+                                    <span class="glyphicon glyphicon-triangle-right"></span>管理成绩
+                                </a>
+                              </li>
+                              </ul>
+                        </div>
+                    </div><!--panel end-->
+                     </c:if>
+                     <div class="panel panel-primary leftMenu" >
+                        <!-- 利用data-target指定要折叠的分组列表 -->
+                        <div class="panel-heading" id="collapseListGroupHeading1" data-toggle="collapse" data-target="#collapseListGroup1" role="tab" >
+                            <h4 class="panel-title" >
+                               	综合管理
+                                <span class="glyphicon glyphicon-chevron-up right"></span>
+                            </h4>
+                        </div>
+                        <!-- .panel-collapse和.collapse标明折叠元素 .in表示要显示出来 -->
+                        <div id="collapseListGroup1" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="collapseListGroupHeading1">
+                            <ul class="list-group">
+                           
+                              <li class="list-group-item">
+                                <a class="menu-item-left" href="SportServlet?method=rank_score" target="MainFrame">
+                                    <span class="glyphicon glyphicon-triangle-right"></span>名次列表
+                                </a>
+                              </li>
+                               <li class="list-group-item">
+                                <a class="menu-item-left" href="SportServlet?method=score_tt" target="MainFrame">
+                                    <span class="glyphicon glyphicon-triangle-right"></span>团体得分
+                                </a>
+                              </li>
+                              </ul>
+                        </div>
+                    </div><!--panel end-->
+                </div>
+            </div>
+            </div>
+         <div class="col-md-10" >
+		<div id="main" style="height:850px;width:100%">
+			 <c:if test="${sessionScope.user.type==2}">
+				<iframe src="SportServlet?method=sport_gl" name="MainFrame" width="100%" height="100%;" frameborder="0" scrolling="no"></iframe>
+			    </c:if>
+			     <c:if test="${sessionScope.user.type==1}">
+				<iframe src="SportServlet?method=rank_score" name="MainFrame" width="100%" height="100%;" frameborder="0" scrolling="no"></iframe>
+			    </c:if>
+		</div>
+		</div>
+		
+	</div>
+</div>
+<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.0.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
+<script>
+        $(function(){
+   
+            $(".panel-heading").click(function(e){
+                /*切换折叠指示图标*/
+                $(this).find("span").toggleClass("glyphicon-chevron-down");
+                $(this).find("span").toggleClass("glyphicon-chevron-up");
+            });
+        });
+        </script>
+</body>
+</html>

+ 191 - 0
WebRoot2/login.jsp

@@ -0,0 +1,191 @@
+<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
+<%
+String path = request.getContextPath();
+String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <base href="<%=basePath%>">
+    
+    <title>My JSP 'index.jsp' starting page</title>
+	<meta http-equiv="pragma" content="no-cache">
+	<meta http-equiv="cache-control" content="no-cache">
+	<meta http-equiv="expires" content="0">    
+	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
+	<meta http-equiv="description" content="This is my page">
+	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.0.min.js"></script>
+  </head>
+  
+  <body>
+  <STYLE>
+body{
+	background: #ebebeb;
+	font-family: "Helvetica Neue","Hiragino Sans GB","Microsoft YaHei","\9ED1\4F53",Arial,sans-serif;
+	color: #222;
+	font-size: 12px;
+}
+*{padding: 0px;margin: 0px;}
+.top_div{
+    background: url("images/45.jpg");
+    background-size: 100%  360px;
+    width: 100%;
+	height: 360px;
+}
+.ipt{
+	border: 1px solid #d3d3d3;
+	padding: 10px 10px;
+	width: 290px;
+	border-radius: 4px;
+	padding-left: 35px;
+	-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+	box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+	-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
+	-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+	transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
+}
+.ipt:focus{
+	border-color: #66afe9;
+	outline: 0;
+	-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
+	box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)
+}
+.u_logo{
+	background: url("images/username.png") no-repeat;
+	padding: 10px 10px;
+	position: absolute;
+	top: 43px;
+	left: 40px;
+
+}
+.p_logo{
+	background: url("images/password.png") no-repeat;
+	padding: 10px 10px;
+	position: absolute;
+	top: 12px;
+	left: 40px;
+}
+a{
+	text-decoration: none;
+}
+.tou{
+	background: url("images/tou.png") no-repeat;
+	width: 97px;
+	height: 92px;
+	position: absolute;
+	top: -87px;
+	left: 140px;
+}
+.left_hand{
+	background: url("images/left_hand.png") no-repeat;
+	width: 32px;
+	height: 37px;
+	position: absolute;
+	top: -38px;
+	left: 150px;
+}
+.right_hand{
+	background: url("images/right_hand.png") no-repeat;
+	width: 32px;
+	height: 37px;
+	position: absolute;
+	top: -38px;
+	right: -64px;
+}
+.initial_left_hand{
+	background: url("images/hand.png") no-repeat;
+	width: 30px;
+	height: 20px;
+	position: absolute;
+	top: -12px;
+	left: 100px;
+}
+.initial_right_hand{
+	background: url("images/hand.png") no-repeat;
+	width: 30px;
+	height: 20px;
+	position: absolute;
+	top: -12px;
+	right: -112px;
+}
+.left_handing{
+	background: url("images/left-handing.png") no-repeat;
+	width: 30px;
+	height: 20px;
+	position: absolute;
+	top: -24px;
+	left: 139px;
+}
+.right_handinging{
+	background: url("images/right_handing.png") no-repeat;
+	width: 30px;
+	height: 20px;
+	position: absolute;
+	top: -21px;
+	left: 210px;
+}
+
+</STYLE>
+     
+<SCRIPT type="text/javascript">
+$(function(){
+	//得到焦点
+	$("#password").focus(function(){
+		$("#left_hand").animate({
+			left: "150",
+			top: " -38"
+		},{step: function(){
+			if(parseInt($("#left_hand").css("left"))>140){
+				$("#left_hand").attr("class","left_hand");
+			}
+		}}, 2000);
+		$("#right_hand").animate({
+			right: "-64",
+			top: "-38px"
+		},{step: function(){
+			if(parseInt($("#right_hand").css("right"))> -70){
+				$("#right_hand").attr("class","right_hand");
+			}
+		}}, 2000);
+	});
+	//失去焦点
+	$("#password").blur(function(){
+		$("#left_hand").attr("class","initial_left_hand");
+		$("#left_hand").attr("style","left:100px;top:-12px;");
+		$("#right_hand").attr("class","initial_right_hand");
+		$("#right_hand").attr("style","right:-112px;top:-12px");
+	});
+});
+</SCRIPT>
+ 
+<BODY>
+
+<DIV class="top_div">
+    <h1 align="center"><div style="margin-top:100px;"></div></h1></DIV>
+<DIV style="background: rgb(255, 255, 255); margin: -250px auto auto ; margin-left: 66%; border: 1px solid rgb(231, 231, 231); border-image: none; width: 400px; height: 200px; text-align: center;">
+<DIV style="width: 165px; height: 96px; position: absolute;">
+<DIV class="tou"></DIV>
+<DIV class="initial_left_hand" id="left_hand"></DIV>
+<DIV class="initial_right_hand" id="right_hand"></DIV></DIV>
+<form action="SportServlet?method=login" method="post" >
+<P style="padding: 30px 0px 10px; position: relative;"><SPAN 
+class="u_logo"></SPAN>         <INPUT class="ipt" name = "name" type="text" placeholder="请输入用户名或邮箱" value=""> 
+    </P>
+<P style="position: relative;"><SPAN class="p_logo"></SPAN>         
+<INPUT class="ipt" name="pass" type="password" placeholder="请输入密码" value="">   
+  </P>
+  <p><font color="red">${requestScope.error}</font></p>
+<DIV style="height: 50px; line-height: 50px; margin-top: 30px; border-top-color: rgb(231, 231, 231); border-top-width: 1px; border-top-style: solid;">
+<P style="margin: 0px 35px 20px 45px;"><SPAN style="float: left;">
+	<select type="option; text-align:center;"style="height:30px;" name="type">
+		<option value="1">运动员</option>
+		<option value="2">管理员</option>
+	</select>
+              <input style="background: rgb(0, 142, 173); padding: 7px 10px; border-radius: 4px; border: 1px solid rgb(26, 117, 152); border-image: none; color: rgb(255, 255, 255); font-weight: bold;" 
+value="登录" type="submit"/>
+           </SPAN>         </P></DIV></DIV>
+		   <div style="text-align:center;">
+
+</form>
+</div></BODY></HTML>

+ 55 - 0
WebRoot2/player_gl.jsp

@@ -0,0 +1,55 @@
+<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%
+String path = request.getContextPath();
+String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <base href="<%=basePath%>">
+    
+    <title>My JSP 'updateuser.jsp' starting page</title>
+    
+	<meta http-equiv="pragma" content="no-cache">
+	<meta http-equiv="cache-control" content="no-cache">
+	<meta http-equiv="expires" content="0">    
+	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
+	<meta http-equiv="description" content="This is my page">
+	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.css">
+	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.1.0.min.js"></script>
+	<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
+  </head>
+  
+  <body>
+    <body>
+	<div class="panel-body" style="padding-bottom:0px;">
+	<h2>运动员信息管理</h2>
+		<table id="tb_departments"  class="table table-bordered">
+	<thead>
+		<tr>
+			<th align="center">序号</th>
+			<th align="center">编号</th>
+			<th align="center">运动员姓名</th>
+			<th align="center">运动员性别</th>
+			<th align="center">运动员所在单位</th>
+			<th>操作</th>
+		</tr>
+	</thead>
+	<tbody>
+		<c:forEach items="${list}" var="sc" varStatus="num">
+  		<tr>	<td>${num.count}</td>
+  		        <td>${sc.id}</td>
+				<td>${sc.name}</td>
+				<td>${sc.sex}</td>
+				<td>${sc.area}</td>
+				<td align="center"><a href="SportServlet?method=edit_player&id=${sc.id}" class="btn btn-info btn-sm">编辑</a>
+				<a href="SportServlet?method=delete_player&id=${sc.id}" class="btn btn-danger btn-sm" onclick="return window.confirm('确认要删除?')">删除</a></td>
+   		</tr>
+   		</c:forEach>
+	</tbody>
+		</table>
+	</div>
+  </body>
+</html>