global.jsp

来自「Jive是基于JSP/JAVA技术构架的一个大型BBS论坛系统,这是Jive论坛」· JSP 代码 · 共 74 行

JSP
74
字号
<%! // global sidebar variables        // red, yellow, green lights    static final String RED = "<img src=\"images/red.gif\" width=\"20\" height=\"20\" border=\"0\">";    static final String YELLOW = "<img src=\"images/yellow.gif\" width=\"20\" height=\"20\" border=\"0\">";    static final String GREEN = "<img src=\"images/green.gif\" width=\"20\" height=\"20\" border=\"0\">";        private static boolean getSessionBoolean(HttpSession session, String name) {        Boolean temp = (Boolean)session.getAttribute(name);        boolean value = false;        if (temp != null) {            value = temp.booleanValue();        }        return value;    }        private static int getSessionInt(HttpSession session, String name) {        Integer temp = (Integer)session.getAttribute(name);        int value = -1;        if (temp != null) {            value = temp.intValue();        }        return value;    }        private static String getSessionString(HttpSession session, String name) {        String temp = (String)session.getAttribute(name);        String value = null;        if (temp != null && !temp.equals("")) {            value = temp;        }        return value;    }%><%  // check for <setup>true</setup> in the jive config file. If setup does    // equal true, inactivate this setup tool    	boolean doSetup = false;    // Try loading a Jive class:    try {        Class jiveGlobals = Class.forName("com.jivesoftware.forum.JiveGlobals");        // authorization class used below        Class authorization = Class.forName("com.jivesoftware.forum.Authorization");        Class[] params = new Class[1];        params[0] = "".getClass();        Method getJiveProperty = jiveGlobals.getMethod("getJiveProperty", params);        if (getJiveProperty == null) {            doSetup = true;        }        else {            // Call JiveGlobals.getJiveProperty("setup")            String[] args = {"setup"};            Object setupVal = getJiveProperty.invoke(null, args);            if (setupVal == null) {                doSetup = true;            }            else {                String setup = (String)setupVal;                if (!"true".equals(setup)) {                    doSetup = true;                }            }        }    }    catch (Exception e) {        doSetup = true;    }        if (!doSetup) {        response.sendRedirect("completed.jsp");        return;    }%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?