RequestTopTitle.jsp
2.64 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
<%@ page import="weaver.general.Util" %>
<%@ page import="java.net.*" %>
<jsp:useBean id="RecordSetFavourite" class="weaver.conn.RecordSet" scope="page"/>
<%
String gopage = "";
String hostname = request.getServerName();
String uri = request.getRequestURI();
String querystring="";
titlename = Util.null2String(titlename) ;
String ajaxs="";
try{
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;
}
}catch(Exception e){}
if(!querystring.equals(""))
querystring=querystring.substring(1);
if(!querystring.equals(""))
gopage = uri+"?"+querystring;
gopage = "http://"+hostname+"/main.jsp?gopage="+URLEncoder.encode(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 id="divTopTitle">
</DIV>
<%if(helpdocid!=0){%>
<script language="javascript">
function showHelp(){
var operationPage = "/docs/docs/DocDsp.jsp?id=<%=helpdocid%>";
var screenWidth = window.screen.width*1;
var screenHeight = window.screen.height*1;
window.open(operationPage,"_blank","top=0,left="+(screenWidth-800)/2+",height="+(screenHeight-90)+",width=800,status=no,scrollbars=yes,toolbar=yes,menubar=no,location=no");
}
</script>
<%} else {%>
<script language=javascript>
function showAddFavMsg(){
alert("<%=SystemEnv.getHtmlLabelName(18754,user.getLanguage())%>");
}
<%if(addFavSuccess==1){%>
showAddFavMsg();
<%}%>
function showHelp(){
var pathKey = this.location.pathname;
if(pathKey!=""){
pathKey = pathKey.substr(1);
}
var operationPage = "http://help.e-cology.com.cn/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>
<%}%>