license.jsp
来自「Jive是基于JSP/JAVA技术构架的一个大型BBS论坛系统,这是Jive论坛」· JSP 代码 · 共 199 行
JSP
199 行
<%/** * $RCSfile: license.jsp,v $ * $Revision: 1.3 $ * $Date: 2002/04/09 18:42:55 $ */%><%@ page import="java.io.*, java.util.*, com.jivesoftware.forum.*, com.jivesoftware.forum.util.*"%><%@ include file="global.jsp" %><%@ include file="header.jsp" %><% String jiveEdition = null; switch (JiveGlobals.getJiveEdition()) { case JiveGlobals.BASIC: jiveEdition = "Jive Forums Basic"; break; case JiveGlobals.PROFESSIONAL: jiveEdition = "Jive Forums Professional"; break; case JiveGlobals.ENTERPRISE: jiveEdition = "Jive Forums Enterprise"; break; default : jiveEdition = "-"; break; }%><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td> <b><%= jiveEdition %> - Admin</b> </td></tr><tr><td> <hr size="0" width="100%"> </td></tr></table><font size="-1">Below are the details of your Jive Forums license.<% if (isSystemAdmin) { %>It is installed at:<tt><%= JiveGlobals.getJiveHome() %><%= File.separator %>jive.license</tt><% } %></font><p><font size="-1"><b>License Details</b><ul> <font size="-1"><% boolean validLicense = false; Exception le = null; try { LicenseManager.validateLicense(jiveEdition, "2.0"); validLicense = true; } catch (LicenseException e) { le = e; } if (validLicense) { License.LicenseType licenseType = LicenseManager.getLicenseType(); boolean isCommercial = (licenseType == License.LicenseType.COMMERCIAL); boolean isNonCommercial = (licenseType == License.LicenseType.NON_COMMERCIAL); boolean isEvaluation = (!isCommercial && !isNonCommercial);%> <% if (isCommercial) { %> This copy of <%= jiveEdition %> is licensed for commercial deployment. <% } else if (isNonCommercial) { %> This copy of <%= jiveEdition %> is licensed for non-commercial deployment. To purchase a commercial license, please visit <a href="http://www.jivesoftware.com/store/" target="_blank">http://www.jivesoftware.com/store/</a>. <% } else { // is evaulation %> This is an evaulation copy of <%= jiveEdition %> and is not licensed for deployment. Before deploying for commercial or non-commercial use, you must obtain a license at <a href="http://www.jivesoftware.com/store/" target="_blank">http://www.jivesoftware.com/store/</a>. <p> <% Date exprDate = LicenseManager.getExpiresDate(); if (exprDate != null) { long expires = exprDate.getTime() - System.currentTimeMillis(); int daysFromNow = (int)Math.ceil((double)(expires/JiveGlobals.DAY))+1; %> <font color="#ff0000"> This evaulation license expires on <%= JiveGlobals.formatDate(exprDate) %>, <%= daysFromNow %> day<%= (daysFromNow==1)?"":"s" %> from now. </font> <% } %> <% } %> </font> <p> <table bgcolor="<%= tblBorderColor %>" cellpadding="0" cellspacing="0" border="0"> <td> <table cellpadding="4" cellspacing="1" border="0" width="100%"> <% if (!isEvaluation) { %> <tr bgcolor="#ffffff"> <td><font size="-1">License ID:</font></td> <td><font size="-1"><%= LicenseManager.getLicenseID() %></font></td> </tr> <% } %> <tr bgcolor="#ffffff"> <td><font size="-1">Product:</font></td> <td><font size="-1"><%= LicenseManager.getProduct() %></font></td> </tr> <tr bgcolor="#ffffff"> <td><font size="-1">Version:</font></td> <td><font size="-1"><%= LicenseManager.getVersion() %></font></td> </tr> <tr bgcolor="#ffffff"> <td><font size="-1">License Type:</font></td> <td><font size="-1"><%= LicenseManager.getLicenseType() %></font></td> </tr> <% if (!isEvaluation) { %> <tr bgcolor="#ffffff"> <td><font size="-1">Copies:</font></td> <td><font size="-1"><%= LicenseManager.getNumCopies() %></font></td> </tr> <% } %> <tr bgcolor="#ffffff"> <td><font size="-1">License Created:</font></td> <td><font size="-1"><%= JiveGlobals.formatDate(LicenseManager.getCreationDate()) %></font></td> </tr><% if (!isEvaluation) { Date exprDate = LicenseManager.getExpiresDate(); if (exprDate != null) { %> <tr bgcolor="#ffffff"> <td><font size="-1">License Expires:</font></td> <td><font size="-1" color="#ff0000"><%= JiveGlobals.formatDate(exprDate) %></font></td> </tr><% } %> <tr bgcolor="#ffffff"> <td><font size="-1">Licensed To:</font></td><% String name = LicenseManager.getName(); if (name == null) { name = " "; }%> <td><font size="-1"><%= name %></font></td> </tr><% String company = LicenseManager.getCompany(); if (company != null && "".equals(company)) {%> <tr bgcolor="#ffffff"> <td><font size="-1">Company/Organization:</font></td> <td><font size="-1"><%= company %></font></td> </tr><% } %><% int clusterMembers = LicenseManager.getNumClusterMembers(); if (clusterMembers > 0) {%> <tr bgcolor="#ffffff"> <td><font size="-1">Cluster Members Allowed:</font></td> <td><font size="-1"><%= clusterMembers %></font></td> </tr><% } %> <tr bgcolor="#ffffff"> <td><font size="-1">URL:</font></td><% String url = LicenseManager.getURL(); if (url == null || "".equals(url)) { url = "<i>Unspecified or Internal Use</i>"; }%> <td><font size="-1"><%= url %></font></td> </tr><% } // end !isEvaulation %> </table> </td></tr> </table><% } else { %><font color="#ff0000">License not valid: <%= le.getMessage() %></font><% } %></ul></font><center><form action="main.jsp"> <input type="submit" value="Go Back"></form></center><%@ include file="footer.jsp" %>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?