LoginPageOperation.jsp
2.68 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
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/page/maint/common/init.jsp"%>
<%@ include file="/formmode/checkright4setting.jsp" %>
<%@ page import="weaver.page.menu.*"%>
<%@ page import="weaver.formmode.service.CommonConstant" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="MenuCenterCominfo" class="weaver.page.menu.MenuCenterCominfo" scope="page"/>
<%
String id = Util.null2String(request.getParameter("id"));
String menutype = Util.null2String(request.getParameter("menutype"));
String menuId = Util.null2String(request.getParameter("menuId"));
StringBuffer sb = new StringBuffer();
MenuH menuh = null;
if("weavertabs-left".equals(id))
{
menuh = MenuHFactory.creatorMenuH("left");
sb.append(menuh.getMenuStr("left", user));
}
else if("weavertabs-cus".equals(id))
{
sb.append("<ul>");
MenuCenterCominfo.setTofirstRow();
while(MenuCenterCominfo.next())
{
String pid = MenuCenterCominfo.getId();
String menuname = MenuCenterCominfo.getMenuname();
String mmenutype = MenuCenterCominfo.getMenutype();
if("sys".equals(mmenutype))
{
continue;
}
if(pid.equals(menuId))
{
continue;
}
sb.append("<li style=\"list-style-type: none;\"><img src=/images/messageimages/minus_wev8.gif><a style=\"color: #000;text-decoration: none;\" href=\"javascript:void(null);\" onclick=\"openNextUl(this);\">"+menuname+"</a>");
menuh = MenuHFactory.creatorMenuH(pid);
sb.append(menuh.getMenuStr(pid, user));
sb.append("</li>");
}
sb.append("</ul>");
}
else if("weavertabs-top".equals(id))
{
menuh = MenuHFactory.creatorMenuH("top");
sb.append(menuh.getMenuStr("top", user));
}
else if("weavertabs-hpmenus".equals(id))
{
menuh = MenuHFactory.creatorMenuH("hp");
sb.append(menuh.getMenuStr("hp", user));
}
else if("weavertabs-hp".equals(id))
{
sb.append("<ul>");
String sqlWhere = "";
String nullStr = CommonConstant.DB_ISNULL_FUN;
String nullFun = nullStr+"(infoname,'')!=''";
if (user.getUID()==1){ //sysadmin
sqlWhere = " where (creatortype=4 or creatortype=3 ) and "+nullFun;
} else{
sqlWhere = " where (creatortype=3) and "+nullFun;
}
String sql = "select * from hpinfo "+sqlWhere;
rs.executeSql(sql);
while(rs.next())
{
String hpid = rs.getString("id");
String subCompanyId = rs.getString("subcompanyid");
String infoname = rs.getString("infoname");
String htmlli = "<li><a href='/homepage/Homepage.jsp?hpid="+hpid+"&subCompanyId="+subCompanyId+"' class='main'>"+infoname+"</a>\n";
sb.append(htmlli);
}
sb.append("</ul>");
}
else if("weavertabs-sys".equals(id))
{
sb.append("test");
}
out.println(sb.toString());
%>