📄 pethome.jsp
字号:
<%@ taglib prefix="bean" uri="/WEB-INF/struts-bean.tld" %><%@ taglib prefix="logic" uri="/WEB-INF/struts-logic.tld" %><%@ taglib prefix="html" uri="/WEB-INF/struts-html.tld" %><%@ page language="java" pageEncoding="GB18030"%><%@ include file="inc.jsp" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>我的宝贝</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <script type="text/javascript" src="calc/calendar.js"></script> <script type="text/javascript" src="calc/calendar-en.js"></script> <link type="text/css" rel="stylesheet" href="calc/calendar-system.css"/> <link rel="stylesheet" type="text/css" href="styles.css"> <script > function doLogin() { document.forms[0].action = "petinfo.do"; document.forms[0].elements["operate"].value = "login"; document.forms[0].submit(); } function searchPet() { document.forms[0].action = "petinfo.do"; document.forms[0].elements["operate"].value = "toList"; document.forms[0].submit(); } function searchDiary() { document.forms[0].action = "petDiary.do"; document.forms[0].elements["operate"].value = "toList"; document.forms[0].submit(); } </script> <script language="JavaScript"> // calendar ///////////////////////////////////////////////////////////////// // var calendar = null; function calSelected(cal, date) { cal.sel.value = date; var updateFlexElements = document.getElementsByName('updateF' + cal.sel.name.substring(1)); if ((typeof updateFlexElements != "undefined") && (updateFlexElements.length > 0)) { var elem = updateFlexElements[0]; if (elem.type == "checkbox") { elem.checked = true; } } cal.callCloseHandler(); } // calSelected function calCloseHandler(cal) { cal.hide(); } // calCloseHandler function calShow(id) { var el = document.getElementById(id); if (calendar != null) { calendar.hide(); // hide the existing calendar calendar.parseDate(el.value); // set it to a new date } else { var cal = new Calendar(false, null, calSelected, calCloseHandler); var now = new Date(); calendar = cal; //calendar.setDateFormat('mm/dd/y'); calendar.setDateFormat('y-mm-dd'); calendar.setRange(now.getFullYear() - 10, now.getFullYear() + 10); calendar.weekNumbers = false; calendar.create(); } calendar.sel = el; calendar.showAtElement(el); //calendar.addEvent(document, "mousedown", checkCalendar); return false; } // calShow </script> </head> <body> <font color="red">${ex.message}</font> <form name="petForm" method="post" action="petinfo.do"> <input type="hidden" name="operate" value="toIndex"> <div class="main_div"> <h1>我的宝贝儿</h1> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="450"> </td> <td rowspan="2" style="background-color:pink;text-align:right;"> <logic:notEmpty name="petinfo" scope="session"> <a href="petinfo.do?operate=petDetail">训练${sessionScope.petinfo.petName}</a> </logic:notEmpty> 宠物名<input type="text" name="petName" size="6" value=""> 密码<input type="password" name="password" size="6" value=""> <button onclick="javascript:doLogin();">登录</button> </td> </tr> <tr> <td style="background-color:pink;"> <a href="adopt.jsp">领养宠物</a> </td> </tr> </table> </div> <div class="main_div"> <table><tr> <td> <table style="border:solid 1px black;" height="200px" width="500px"> <tr> <th colspan="2" style="background-color:gray;height:20px;"> 金宝宝排行 </th> </tr> <tr> <td width="200px"> <img src="${list1[0].petPic}" width="200px" height="140px" /><br /> ${list1[0].petName } (${typeMap[list1[0].petType]} -${list1[0].petStrength+list1[0].petCute+list1[0].petLove} -${list1[0].petOwnerName})<br /> [力量:${list1[0].petStrength}; 能力:${list1[0].petCute}; 爱心:${list1[0].petLove}] </td> <td> <logic:present name="list1"> <logic:iterate id="pet" name="list1" length="10"> <li> <bean:define id="id" name="pet" property="petId"/> <a href="petinfo.do?operate=petDetail&id=<%=id%>"> <bean:write name="pet" property="petName"/> <bean:define id="Strength" name="pet" property="petStrength" type="Integer"/> <bean:define id="Cute" name="pet" property="petCute" type="Integer"/> <bean:define id="Love" name="pet" property="petLove" type="Integer"/> </a> (<bean:define id="type" name="pet" property="petType"/><%=typeMap.get(type) %> - <%=(Strength.intValue()+Cute.intValue()+Love.intValue()) %> - <bean:write name="pet" property="petOwnerName"/>) </li> </logic:iterate> </logic:present><br> <a href="petinfo.do?operate=toList&orderby=petStrength%2BpetCute%2BpetLove+desc">更多>></a> </td> </tr> </table> </td> <td valign="top"> <table style="border:solid 1px black;height:20px;" height="200px" width="300px"> <tr> <th colspan="1" style="background-color:gray;"> 查找 </th> </tr> <tr> <td valign="top" style="height:182px;"> 宠物名 <input type="text" name="petName" size="10" value=""><br /> 宠物类别 <select name="petType"> <option value="">全部...</option> <logic:iterate id="type" collection="<%=typeMap %>"> <option value="<bean:write name="type" property="key"/>"> <bean:write name="type" property="value"/> </option> </logic:iterate> </select> <br /> 主人 <input type="text" name="petOwnerName" size="10" value=""> <button onclick="javascript:searchPet();">查找宠物</button> <br /><br /> 标题 <input name="diaryTitle" size="10" /><br /> 作者 <input name="diaryAuthor" size="10" /><br /> 日期 <input onclick="calShow('diaryDateStr');" name="diaryDateStr" size="10"/> <br /> 关键字 <input name="diaryContext" size="10" /> <button onclick="javascript:searchDiary();">查找日记</button> <br /> </td> </tr> </table> </td> </tr></table> </div> <div class="main_div"> <table><tr> <td> <table style="border:solid 1px black;height:20px;" height="200px" width="200px"> <tr> <th colspan="1" style="background-color:gray;"> 最新宠物日记 </th> </tr> <tr> <td valign="top"> <logic:present name="list2"> <logic:iterate id="diary" name="list2" length="10"> <li> <bean:define id="id" name="diary" property="diaryId"/> <a href="petDiary.do?operate=toDetail&id=<%=id %>" > <bean:write name="diary" property="diaryTitle"/> </a>(<bean:write name="diary" property="diaryAuthor"/> ,<bean:write name="diary" property="diaryDate" format="yy-MM-dd"/>) </li> </logic:iterate> </logic:present><br> <a href="petDiary.do?operate=toList&orderby=diaryDate+desc">更多>></a> </td> </tr> </table> </td> <td> <table style="border:solid 1px black;height:20px;" height="200px" width="200px"> <tr> <th colspan="1" style="background-color:gray;"> 最活力宝贝 </th> </tr> <tr> <td valign="top"> <logic:present name="list3"> <logic:iterate id="pet" name="list3" length="10"> <li> <bean:define id="id" name="pet" property="petId"/> <a href="petinfo.do?operate=petDetail&id=<%=id%>"> <bean:write name="pet" property="petName"/> <bean:define id="Strength" name="pet" property="petStrength" type="Integer"/> <bean:define id="Cute" name="pet" property="petCute" type="Integer"/> <bean:define id="Love" name="pet" property="petLove" type="Integer"/> </a> (<%=(Strength.intValue()+Cute.intValue()+Love.intValue()) %>) </li> </logic:iterate> </logic:present> <br /> <a href="petinfo.do?operate=toList&orderby=petStrength+desc">更多>></a> </td> </tr> </table> </td> <td> <table style="border:solid 1px black;height:20px;" height="200px" width="200px"> <tr> <th colspan="1" style="background-color:gray;"> 最聪明宝贝 </th> </tr> <tr> <td valign="top"> <logic:present name="list4"> <logic:iterate id="pet" name="list4" length="10"> <li> <bean:define id="id" name="pet" property="petId"/> <a href="petinfo.do?operate=petDetail&id=<%=id%>"> <bean:write name="pet" property="petName"/> <bean:define id="Strength" name="pet" property="petStrength" type="Integer"/> <bean:define id="Cute" name="pet" property="petCute" type="Integer"/> <bean:define id="Love" name="pet" property="petLove" type="Integer"/> </a> (<%=(Strength.intValue()+Cute.intValue()+Love.intValue()) %>) </li> </logic:iterate> </logic:present> <br /> <a href="petinfo.do?operate=toList&orderby=petCute+desc">更多>></a> </td> </tr> </table> </td> <td> <table style="border:solid 1px black;height:20px;" height="200px" width="200px"> <tr> <th colspan="1" style="background-color:gray;"> 最可爱宝贝 </th> </tr> <tr> <td valign="top"> <logic:present name="list5"> <logic:iterate id="pet" name="list5" length="10"> <li> <bean:define id="id" name="pet" property="petId"/> <a href="petinfo.do?operate=petDetail&id=<%=id%>"> <bean:write name="pet" property="petName"/> <bean:define id="Strength" name="pet" property="petStrength" type="Integer"/> <bean:define id="Cute" name="pet" property="petCute" type="Integer"/> <bean:define id="Love" name="pet" property="petLove" type="Integer"/> </a> (<%=(Strength.intValue()+Cute.intValue()+Love.intValue()) %>) </li> </logic:iterate> </logic:present> <br /> <a href="petinfo.do?operate=toList&orderby=petLove+desc">更多>></a> </td> </tr> </table> </td> </tr></table> </div> <hr size="1" width="800px" color="black"/> <div class="main_div" style="border-width:0;text-align:right;"> copyright © 2007 北京阿博泰克北大青鸟信息技术有限公司 </div> </form> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -