⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matchfriend.jsp

📁 针对网络跑步爱好者作为用户而开发的
💻 JSP
字号:
<%@ page language="java" pageEncoding="UTF-8"
	contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//Dtd html 4.0 transitional//EN">
<html>
	<head>
		<link href="<c:url value='/css/style.css' />" rel="stylesheet" type="text/css">
		<script type="text/javascript">
			function subPage(){
				var page=document.getElementById("page").value;
				document.forms.matchFriendForm.action='<c:url value='matchFriends.action' />?currentPage='+page;
				document.all("matchFriendForm").submit();	
			}
			function frontPage(){
				var page=document.getElementById("page").value;
				var num=parseInt(page)-1;
				document.forms.matchFriendForm.action='<c:url value='matchFriends.action' />?currentPage='+num;
				document.all("matchFriendForm").submit();	
			}
			function nextPage(){
				var page=document.getElementById("page").value;
				var num=parseInt(page)+1;
				document.forms.matchFriendForm.action='<c:url value='matchFriends.action' />?currentPage='+num;
				document.all("matchFriendForm").submit();	
			}
</script>
	</head>
	<body >
			<table width="760" border="0" style="margin:20px 0;" align="center"
				cellpadding="0" cellspacing="0" >
				<tr>
					<td colspan="3">
						<table cellpadding="0" cellspacing="0" width="100%" height="62">
							<tr>
								<td background="<c:url value='/images/tab01.gif' />" width="309" valign="top">
									<div class="tabhead">
										好友速配
									</div>
								</td>
								<td valign="bottom">
									<table cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td background="<c:url value='/images/topcenter.gif' />" width="100%"></td>
											<td><img src="<c:url value='/images/topright.gif' />"></td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td background="<c:url value='/images/centerleft.gif' />"></td>
					<td width="100%">
						<form action="<c:url value='matchFriends.action' />" method="post" name="matchFriendForm">
						<table width="100%" border="0" cellspacing="1" cellpadding="3"
							align="center">
							<tr>
								<td bgcolor="#fff5d6" align="left" height="35" colspan="4">
									<li>
										<b>找到您跑步世界的另一半,您可以<a href="<c:url value='matchOneFriend.action' />">马上速配</a>一位跑友</b>
									</li>
								</td>
							</tr>
							<tr>
								<td bgcolor="#cccccc"  height="3" colspan="4"></td>
							</tr>
							<tr>
								<td bgcolor="#e6ffd6" align="left" height="35" colspan="4">
									<li>
										<b>更可以按要求检索</b>
									</li>
								</td>
							</tr>
							<tr>
								<td bgcolor="#cccccc"  height="3" colspan="4"></td>
							</tr>
							<tr bgcolor="#fff5d6">
         						 <td align="center">年龄范围:
         						 	<select name="age">
                  						<c:choose>
                  							<c:when test="${requestScope.age=='1'}">
                  								<option value="1" selected>10-19岁</option>
                  								<option value="2">20-29岁</option>
                  								<option value="3">30-39岁</option>
                  								<option value="unlimited">不限</option>
                  							</c:when>
                  							<c:when test="${requestScope.age=='2'}">
                  								<option value="1">10-19岁</option>
                  								<option value="2" selected>20-29岁</option>
                  								<option value="3">30-39岁</option>
                  								<option value="unlimited">不限</option>
                  							</c:when>
                  							<c:when test="${requestScope.age=='3'}">
                  								<option value="1">10-19岁</option>
                  								<option value="2">20-29岁</option>
                  								<option value="3" selected>30-39岁</option>
                  								<option value="unlimited">不限</option>
                  							</c:when>
                  							<c:otherwise>
                  								<option value="1">10-19岁</option>
                  								<option value="2">20-29岁</option>
                  								<option value="3">30-39岁</option>
                  								<option value="unlimited" selected>不限</option>
                  							</c:otherwise>
                  						</c:choose>
                    				</select>
                    			</td>
           						<td align="center">性别:
                					<select name="gender">
                						<c:choose>
                							<c:when test="${requestScope.gender=='0'}">
                								<option value="0" selected>男</option>
              									<option value="1">女</option>
               									<option value="unlimited">不限</option>
                							</c:when>
                							<c:when test="${requestScope.gender=='1'}">
                								<option value="0">男</option>
              									<option value="1" selected>女</option>
               									<option value="unlimited">不限</option>
                							</c:when>
                							<c:otherwise>
                								<option value="0">男</option>
              									<option value="1">女</option>
               									<option value="unlimited" selected>不限</option>
                							</c:otherwise>
                						</c:choose>
                					</select>
                				</td>
                				<td align="center">所在省/城市:
                					<select name="provinceCity">
                						<c:choose>
                							<c:when test="${requestScope.provinceCity=='1'}">
                								<option value="1" selected>北京</option>
                    							<option value="2">上海</option>
                    							<option value="3">天津</option>
                    							<option value="unlimited">不限</option>
                							</c:when>
                							<c:when test="${requestScope.provinceCity=='2'}">
                								<option value="1">北京</option>
                    							<option value="2" selected>上海</option>
                    							<option value="3">天津</option>
                    							<option value="unlimited">不限</option>
                							</c:when>
                							<c:when test="${requestScope.provinceCity=='3'}">
                								<option value="1">北京</option>
                    							<option value="2">上海</option>
                    							<option value="3" selected>天津</option>
                    							<option value="unlimited">不限</option>
                							</c:when>
                							<c:otherwise>
                								<option value="1">北京</option>
                    							<option value="2">上海</option>
                    							<option value="3">天津</option>
                    							<option selected="selected" value="unlimited">不限</option>
                							</c:otherwise>
                						</c:choose>
                    				</select> 
                    			</td>
                    			<td align="center">
            						<input type="submit" name="Submit2" value="开始检索" />                 
          						</td>
         					</tr>
         					<tr>
								<td bgcolor="#cccccc"  height="3" colspan="4"></td>
							</tr>
						</table>
						</form>
						<table width="100%" border="0" cellspacing="1" cellpadding="3"
							align="center">
							<c:if test="${requestScope.runFriend!=null}">
								<c:forEach items="${requestScope.runFriend}" var="friend">
								<tr bgcolor="92bff2" height="25">
									<td width="20%" align="center">${friend.nickName}</td>
									<td width="20%" align="center">
										<c:choose>
											<c:when test="${friend.gender=='0'}">
											</c:when>
											<c:otherwise>女</c:otherwise>
										</c:choose>
									</td>
									<td width="20%" align="center">${friend.age}</td>
									<td width="20%" align="center">
										${friend.provinceCity.name}
									</td>
									<td width="20%" align="center">
										<a href="<c:url value='createMessage.action' />?receiver=${friend.nickName}">发送短信</a>
									</td>
								</tr>
							</c:forEach>
							<tr>
								<td colspan="5" align="right">
									<span class="fontred">${requestScope.matchFriends_TotalNum}</span> 条信息 当前第
									<span class="fontred">${requestScope.currentPage}</span> 页 共有
									<span class="fontred">${requestScope.matchFriends_TotalPage}</span> 页
									<c:choose>
               							<c:when test="${requestScope.currentPage==1}">
               								<c:choose>
               									<c:when test="${requestScope.matchFriends_TotalPage==1}" >
               										上一页/下一页
               									</c:when>	
               									<c:otherwise>
               										上一页/<a href="#" onclick="javascript:nextPage();">下一页</a>
               									</c:otherwise>
               								</c:choose>
            							</c:when>
             		  					<c:when test="${requestScope.currentPage==requestScope.matchFriends_TotalPage}">
              		 						<a href="#" onclick="javascript:frontPage();">上一页</a>/下一页
              	   						</c:when>
	      	   	   						<c:otherwise>
	      				 					<a href="#" onclick="javascript:frontPage();">上一页</a>/<a href="#" onclick="javascript:nextPage();">下一页</a>
	               						</c:otherwise>
                					</c:choose>
                					转到
                					 <select name="select" id="page" onchange="subPage();" style="width: 50;height: 25">
                					 	<c:forEach begin="1" end="${requestScope.matchFriends_TotalPage}" var="num">
                					 		<c:choose>
                					 			<c:when test="${requestScope.currentPage==num}">
                					 				<option value="${num}" selected>${num}</option>
                					 			</c:when>
                					 			<c:otherwise>
                					 				<option value="${num}" >${num}</option>
                					 			</c:otherwise>
                					 		</c:choose>
                					 	</c:forEach>
                					 </select>
								</td>
							</tr>
							</c:if>
						</table>
					</td>
					<td background="<c:url value='/images/centeright.gif' />"></td>
				</tr>
				<tr>
					<td>
						<img src="<c:url value='/images/bottomleft.gif' />" />
					</td>
					<td background="<c:url value='/images/bottomcenter.gif' />"></td>
					<td>
						<img src="<c:url value='/images/bottomright.gif' />" />
					</td>
				</tr>
			</table>
	</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -