当前位置: 首页>>代码示例>>PHP>>正文


PHP License::isProfessional方法代码示例

本文整理汇总了PHP中License::isProfessional方法的典型用法代码示例。如果您正苦于以下问题:PHP License::isProfessional方法的具体用法?PHP License::isProfessional怎么用?PHP License::isProfessional使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在License的用法示例。


在下文中一共展示了License::isProfessional方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: wizard_checkKey

 public function wizard_checkKey()
 {
     $fileError = false;
     if (!isset($_SESSION['CATS']) || empty($_SESSION['CATS'])) {
         echo 'CATS has lost your session!';
         return;
     }
     /* Bail out if the user doesn't have SA permissions. */
     if ($this->_realAccessLevel < ACCESS_LEVEL_SA) {
         echo 'You do not have access to set the key.';
         return;
     }
     if (isset($_GET[$id = 'key']) && $_GET[$id] != '') {
         $license = new License();
         $key = strtoupper(trim($_GET[$id]));
         $configWritten = false;
         if ($license->setKey($key) !== false) {
             if ($license->isProfessional()) {
                 if (!CATSUtility::isSOAPEnabled()) {
                     echo "CATS Professional requires the PHP SOAP library which isn't currently installed.\n\n" . "Installation Instructions:\n\n" . "WAMP/Windows Users:\n" . "1) Left click on the wamp icon.\n" . "2) Select \"PHP Settings\" from the drop-down list.\n" . "3) Select \"PHP Extensions\" from the drop-down list.\n" . "4) Check the \"php_soap\" option.\n" . "5) Restart WAMP.\n\n" . "Linux Users:\n" . "Re-install PHP with the --enable-soap configuration option.\n\n" . "Please visit http://www.catsone.com for more support options.";
                     return;
                 } else {
                     if (!LicenseUtility::validateProfessionalKey($key)) {
                         echo "That is not a valid CATS Professional license key. Please visit " . "http://www.catsone.com/professional for more information about CATS Professional.\n\n" . "For a free open-source key, please visit http://www.catsone.com/ and " . "click on \"Downloads\".";
                         return;
                     }
                 }
             }
             if (CATSUtility::changeConfigSetting('LICENSE_KEY', "'" . $key . "'")) {
                 $configWritten = true;
             }
         }
         if ($configWritten) {
             echo 'Ok';
             return;
         }
     }
     // The key hasn't been written. But they may have manually inserted the key into their config.php, check
     if (LicenseUtility::isLicenseValid()) {
         echo 'Ok';
         return;
     }
     if ($fileError) {
         echo 'You entered a valid key, but this wizard is unable to write to your config.php file! You have ' . 'two choices: ' . "\n\n" . '1) Change the file permissions of your config.php file.' . "\n" . 'If you\'re using unix, try:' . "\n" . 'chmod 777 config.php' . "\n\n" . '2) Edit your config.php file manually and enter your valid key near this line: ' . "\n" . 'define(\'LICENSE_KEY\', \'ENTER YOUR KEY HERE\');' . "\n" . 'Once you\'ve done this, refresh your browser.' . "\n\n" . 'For more help, visit our website at http://www.catsone.com for support options.';
     }
     echo 'That is not a valid key. You can register for a free open source license key on our website ' . 'at http://www.catsone.com or a professional key to unlock all of the available features at ' . 'http://www.catsone.com/professional';
 }
开发者ID:rankinp,项目名称:OpenCATS,代码行数:47,代码来源:SettingsUI.php

示例2: isOpenSource

 public static function isOpenSource()
 {
     if (!self::isLicenseValid()) {
         return false;
     }
     $license = new License();
     return !$license->isProfessional();
 }
开发者ID:Khum,项目名称:HRTracking,代码行数:8,代码来源:License.php


注:本文中的License::isProfessional方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。