當前位置: 首頁>>代碼示例>>PHP>>正文


PHP GO::scriptCanBeDecoded方法代碼示例

本文整理匯總了PHP中GO::scriptCanBeDecoded方法的典型用法代碼示例。如果您正苦於以下問題:PHP GO::scriptCanBeDecoded方法的具體用法?PHP GO::scriptCanBeDecoded怎麽用?PHP GO::scriptCanBeDecoded使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GO的用法示例。


在下文中一共展示了GO::scriptCanBeDecoded方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: isAvailable

 public function isAvailable()
 {
     if (!\GO::scriptCanBeDecoded($this->package())) {
         return false;
     } else {
         return true;
     }
     //		if we can run this file without ioncube it must be open source.
     //		if(!function_exists('ioncube_file_is_encoded') || !ioncube_file_is_encoded()){
     //			return true;
     //		}
     /*if(!GO::user()){
     			return true;
     		}
     		
     
     		$className = get_class($this);
     
     		$classParts = explode('\\', $className);
     
     		if(!License::userHasModule(GO::user()->username, strtolower($classParts[1]))){
     			return false;
     		}
     		
     		
     		return true;*/
 }
開發者ID:ajaboa,項目名稱:crmpuan,代碼行數:27,代碼來源:Module.php

示例2: actionInstall

 protected function actionInstall()
 {
     //license check done in a separate request because it can't be done in one run
     if (!\GO::scriptCanBeDecoded()) {
         throw new Exception("The license file you provided didn't work. Please contact Intermesh about this error.");
     } else {
         //add all users to the modules they have access too
         \GO\Professional\License::autoConfigureModulePermissions();
         echo json_encode(array('success' => true));
     }
 }
開發者ID:ajaboa,項目名稱:crmpuan,代碼行數:11,代碼來源:LicenseController.php

示例3: test_system


//.........這裏部分代碼省略.........
    $ze1compat = ini_get('zend.ze1_compatibility_mode');
    $test['name'] = 'zend.ze1_compatibility_mode';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = empty($ze1compat);
    $test['feedback'] = 'Fatal error: zend.ze1_compatibility_mode is enabled. ' . $product_name . ' can\'t run with this setting enabled';
    $test['fatal'] = true;
    $tests[] = $test;
    $url = "http" . (!empty($_SERVER['HTTPS']) ? "s" : "") . "://" . $_SERVER['HTTP_HOST'];
    $headers = @get_headers($url . '/caldav');
    $test['name'] = 'CalDAV alias';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = $headers && (strpos($headers[0], '401') !== false || strpos($headers[0], '200') !== false);
    $test['feedback'] = "Note: The alias /caldav was not detected. Please create: Alias /caldav /groupoffice/modules/caldav/calendar.php.";
    $test['fatal'] = false;
    $tests[] = $test;
    $headers = @get_headers($url . '/.well-known/caldav');
    $test['name'] = 'CalDAV autodiscovery';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = $headers && (strpos($headers[0], '301') !== false || strpos($headers[0], '200') !== false);
    $test['feedback'] = "Note: The redirect /.well-known/caldav was not detected. Please create a redirect: Redirect 301 /.well-known/caldav /caldav";
    $test['fatal'] = false;
    $tests[] = $test;
    $headers = @get_headers($url . '/carddav');
    $test['name'] = 'CardDAV alias';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = $headers && (strpos($headers[0], '401') !== false || strpos($headers[0], '200') !== false);
    $test['feedback'] = "Note: The alias /carddav was not detected. Please create: Alias /carddav /groupoffice/modules/carddav/addressbook.php.";
    $test['fatal'] = false;
    $tests[] = $test;
    $headers = @get_headers($url . '/.well-known/carddav');
    $test['name'] = 'CardDAV autodiscovery';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = $headers && (strpos($headers[0], '301') !== false || strpos($headers[0], '200') !== false);
    $test['feedback'] = "Note: The redirect /.well-known/carddav was not detected. Please create a redirect: Redirect 301 /.well-known/carddav /carddav";
    $test['fatal'] = false;
    $tests[] = $test;
    $headers = @get_headers($url . '/Microsoft-Server-ActiveSync');
    //	var_dump($headers);
    $test['name'] = 'Microsoft-Server-ActiveSync alias';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = $headers && (strpos($headers[0], '401') !== false || strpos($headers[0], '200') !== false);
    $test['feedback'] = "Note: The alias /Microsoft-Server-ActiveSync was not detected. Please create: Alias /Microsoft-Server-ActiveSync /groupoffice/modules/z-push/index.php.";
    $test['fatal'] = false;
    $tests[] = $test;
    $test['name'] = 'Shared Memory Functions';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = function_exists('sem_get') && function_exists('shm_attach') && function_exists('sem_acquire') && function_exists('shm_get_var');
    $test['feedback'] = "InterProcessData::InitSharedMem(): PHP libraries for the use shared memory are not available. Z-push will work unreliably!";
    $test['fatal'] = false;
    $tests[] = $test;
    $test['name'] = 'Process Control Extensions';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = function_exists('posix_getuid');
    $test['feedback'] = "Process Control Extensions PHP library not avaialble. Z-push will work unreliably!";
    $test['fatal'] = false;
    $tests[] = $test;
    if (class_exists('GO')) {
        //		$test['name']='Writable license file';
        //		$test['pass']=GO::getLicenseFile()->exists() && GO::getLicenseFile()->isWritable();
        //		$test['feedback']="Fatal: the license file ".GO::getLicenseFile()->path()." is not writable. Please make it writable for the webserver.";
        //		$test['fatal']=true;
        //
        //		$tests[]=$test;
        $root = dirname(dirname(__FILE__));
        if ($ioncubeWorks && is_dir($root . '/modules/professional')) {
            $test['name'] = 'Professional license';
            $test['showSuccessFeedback'] = false;
            //		if(!file_exists(GO::config()->root_path.'groupoffice-pro-'.\GO::config()->getMajorVersion().'-license.txt')){
            //			$test['feedback']='Warning: There\'s no license file "groupoffice-pro-'.\GO::config()->getMajorVersion().'-license.txt" in the root of Group-Office. The professional modules will not be enabled.';
            //			$test['fatal']=false;
            //			$test['pass']=false;
            //		}else
            if (!\GO::scriptCanBeDecoded('Professional')) {
                $test['feedback'] = 'Warning: Your professional license is invalid. The professional modules will not be enabled. Please contact Intermesh about this problem and supply the output of this page.';
                $test['fatal'] = false;
                $test['pass'] = false;
            } else {
                $test['feedback'] = '';
                $test['fatal'] = false;
                $test['pass'] = true;
            }
            $tests[] = $test;
        }
        if (\GO::isInstalled()) {
            $test['name'] = 'Protected files path';
            $test['showSuccessFeedback'] = false;
            $test['pass'] = is_writable(\GO::config()->file_storage_path);
            $test['feedback'] = 'Fatal error: the file_storage_path setting in config.php is not writable. You must correct this or ' . $product_name . ' will not run.';
            $test['fatal'] = false;
            $tests[] = $test;
            $test['name'] = 'Cronjob';
            $test['showSuccessFeedback'] = false;
            $test['pass'] = GO::cronIsRunning();
            $test['feedback'] = "Warning: The main cron job doesn't appear to be running. Please add a cron job: \n\n* * * * * www-data php " . \GO::config()->root_path . "groupofficecli.php -c=" . \GO::config()->get_config_file() . " -r=core/cron/run -q > /dev/null";
            $test['fatal'] = false;
            $tests[] = $test;
        }
    }
    return $tests;
}
開發者ID:ajaboa,項目名稱:crmpuan,代碼行數:101,代碼來源:gotest.php


注:本文中的GO::scriptCanBeDecoded方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。