本文整理汇总了PHP中utility::getVersionDate方法的典型用法代码示例。如果您正苦于以下问题:PHP utility::getVersionDate方法的具体用法?PHP utility::getVersionDate怎么用?PHP utility::getVersionDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utility
的用法示例。
在下文中一共展示了utility::getVersionDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hasUpdatesAvailable
/**
* Check to see if there are updates availablw
*
* @access public
* @return boolean
*/
public static function hasUpdatesAvailable()
{
global $lC_Database, $lC_Language;
$lC_Language->loadIniFile('updates.php');
$result = array();
$available = self::getAvailablePackages();
$result['hasUpdates'] = $available['total'] > 0;
$lastChecked = date("Y-m-d H:i:s");
$result['lastChecked'] = $lC_Language->get('text_last_checked') . ' ' . lC_DateTime::getLong($lastChecked, TRUE);
$result['total'] = $available['total'];
if ($result['hasUpdates']) {
$to_version = 0;
$to_version_date = '';
foreach ($available['entries'] as $k => $v) {
if (version_compare($to_version, $v['version'], '<')) {
$to_version = $v['version'];
$to_version_date = $v['date'];
}
}
} else {
$to_version = utility::getVersion();
$to_version_date = utility::getVersionDate();
}
$result['toVersion'] = $to_version;
$result['toVersionDate'] = $to_version_date;
// update last checked value
$lC_Database->startTransaction();
if (!defined('UPDATE_LAST_CHECKED')) {
$Qupdate = $lC_Database->query('insert into :table_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, last_modified) values (:configuration_title, :configuration_key, :configuration_value, :configuration_description, :configuration_group_id, :last_modified)');
$Qupdate->bindValue(':configuration_title', 'Update Last Checked');
$Qupdate->bindValue(':configuration_key', 'UPDATE_LAST_CHECKED');
$Qupdate->bindValue(':configuration_value', 'See Last Modified');
$Qupdate->bindValue(':configuration_description', 'Update Last Checked');
$Qupdate->bindValue(':configuration_group_id', '6');
} else {
$Qupdate = $lC_Database->query("update :table_configuration set last_modified = :last_modified where configuration_key = 'UPDATE_LAST_CHECKED'");
}
$Qupdate->bindTable(':table_configuration', TABLE_CONFIGURATION);
$Qupdate->bindValue(':last_modified', $lastChecked);
$Qupdate->setLogging($_SESSION['module']);
$Qupdate->execute();
if (!$lC_Database->isError()) {
$lC_Database->commitTransaction();
$result['rpcStatus'] = 1;
} else {
$lC_Database->rollbackTransaction();
$result['rpcStatus'] = -1;
}
return $result;
}
示例2: __setMaintenanceMode
// set maint mode=on
__setMaintenanceMode('on');
var toVersion = '<?php
echo $checkArr['toVersion'];
?>
';
$('#versionContainer .fieldset').removeClass('orange-gradient');
$('#version-table tbody').removeClass('green').removeClass('red');
$('#version-table > tbody').empty();
$('#version-table').css("margin-bottom", "10px");
$('#version-table > thead').html('<tr><td class="before"><?php
echo $lC_Language->get('text_latest_version');
?>
</td><td class="version">' + toVersion + '</td><td class="after"><?php
echo sprintf($lC_Language->get('text_released'), utility::getVersionDate());
?>
</td></tr>').addClass('red');
$('#version-table > tbody').html('<tr><td colspan="3"><span id="updateProgressContainer" style="display:none;"></span></td></tr>');
// start the update process
$('#updateButtonset').slideUp();
$('.update-text').html('<p><?php
echo $lC_Language->get('text_initializing');
?>
</p>').attr('style', 'text-align:center').blink({ maxBlinks: 5, blinkPeriod: 1000 });
setTimeout(function() {
__setup();
__showStep(1,0);
$('#vFooterText').html(__cancelBlock()).show();