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


PHP utility::getVersionDate方法代碼示例

本文整理匯總了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;
 }
開發者ID:rajeshb001,項目名稱:loaded7,代碼行數:56,代碼來源:updates.php

示例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();
      
開發者ID:abhiesa-tolexo,項目名稱:loaded7,代碼行數:30,代碼來源:updates.js.php


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