TopTitle.jsp
3.88 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
<%@ page import="weaver.general.Util" %>
<%@ page import="java.net.*" %>
<%@ page import="weaver.hrm.*" %>
<jsp:useBean id="RecordSetFavourite" class="weaver.conn.RecordSet" scope="page"/>
<%
User user = HrmUserVarify.getUser (request , response) ;
if(user == null) return ;
String gopage = "";
String hostname = request.getServerName();
String uri = request.getRequestURI();
String querystring="";
titlename = Util.null2String(titlename) ;
String ajaxs="";
for(Enumeration En=request.getParameterNames();En.hasMoreElements();){
String tmpname=(String) En.nextElement();
if(tmpname.equals("ajax"))
{
ajaxs=tmpname;
continue;
}
String tmpvalue=Util.toScreen(request.getParameter(tmpname),user.getLanguage(),"0");
querystring+="^"+tmpname+"="+tmpvalue;
}
if(!querystring.equals(""))
querystring=querystring.substring(1);
if(!querystring.equals(""))
gopage = uri+"?"+querystring;
gopage = "http://"+hostname+"/main.jsp?gopage="+URLEncoder.encode(gopage);
//out.print(gopage);
String pagename= titlename ;
int start_1234567kick = titlename.indexOf("<a");
int end_1234567kick = titlename.indexOf("/a>");
while(start_1234567kick!=-1){
pagename = pagename.substring(0,start_1234567kick)+pagename.substring(end_1234567kick+3,pagename.length());
start_1234567kick = pagename.indexOf("<a");
end_1234567kick = pagename.indexOf("/a>");
}
session.setAttribute("fav_pagename" , pagename ) ;
session.setAttribute("fav_uri" , uri ) ;
session.setAttribute("fav_querystring" , querystring ) ;
int addFavSuccess=Util.getIntValue(session.getAttribute("fav_addfavsuccess")+"");
session.setAttribute("fav_addfavsuccess" , "" ) ;
%>
<DIV class=TopTitle style="margin:0 3px 0 3px">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 >
<TBODY>
<TR>
<%if(imagefilename != null && !imagefilename.equals("")){%>
<TD align=left width=55><IMG src="<%=imagefilename%>"></TD>
<%}%>
<TD align=left><SPAN id=BacoTitle ><%=titlename%></SPAN></TD>
<TD align=right> </TD>
<TD width=5></TD>
<TD align=middle width=24><BUTTON class=btnLittlePrint id=onPrint title="<%=SystemEnv.getHtmlLabelName(257,user.getLanguage())%>" onclick="javascript:window.print();" style="display:none"></BUTTON>
</TD>
<%
if(!needhelp.equals("")){
%>
<TD align=middle width=24><BUTTON class=btnHelp style="display:none"></BUTTON></TD>
<%
}
%>
<TD align=middle width=24><BUTTON class=btnBack id=onBack title="<%=SystemEnv.getHtmlLabelName(15408,user.getLanguage())%>" onclick="javascript:history.back();" style="display:none"></BUTTON>
</TD>
<td align="right">
<%
if(!ajaxs.equals("ajax")){
%> <BUTTON class=btnFavorite id=BacoAddFavorite
title="<%=SystemEnv.getHtmlLabelName(18753,user.getLanguage())%>" onclick="location.href='/systeminfo/FavouriteAdd.jsp'" ></BUTTON><%}%>
<img src="/images/help_wev8.gif" style="CURSOR:hand" width=12 onclick="javascript:showHelp()" title="<%=SystemEnv.getHtmlLabelName(275,user.getLanguage())%>"></td>
<td width="20"> </td >
</TR>
</TBODY>
</TABLE>
</DIV>
<script language=javascript>
/*
function addtofavorites(){
window.external.AddFavorite('<%=gopage%>', '<%=titlename%>');
}
*/
function showAddFavMsg(){
alert("<%=SystemEnv.getHtmlLabelName(18754,user.getLanguage())%>");
}
<%if(addFavSuccess==1){%>
showAddFavMsg();
<%}%>
function showHelp(){
var pathKey = this.location.pathname;
//alert(pathKey);
if(pathKey!=""){
pathKey = pathKey.substr(1);
}
var operationPage = "http://help.e-cology.com.cn/help/RemoteHelp.jsp";
//var operationPage = "http://localhost/help/RemoteHelp.jsp";
var screenWidth = window.screen.width*1;
var screenHeight = window.screen.height*1;
window.open(operationPage+"?pathKey="+pathKey,"_blank","top=0,left="+(screenWidth-800)/2+",height="+(screenHeight-90)+",width=800,status=no,scrollbars=yes,toolbar=yes,menubar=no,location=no");
}
</script>