treasure.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:5k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8" %>
  2. <%@ page import="java.util.*"%>
  3. <%@ page import="cn.js.fan.db.Conn"%>
  4. <%@ page import="cn.js.fan.util.*"%>
  5. <%@ page import="cn.js.fan.web.*"%>
  6. <%@ page import="com.redmoon.forum.plugin.*"%>
  7. <%@ page import="com.redmoon.forum.plugin.entrance.*"%>
  8. <%@ page import="com.redmoon.forum.*"%>
  9. <%@ page import="com.redmoon.forum.person.*"%>
  10. <%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="lt" %>
  11. <%
  12. String skincode = UserSet.getSkin(request);
  13. if (skincode.equals(""))
  14. skincode = UserSet.defaultSkin;
  15. SkinMgr skm = new SkinMgr();
  16. Skin skin = skm.getSkin(skincode);
  17. if (skin==null)
  18. skin = skm.getSkin(UserSet.defaultSkin);
  19. String skinPath = skin.getPath();
  20. //seo
  21. com.redmoon.forum.util.SeoConfig scfg = new com.redmoon.forum.util.SeoConfig();
  22. String seoTitle = scfg.getProperty("seotitle");
  23. String seoKeywords = scfg.getProperty("seokeywords");
  24. String seoDescription = scfg.getProperty("seodescription");
  25. String seoHead = scfg.getProperty("seohead");
  26. %>
  27. <jsp:useBean id="StrUtil" scope="page" class="cn.js.fan.util.StrUtil"/>
  28. <html><head>
  29. <title><lt:Label res="res.label.forum.treasure" key="treasure"/> - <%=Global.AppName%> <%=seoTitle%></title>
  30. <%=seoHead%>
  31. <META name="keywords" content="<%=seoKeywords%>">
  32. <META name="description" content="<%=seoDescription%>">
  33. <meta http-equiv="pragma" content="no-cache">
  34. <link href="<%=skinPath%>/skin.css" rel="stylesheet" type="text/css">
  35. <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
  36. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  37. <script language="JavaScript">
  38. <!--
  39. //-->
  40. </script>
  41. <style type="text/css">
  42. <!--
  43. .style1 {
  44. font-size: 14px;
  45. font-weight: bold;
  46. }
  47. -->
  48. </style>
  49. <body bgcolor="#FFFFFF" topmargin='0' leftmargin='0'>
  50. <%@ include file="inc/header.jsp"%>
  51. <jsp:useBean id="privilege" scope="page" class="com.redmoon.forum.Privilege"/>
  52. <%
  53. String op = ParamUtil.get(request, "op");
  54. %>
  55. <br>
  56. <table width="98%" height="227" border='0' align="center" cellpadding='0' cellspacing='0' class="frame_gray">
  57.   <tr> 
  58.     <td height=20 align="center" class="thead"><span class="style1"><lt:Label res="res.label.forum.treasure" key="treasure"/></span></td>
  59.   </tr>
  60.   <tr> 
  61.     <td valign="top"><br>
  62.       <br>
  63.       <table width="92%"  border="0" align="center" cellpadding="0" cellspacing="0">
  64.         <%
  65. TreasureMgr em = new TreasureMgr();
  66. Vector v = em.getAllTreasure();
  67. Iterator ir = v.iterator();
  68. TreasureUnit tu;
  69. int i = 0;
  70. while (ir.hasNext()) {
  71. %>
  72.         <tr align="center">
  73.           <td height="24">
  74.             <%
  75. for (i=0; i<3; i++) {
  76. if (ir.hasNext()) {
  77. tu = (TreasureUnit)ir.next();
  78. %>
  79. <table width="32%"  border="1" align="left" cellpadding="1" cellspacing="0" bordercolor="<%=skin.getTableBorderClr()%>">
  80.               <tr>
  81.                 <td height="24" colspan="2" align="center" class="td_title"><%=tu.getName()%></td>
  82.               </tr>
  83.               <tr align="center">
  84.                 <td height="22" colspan="2" bgcolor="#FFFFFF"><%=tu.getDesc()%></td>
  85.               </tr>
  86.               <tr>
  87.                 <td width="48%" height="130" rowspan="3" align="center" bgcolor="#FFFFFF">
  88. <img src="<%=tu.getImage()%>">
  89. </td>
  90.               <td width="52%" height="55" valign="top" bgcolor="#FFFFFF">
  91.   <lt:Label res="res.label.forum.treasure" key="buy_point"/><br>
  92.   <%
  93.   Vector pricev = tu.getPrice();
  94.   Iterator pir = pricev.iterator();
  95.   ScoreMgr sm = new ScoreMgr();
  96.   while (pir.hasNext()) {
  97.    TreasurePrice tp = (TreasurePrice)pir.next();
  98.    ScoreUnit su = sm.getScoreUnit(tp.getScoreCode());
  99. out.print(su.getName() + ":" + tp.getValue());
  100.   } 
  101.   %>
  102.               <br>
  103.               <lt:Label res="res.label.forum.treasure" key="day_count"/><%=tu.getDay()%>
  104. </td>
  105.               </tr>
  106.               <tr>
  107.                 <td height="22" bgcolor="#FFFFFF"><lt:Label res="res.label.forum.treasure" key="store_count"/><%=tu.getCount()%></td>
  108.               </tr>
  109.               <tr>
  110.                 <td height="22" bgcolor="#FFFFFF">
  111. <a href="treasure_buy.jsp?code=<%=StrUtil.UrlEncode(tu.getCode())%>"><lt:Label res="res.label.forum.treasure" key="buy"/></a>
  112. <%if (tu.getCount()>0) {%>
  113. <%}%>
  114. </td>
  115.               </tr>
  116.             </table>
  117. <table width="1%"  border="0" align="left" cellpadding="1" cellspacing="1">
  118.               <tr>
  119.                 <td>&nbsp;</td>
  120.               </tr>
  121.             </table>
  122. <% }
  123. else
  124. break;
  125. }%>
  126.   </td>
  127.         </tr>
  128. <tr><td height=5></td></tr>
  129.     <%}%>
  130.       </table></td>
  131.   </tr>
  132. </table>
  133. </td> </tr>             
  134.       </table>                                        
  135.        </td>                                        
  136.      </tr>                                        
  137.  </table> 
  138.  <%@ include file="inc/footer.jsp"%>                                       
  139. </body>                                        
  140. </html>                            
  141.