mymenu.java
来自「WAP PUSH后台源码,WAP PUSH后台源码」· Java 代码 · 共 38 行
JAVA
38 行
package com.sxit.wap.common;
import com.sxit.wap.admin.*;
import com.sxit.wap.adminpurview.*;
public class MyMenu {
AdminInfoModel adminInfoModel = null;
public MyMenu(AdminInfoModel adminInfoModel1) {
this.adminInfoModel = adminInfoModel1;
}
public String buildItem(String menuName, short purviewCode, int selectedMenuItem, String menuUrl, String target) {
String value = "";
try {
if (AdminPurviewBean.validPurview(adminInfoModel, purviewCode)) {
value = "<tr><td height=20 align=\"center\"><a href=\"" + menuUrl + "?selectedMenuItem=" + selectedMenuItem + "\"" + (StringUtil.isNotEmpty(target)?" target=\"" + target + "\"":"") + ">" + menuName + "</a></td></tr>";
} else {
value = "<tr><td height=20 align=\"center\"><font color=\"#aaaaaa\">" + menuName + "</font></td></tr>";
}
} catch (Exception e) {
}
return value;
}
public String buildItem1(String menuName, short purviewCode, int selectedMenuItem, String menuUrl, String target) {
String value = "";
try {
if (AdminPurviewBean.validPurview(adminInfoModel, purviewCode)) {
value = "<a href=\"" + menuUrl + "?selectedMenuItem=" + selectedMenuItem + "\"><img src=\"/wap_manage/images/logo/0001.png\" border=\"0\"> " + menuName + "</a>";
} else {
value = "<img src=\"/wap_manage/images/logo/0001.png\" border=\"0\"> <font color=\"#aaaaaa\">" + menuName + "</font>";
}
} catch (Exception e) {
}
return value;
}
public static void main(String[] args) {
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?