DiaryR.jsp 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <%@ page language="java" contentType="text/html; charset=utf-8"
  2. pageEncoding="utf-8"%>
  3. <%
  4. String path = request.getContextPath();
  5. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  6. %>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" type="text/css"></link>
  12. <!--[if IE]>
  13. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-ie-scoped.css" type="text/css"></link>
  14. <![endif]-->
  15. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"></link>
  16. <style type="text/css">
  17. body{
  18. background-image: url("<%=basePath %>resource/images/screens/note.jpg");
  19. background-repeat: no-repeat;
  20. background-position:center top;
  21. height: 1000;
  22. }
  23. #thoughts{
  24. background-image: url("<%=basePath %>resource/images/screens/diary.png");
  25. background-repeat: no-repeat;
  26. background-position:right top;
  27. height: 150;
  28. color: #8B0A50;
  29. font-size: 18px;
  30. font-family: 隶书;
  31. }
  32. </style>
  33. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  34. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  35. <script type="text/javascript">
  36. /*日记界面*/
  37. Ext.onReady(function(){
  38. Ext.Ajax.request({
  39. url : basePath + 'common/singleFormItems.action',
  40. params: {
  41. caller: 'Diary',
  42. condition: getUrlParam('formCondition').replace(/IS/g, '=')
  43. },
  44. method : 'post',
  45. callback : function(options,success,response){
  46. var localJson = new Ext.decode(response.responseText);
  47. if(localJson.data){
  48. var diary = Ext.decode(localJson.data);
  49. if(diary != null){
  50. Ext.get('date').insertHtml('afterBegin', diary.di_time);
  51. Ext.get('weather').insertHtml('afterBegin',diary.di_weather);
  52. Ext.get('name').insertHtml('afterBegin', diary.di_name);
  53. Ext.get('thoughts').insertHtml('afterBegin', diary.di_thoughts);
  54. }
  55. } else {
  56. if(localJson.exceptionInfo){
  57. showError(localJson.exceptionInfo);
  58. window.location.href = basePath + 'jsps/error/e-500.jsp';
  59. }
  60. }
  61. }
  62. });
  63. });
  64. </script>
  65. </head>
  66. <body >
  67. <center><div class="main" align="center">
  68. <font color=#999;><span id="date"></span></font>&nbsp;&nbsp;&nbsp;
  69. 天气:<font color=#999;><span id="weather"></span></font>&nbsp;&nbsp;&nbsp;
  70. 姓名:<font color=#999;><span id="name"></span></font>&nbsp;&nbsp;&nbsp; <hr>
  71. <div id="thoughts"></div>
  72. </div></center>
  73. </body>
  74. </html>