BoxlangLicenseInfo
Last updated
Was this helpful?
Was this helpful?
// Check current license status
<bx:script>
licenseInfo = boxlangLicenseInfo();
if ( licenseInfo.isValidLicense ) {
writeOutput( "✓ BoxLang+ License Active" );
writeOutput( "Email: " & licenseInfo.email );
writeOutput( "Server Type: " & licenseInfo.serverType );
writeOutput( "Expires: " & licenseInfo.expirationDate );
} else if ( licenseInfo.isTrialMode ) {
writeOutput( "Currently in 60-day trial mode" );
} else {
writeOutput( "No valid license detected" );
}
</bx:script>// Display detailed license information
licenseInfo = boxlangLicenseInfo();
systemOutput( "=== BoxLang License Status ===" );
systemOutput( "Valid License: " & ( licenseInfo.isValidLicense ? "Yes" : "No" ) );
systemOutput( "Trial Mode: " & ( licenseInfo.isTrialMode ? "Yes" : "No" ) );
if ( licenseInfo.isValidLicense ) {
systemOutput( "Email: " & licenseInfo.email );
systemOutput( "Type: " & licenseInfo.licenseType );
systemOutput( "Server: " & licenseInfo.serverType );
systemOutput( "Expires: " & licenseInfo.expirationDate );
}licenseInfo = boxlangLicenseInfo();
// Enable premium features based on license type
if ( licenseInfo.isValidLicense && licenseInfo.licenseType == "BoxLang++" ) {
enableAdvancedFeatures = true;
enablePDF = true;
enableSpreadsheet = true;
} else if ( licenseInfo.isValidLicense && licenseInfo.licenseType == "BoxLang+" ) {
enableAdvancedFeatures = true;
enablePDF = false;
enableSpreadsheet = true;
} else if ( licenseInfo.isTrialMode ) {
systemOutput( "Trial mode - limited features available" );
} else {
systemOutput( "Please activate a BoxLang license to continue" );
}