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


PHP OSCOM::getVersion方法代碼示例

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


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

示例1: getOutput

 function getOutput()
 {
     $current_version = OSCOM::getVersion();
     $new_version = false;
     $VersionCache = new Cache('core_version_check');
     if ($VersionCache->exists()) {
         $date_last_checked = DateTime::toShort(date('Y-m-d H:i:s', $VersionCache->getTime()), true);
         $releases = $VersionCache->get();
         foreach ($releases as $version) {
             $version_array = explode('|', $version);
             if (version_compare($current_version, $version_array[0], '<')) {
                 $new_version = true;
                 break;
             }
         }
     } else {
         $date_last_checked = OSCOM::getDef('module_admin_dashboard_version_check_never');
     }
     $output = '<table class="table table-hover">
                <thead>
                  <tr class="info">
                    <th>' . OSCOM::getDef('module_admin_dashboard_version_check_title') . '</th>
                    <th class="text-right">' . OSCOM::getDef('module_admin_dashboard_version_check_date') . '</th>
                  </tr>
                </thead>
                <tbody>';
     if ($new_version == true) {
         $output .= '    <tr class="success">
                       <td colspan="2">' . HTML::image(OSCOM::linkImage('icons/warning.gif'), OSCOM::getDef('icon_warning')) . '&nbsp;<strong>' . OSCOM::getDef('module_admin_dashboard_version_check_update_available') . '</strong></td>
                     </tr>';
     }
     $output .= '    <tr>
                     <td><a href="' . OSCOM::link('online_update.php') . '">' . OSCOM::getDef('module_admin_dashboard_version_check_check_now') . '</a></td>
                     <td class="text-right">' . $date_last_checked . '</td>
                   </tr>
                 </tbody>
               </table>';
     return $output;
 }
開發者ID:haraldpdl,項目名稱:oscommerce2,代碼行數:39,代碼來源:d_version_check.php

示例2: isset

use OSC\OM\HTML;
use OSC\OM\HTTP;
use OSC\OM\OSCOM;
use OSC\OM\Registry;
require 'includes/application_top.php';
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (tep_not_null($action)) {
    switch ($action) {
        case 'getShowcase':
            $result = ['result' => -1];
            $AppsShowcaseCache = new Cache('apps-showcase');
            if ($AppsShowcaseCache->exists(360)) {
                $showcase = $AppsShowcaseCache->get();
            } else {
                $showcase = [];
                $version_url = str_replace('.', '_', OSCOM::getVersion());
                $response = HTTP::getResponse(['url' => 'https://apps.oscommerce.com/index.php?RPC&GetShowcase&' . $version_url]);
                if (!empty($response)) {
                    $showcase = json_decode($response, true);
                }
                if (is_array($showcase) && !empty($showcase) && isset($showcase['rpcStatus']) && $showcase['rpcStatus'] === 1) {
                    $AppsShowcaseCache->save($showcase);
                }
            }
            if (is_array($showcase) && !empty($showcase) && isset($showcase['rpcStatus']) && $showcase['rpcStatus'] === 1 && isset($showcase['showcase'])) {
                $result['result'] = 1;
                $result['showcase'] = [];
                foreach ($showcase['showcase'] as $app) {
                    $result['showcase'][] = ['vendor' => $app['vendor'], 'app' => $app['app'], 'title' => $app['title'], 'description' => $app['description'], 'is_installed' => Apps::exists($app['vendor'] . '\\' . $app['app'])];
                }
            }
開發者ID:haraldpdl,項目名稱:oscommerce2,代碼行數:31,代碼來源:apps.php

示例3: Copyright

  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2015 osCommerce

  Released under the GNU General Public License
*/
use OSC\OM\OSCOM;
$compat_register_globals = true;
?>

<div class="alert alert-info">
  <h1>Welcome to osCommerce Online Merchant v<?php 
echo OSCOM::getVersion();
?>
!</h1>

  <p>osCommerce Online Merchant helps you sell products worldwide with your own online store. Its Administration Tool manages products, customers, orders, newsletters, specials, and more to successfully build the success of your online business.</p>
  <p>osCommerce has attracted a large community of store owners and developers who support each other and have provided over 7,000 free add-ons that can extend the features and potential of your online store.</p>
</div>

<div class="row">
  <div class="col-xs-12 col-sm-push-3 col-sm-9">
    <div class="page-header">
      <h2>New Installation</h2>
    </div>

<?php 
$configfile_array = [OSCOM::BASE_DIR . '/configure.php', realpath(OSCOM::BASE_DIR . '/../admin/includes') . '/configure.php'];
開發者ID:tiansiyuan,項目名稱:oscommerce2,代碼行數:31,代碼來源:index.php

示例4: Cache

/**
 * osCommerce Online Merchant
 *
 * @copyright (c) 2016 osCommerce; https://www.oscommerce.com
 * @license MIT; https://www.oscommerce.com/license/mit.txt
 */
use OSC\OM\Cache;
use OSC\OM\DateTime;
use OSC\OM\FileSystem;
use OSC\OM\HTML;
use OSC\OM\HTTP;
use OSC\OM\OnlineUpdate;
use OSC\OM\OSCOM;
use OSC\OM\Registry;
require 'includes/application_top.php';
$current_version = OSCOM::getVersion();
preg_match('/^(\\d+\\.)?(\\d+\\.)?(\\d+)$/', $current_version, $version);
$major_version = (int) $version[1];
$minor_version = (int) $version[2];
$inc_version = (int) $version[3];
$VersionCache = new Cache('core_version_check');
if ($VersionCache->exists(360)) {
    $releases = $VersionCache->get();
} else {
    $releases = HTTP::getResponse(['url' => 'https://www.oscommerce.com/version/online_merchant/' . $major_version . $minor_version]);
    if (!empty($releases)) {
        $releases = explode("\n", trim($releases));
        if (preg_match('/^(\\d+\\.)?(\\d+\\.)?(\\d+)\\|[0-9]{8}$/', $releases[0]) === 1) {
            usort($releases, function ($a, $b) {
                $aa = explode('|', $a);
                $ba = explode('|', $b);
開發者ID:haraldpdl,項目名稱:oscommerce2,代碼行數:31,代碼來源:online_update.php

示例5: tep_get_system_information

function tep_get_system_information()
{
    $OSCOM_Db = Registry::get('Db');
    $Qdate = $OSCOM_Db->query('select now() as datetime');
    @(list($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5));
    $data = array();
    $data['oscommerce'] = array('version' => OSCOM::getVersion());
    $data['system'] = array('date' => date('Y-m-d H:i:s O T'), 'os' => PHP_OS, 'kernel' => $kernel, 'uptime' => @exec('uptime'), 'http_server' => $_SERVER['SERVER_SOFTWARE']);
    $data['mysql'] = array('version' => $OSCOM_Db->getAttribute(\PDO::ATTR_SERVER_VERSION), 'date' => $Qdate->value('datetime'));
    $data['php'] = array('version' => PHP_VERSION, 'zend' => zend_version(), 'sapi' => PHP_SAPI, 'int_size' => defined('PHP_INT_SIZE') ? PHP_INT_SIZE : '', 'safe_mode' => (int) @ini_get('safe_mode'), 'open_basedir' => (int) @ini_get('open_basedir'), 'memory_limit' => @ini_get('memory_limit'), 'error_reporting' => error_reporting(), 'display_errors' => (int) @ini_get('display_errors'), 'allow_url_fopen' => (int) @ini_get('allow_url_fopen'), 'allow_url_include' => (int) @ini_get('allow_url_include'), 'file_uploads' => (int) @ini_get('file_uploads'), 'upload_max_filesize' => @ini_get('upload_max_filesize'), 'post_max_size' => @ini_get('post_max_size'), 'disable_functions' => @ini_get('disable_functions'), 'disable_classes' => @ini_get('disable_classes'), 'enable_dl' => (int) @ini_get('enable_dl'), 'filter.default' => @ini_get('filter.default'), 'default_charset' => @ini_get('default_charset'), 'mbstring.func_overload' => @ini_get('mbstring.func_overload'), 'mbstring.internal_encoding' => @ini_get('mbstring.internal_encoding'), 'unicode.semantics' => (int) @ini_get('unicode.semantics'), 'zend_thread_safty' => (int) function_exists('zend_thread_id'), 'opcache.enable' => @ini_get('opcache.enable'), 'extensions' => get_loaded_extensions());
    return $data;
}
開發者ID:haraldpdl,項目名稱:oscommerce2,代碼行數:12,代碼來源:general.php


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