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


PHP check_now函数代码示例

本文整理汇总了PHP中check_now函数的典型用法代码示例。如果您正苦于以下问题:PHP check_now函数的具体用法?PHP check_now怎么用?PHP check_now使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: rebuildSprites

    rebuildSprites(true);
}
require_once 'modules/Administration/upgrade_custom_relationships.php';
upgrade_custom_relationships();
require_once 'modules/UpgradeWizard/uw_utils.php';
/*
if($_SESSION['current_db_version'] < '620')
{
	upgradeDateTimeFields($path);
	upgradeDocumentTypeFields($path);
}
*/
//Update the license
logThis('Start Updating the license ', $path);
ob_start();
check_now(get_sugarbeat());
ob_end_clean();
logThis('End Updating the license ', $path);
set_upgrade_progress('end', 'done');
logThis('Cleaning up the session.  Goodbye.');
unlinkUWTempFiles();
logThis('Cleaning up the session.  Goodbye.');
resetUwSession();
// flag to say upgrade has completed
$_SESSION['upgrade_complete'] = true;
//Clear any third party caches
sugar_cache_reset_full();
//add the clean vardefs here
if (!class_exists('VardefManager')) {
}
VardefManager::clearVardef();
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:31,代码来源:end.php

示例2: amsi

function amsi($as)
{
    global $app_strings;
    $z = 1;
    global $login_error;
    foreach ($as as $k) {
        if (!empty($k['m'])) {
            $z = min(vcmsi($k['g'], $k['m'], $k['a'], $k['l']), $z);
        } else {
            $z = min(acmsi($k['g'], $k['a'], $k['i'], $k['b'], $k['c'], $k['l']), $z);
        }
    }
    if ($z < 0) {
        $login_error = null;
        check_now(false);
    }
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:17,代码来源:user_utils.php

示例3: loginLicense

function loginLicense()
{
    global $current_user, $license;
    loadLicense(true);
    if (isset($_SESSION['EXCEEDS_MAX_USERS']) && $_SESSION['EXCEEDS_MAX_USERS'] == 1 || empty($license->settings['license_key']) || !empty($license->settings['license_last_validation']) && $license->settings['license_last_validation'] == 'failed' && !empty($license->settings['license_last_validation_fail']) && (empty($license->settings['license_last_validation_success']) || $license->settings['license_last_validation_fail'] > $license->settings['license_last_validation_success'])) {
        if (!is_admin($current_user)) {
            $GLOBALS['login_error'] = $GLOBALS['app_strings']['ERROR_LICENSE_VALIDATION'];
            $_SESSION['login_error'] = $GLOBALS['login_error'];
        } else {
            if (empty($license->settings['license_key'])) {
                $_SESSION['VALIDATION_EXPIRES_IN'] = 'REQUIRED';
            } else {
                $_SESSION['COULD_NOT_CONNECT'] = $license->settings['license_last_validation_fail'];
            }
        }
    }
    if (shouldCheckSugar()) {
        $last_check_date = get_last_check_date_config_setting();
        $current_date_time = time();
        $time_period = 3 * 23 * 3600;
        if ($current_date_time - $last_check_date > $time_period || empty($license->settings['license_last_validation_success'])) {
            $version = check_now(get_sugarbeat());
            unset($_SESSION['license_seats_needed']);
            unset($_SESSION['LICENSE_EXPIRES_IN']);
            unset($_SESSION['VALIDATION_EXPIRES_IN']);
            unset($_SESSION['HomeOnly']);
            loadLicense();
            set_last_check_date_config_setting("{$current_date_time}");
            include 'sugar_version.php';
            $newVersion = '';
            if (!empty($version) && count($version) == 1) {
                $newVersion = $version[0]['version'];
            }
            if (version_compare($newVersion, $sugar_version, '>') && is_admin($current_user)) {
                //set session variables.
                $_SESSION['available_version'] = $version[0]['version'];
                $_SESSION['available_version_description'] = $version[0]['description'];
                set_last_check_version_config_setting($version[0]['version']);
            }
        }
    }
    // This section of code is a portion of the code referred
    // to as Critical Control Software under the End User
    // License Agreement.  Neither the Company nor the Users
    // may modify any portion of the Critical Control Software.
    if (!authenticateDownloadKey() && !ocLicense()) {
        if (is_admin($current_user)) {
            $_SESSION['HomeOnly'] = true;
        } else {
            $_SESSION['login_error'] = $GLOBALS['app_strings']['ERROR_LICENSE_VALIDATION'];
            $GLOBALS['login_error'] = $GLOBALS['app_strings']['ERROR_LICENSE_VALIDATION'];
        }
    }
    //END REQUIRED CODE DO NOT MODIFY
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:55,代码来源:updater_utils.php

示例4: loginLicense

function loginLicense()
{
    global $current_user, $license, $authLevel;
    loadLicense(true);
    $authLevel = 0;
    if (shouldCheckSugar()) {
        $last_check_date = get_last_check_date_config_setting();
        $current_date_time = time();
        $time_period = 3 * 23 * 3600;
        if ($current_date_time - $last_check_date > $time_period) {
            $version = check_now(get_sugarbeat());
            unset($_SESSION['license_seats_needed']);
            loadLicense();
            set_last_check_date_config_setting("{$current_date_time}");
            include 'sugar_version.php';
            if (!empty($version) && count($version) == 1 && $version[0]['version'] > $sugar_version && is_admin($current_user)) {
                //set session variables.
                $_SESSION['available_version'] = $version[0]['version'];
                $_SESSION['available_version_description'] = $version[0]['description'];
                set_last_check_version_config_setting($version[0]['version']);
            }
        }
    }
}
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:24,代码来源:updater_utils.php

示例5: sugar_die

if (isset($GLOBALS['sugar_config']['hide_admin_licensing']) && $GLOBALS['sugar_config']['hide_admin_licensing']) {
    sugar_die(translate('LBL_LICENSE_UNAUTHORIZED_ACCESS', 'Administration'));
}
if (isset($_REQUEST['validate'])) {
    checkDownloadKey();
}
$focus = Administration::getSettings();
if (!empty($_FILES['VKFile'])) {
    $response_data = array();
    $response_data['key'] = $focus->settings['license_key'];
    $response_data['data'] = file_get_contents($_FILES['VKFile']['tmp_name']);
    check_now(false, true, $response_data);
    $focus->retrieveSettings(false, true);
}
if (!empty($_REQUEST['exportKey'])) {
    $content = check_now(get_sugarbeat(), true);
    header("Content-Disposition: attachment; filename=sugarkey.lic");
    header("Content-Type: text/plain; charset={$app_strings['LBL_CHARSET']}");
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header("Last-Modified: " . TimeDate::httpTime());
    header("Cache-Control: max-age=0");
    header("Pragma: public");
    header("Content-Length: " . strlen($content));
    echo $content;
    die;
}
echo getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>" . translate('LBL_MODULE_NAME', 'Administration') . "</a>", $mod_strings['LBL_MANAGE_LICENSE_TITLE']), false);
global $currentModule;
$GLOBALS['log']->info("Administration LicenseSettings view");
$xtpl = new XTemplate('modules/Administration/LicenseSettings.html');
$xtpl->assign("MOD", $mod_strings);
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:LicenseSettings.php


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