当前位置: 首页>>代码示例>>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;未经允许,请勿转载。