wnl2.jsp
13.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@page import="weaver.general.WeatherData"%>
<%@page import="java.util.List"%>
<%@page import="weaver.general.WeatherObj"%>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<%
%>
<%@page import="java.util.ArrayList"%>
<%@page import="weaver.general.Util"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>我的日历</title>
<script language="javascript" type="text/javascript" src="lunar_wev8.js"></script>
<script language="javascript" type="text/javascript" src="index_wev8.js"></script>
<style>
*{
border:0;
padding:0;
font-family: "宋体",Helvetica, sans-serif !important;
}
body{
background: transparent;
}
a{
text-decoration: none;
}
#fd{display:none;position:absolute;border:1px solid #dddddf;background:#feffcd;padding:10px;line-height:21px;width:150px}
#fd b{font-weight:normal;color:#c60a00}
.ldays {
z-index:1000;
border-collapse:collapse; /* 关键属性:合并表格内外边框(其实表格边框有2px,外面1px,里面还有1px哦) */
border:solid #bbb; /* 设置边框属性;样式(solid=实线)、颜色(#999=灰) */
border-width:1px 0 0 1px; /* 设置边框状粗细:上 右 下 左 = 对应:1px 0 0 1px */
TABLE-LAYOUT:fixed;word-break:break-all;
}
.ldays caption {font-size:14px;font-weight:bolder;}
.ldays th,.ldays td {border:solid #bbb;border-width:0 1px 1px 0;padding:0;}
.ldays td span{display:block;padding-left:4px;font-size:12px;color:#c2c2c2;}
.ldays tfoot td {text-align:center;}
.ldays .th {background:url(table-head_wev8.gif) repeat-x;height:25px !important;text-align:center;}
#cm .dayEn{font-size:18px !important;font-weight:bold;text-align:right;padding-right:4px;color:#444;}
.ldays a{display:block;margin:0;padding:0;text-decoration:none;color:rgb(0,102,204) !important;border:2px solid #fff;}
.ldays a:hover{border:2px solid red;}
.ldays .fred{color:#23479a;}
.ldays .active{clear:all;color:#fff !important;background:#ffaaaa;border-color:#ffaaaa; }
.ldays .active .dayEn{
color:#fff !important;
}
.ldays .active span{
color:#fff !important;
}
select{width:80px;height:20px;border-color:#cfdbe3 }
input{border-color:#cfdbe3;}
#header{color:white;height:37px;border:1px solid #cfdbe3;border-left: 0;border-right: 0; }
#header .header_in{height: 35px;border:1px solid #f9fbfc;background:#e9eff3;border-left: 0;border-right: 0;}
#top_date{padding:7px 0 0 12px;float:left;width:200px;}
#title{float:left;width:134px;}
#top_toolbar{float:left;width:250px;padding-top:7px;}
#top_toolbar .btnDate_noClick{background:url(btn_wev8.png) no-repeat;height:23px;cursor:pointer;}
#top_toolbar .btnYearSub{width:48px;}
#top_toolbar .btnMonthSub{width:48px;background-position:-48px 0px;}
#top_toolbar .btnMonthAdd{width:48px;background-position:-96px 0px;}
#top_toolbar .btnYearAdd{width:48px;background-position:-144px 0px;}
#top_toolbar .btnToday{width:26px;background-position:-192px 0px;}
#content{width:600px;}
#content .calendar_main{padding:10px 8px 0 10px;}
#content .calendar_table{width:400px;float:left;height:300px;}
#content .ltop{
height:34px;border:1px solid #cfdbe3; border-bottom:0;
}
#content .ltop_in{
height:33px;background:#e9eff3 ;border:1px solid white;border-bottom: 0;border-left: 0;border-right: 0;
}
</style>
</head>
<body onload="init()">
<div style="width:600px">
<div id="header" >
<div class="header_in">
<div id="top_date" class="top_date">
<span>
<select></select>
<select></select>
</span>
</div>
<div id="title"> </div>
<div id="top_toolbar">
<input type="button" class="btnDate_noClick btnYearSub " onmouseover="">
<input type="button" class="btnDate_noClick btnMonthSub">
<input type="button" class="btnDate_noClick btnMonthAdd">
<input type="button" class="btnDate_noClick btnYearAdd">
<input type="button" class="btnDate_noClick btnToday">
</div>
</div>
</div>
<div id="content" >
<div class="calendar_main">
<div class="calendar_table">
<div class="calendar_table2">
<div class="ltop" id="c_top" >
<div class="ltop_in">
<div style="float:left;width:160px;line-height:33px;color:#8ba4b4;padding-left:10px;" class="top_time">
<font color="#036ebe" face="Verdana" id="nowTime">2000年0月0日 00:00:00</font>
</div>
<div style="float:right;line-height:33px;display:none;color:#8ba4b4;">
<font size="2" id="ganzhi"></font>
</div>
<div id="lunar_info" style="float:right;padding-right:10px;line-height: 33px;color:#8ba4b4;"></div>
</div>
</div>
<table width="400px" height="256px" cellpadding=0 cellspacing=0 id="cm" class="ldays">
</table>
<div id="bm"></div>
</div>
</div>
<div style="float:left;width:164px;margin-left:10px;height:294px;background: url(wea_wev8.png) no-repeat;color: white;">
<div style="height:220px;">
<div style="height:36px;padding-left:10px;">
<div style="line-height: 36px;" id="cityArea">
<div style="width:120px;float:left;">
<span id="city" ></span>
</div>
<div style="width:30px;float:left;">
<a href="javascript:void(0)" onclick="citySetting()"><%=SystemEnv.getHtmlLabelName(22250,user.getLanguage()) %></a>
</div>
</div>
<div style="padding:0;display:none;line-height: 36px;" id="citySettingArea">
<input type="text" id="t_cityName" name="cityName" style="margin:0;width:100px;" onkeyup="this.value=this.value.replace(/[^a-z_-]/g,'')"/> <input type="button" value="<%=SystemEnv.getHtmlLabelName(86,user.getLanguage()) %>" onclick="javascript:saveCity()" style="height:20px;width:40px">
</div>
</div>
<div style="height:96px;background-repeat: no-repeat;padding-left:10px;" id="conditionArea" >
<img alt="" id="conditionImg" src="/calendar/icon/qing_wev8.png" height="96px">
<div style="text-align:right;padding-right:10px; position: relative;margin-top: -96px;" id="w_condition"></div>
</div>
<div style="padding: 10px 0 0 10px;">
<span style="display:block; line-height: 20px;"><%=SystemEnv.getHtmlLabelName(5001,user.getLanguage()) %>:<span id="w_low"></span>℃~<span id="w_high"></span>℃</span>
<span style="display:table;line-height: 20px;TABLE-LAYOUT:fixed;word-break:break-all;" id="w_windCondition"></span>
<span style="display:block;line-height: 20px;" id="w_humidity"></span>
</div>
</div>
<div style="padding:4px;" id="w_forecast">
</div>
</div>
</div>
<div style="clear:both;height:36px;line-height:36px;border-top:1px solid #cfdbe3;border-bottom:1px solid #cfdbe3;">
<div style="height:34px;border-top:1px solid #fff;border-bottom:1px solid #fff;background:#e9eff3;padding:0 10px 0 10px;">
<div style="float:left;width:290px;">
<%=SystemEnv.getHtmlLabelName(26282,user.getLanguage()) %>:
<select onchange="changeWorldClock()" id="worldTime" style="width:220px;">
<option value="-12" selected="selected">国际换日线</option>
<option value="-11">萨摩亚</option>
<option value="-10">夏威夷</option>
<option value="-9">阿拉斯加</option>
<option value="-8">太平洋</option>
<option value="-7">美国山区</option>
<option value="-7">美加山区</option>
<option value="-6">加拿大中部</option>
<option value="-6">墨西哥</option>
<option value="-6">美加中部</option>
<option value="-5">南美洲太平洋</option>
<option value="-5">美加东部</option>
<option value="-5">美东</option>
<option value="-4">南美洲西部</option>
<option value="-4">大西洋</option>
<option value="-3.3">纽芬兰</option>
<option value="-3">东南美洲</option>
<option value="-3">南美洲东部</option>
<option value="-2">大西洋中部</option>
<option value="-1">亚速尔</option>
<option value="0">英国夏令</option>
<option value="0">格林威治标准</option>
<option value="1">罗马</option>
<option value="1">中欧</option>
<option value="1">西欧</option>
<option value="2">以色列</option>
<option value="2">东欧</option>
<option value="2">埃及</option>
<option value="2">GFT</option>
<option value="2">南非</option>
<option value="3">沙乌地阿拉伯</option>
<option value="3">俄罗斯</option>
<option value="3.3">伊朗</option>
<option value="4">阿拉伯</option>
<option value="4.3">阿富汗</option>
<option value="5">西亚</option>
<option value="5.3">印度</option>
<option value="6">中亚</option>
<option value="7">曼谷</option>
<option value="8" selected="selected">中国</option>
<option value="9">东京</option>
<option value="9.3">澳洲中部</option>
<option value="10">席德尼</option>
<option value="10">塔斯梅尼亚</option>
<option value="10">西太平洋</option>
<option value="11">太平洋中部</option>
<option value="12">纽西兰</option>
<option value="12">斐济</option>
</select>
</div>
<div id="worldTimeNow" style="float:right;color:#137fb8;font-weight: bold;"></div>
</div>
</div>
<div style="padding:0px 0px 10px 10px;overflow:auto;height:88px;overflow: hidden;display:none;">
<div style="display:none;">
<span id="lm_txt"></span><br>
<span style="font-size:14px;" id="date"></span>
<div id="lunar_info"></div>
<span>今天无人过生日</span>
</div>
</div>
</div>
</div>
<script type="text/javascript">if(typeof(setClock)!="undefined"){setClock();}</script>
<script id=calendar type=text/javascript src="calendar_wev8.js"></script>
</body>
</html>
<script type="text/javascript">
var request;
function createRequest() {
try {
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
request = false;
}
}
}
if (!request)
alert("Error initializing XMLHttpRequest!");
else{
return request;
}
}
createRequest();
window.onload=loadXml;
function loadXml(){
var request=createRequest();
var url="weatherXML.jsp?t="+new Date().getTime();
request.open("GET", url, true);
request.onreadystatechange = updatePage;
request.send(null);
}
function updatePage(){
if(request.readyState==4){
var jsonStr=eval('('+request.responseText+')');
$("conditionImg").setAttribute("src",jsonStr.icon);
$("city").innerText=decodeURI(jsonStr.city);
$("w_condition").innerText=decodeURI(jsonStr.condition);
$("w_low").innerText=decodeURI(jsonStr.low);
$("w_high").innerText=decodeURI(jsonStr.high);
$("w_windCondition").innerText=decodeURI(jsonStr.wind);
$("w_humidity").innerText=decodeURI(jsonStr.humidity);
var w_forecast="";
for(var i in jsonStr.forecast ){
w_forecast+="<div style='padding:1px;float:left;width:50px;height:60px;color:black;color:#137fb8;text-align:center;'><span style=’display:block;text-align:center;'>"+decodeURI(jsonStr.forecast[i].date)+"</span><img width='50px' alt=\"\" src=\""
+jsonStr.forecast[i].icon+
"\"><span style='display:block;text-align:center;font-size:12px;position:relative;margin-top:-18px;background:black;filter:alpha(opacity=30);opacity:30;color:#fff !important;'>"+
jsonStr.forecast[i].low+"~"+jsonStr.forecast[i].high+
"°</span></div>";
}
$("w_forecast").innerHTML =w_forecast.replace("+", " ");
}
}
function saveCity(){
$("citySettingArea").style.display="none";
$("city").innerText=$("t_cityName").value;
$("cityArea").style.display="block";
var request=createRequest();
var url2="weatherOpration.jsp?cityName="+encodeURI(encodeURI($("t_cityName").value))+"&t="+new Date().getTime();
request.open("GET", url2, true);
request.onreadystatechange = saveCityOn;
request.send(null);
}
function saveCityOn(){
if(request.readyState==4){
loadXml();
}
}
function citySetting(){
$("citySettingArea").style.display="block";
$("t_cityName").value=$("city").innerText;
$("cityArea").style.display="none";
}
</script>