예제 #1
0
 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;
 }
예제 #2
0
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'])];
                }
            }
예제 #3
0
  $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'];
예제 #4
0
/**
 * 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);
예제 #5
0
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;
}