function getOutput()
 {
     $cache_file = DIR_FS_CACHE . 'oscommerce_version_check.cache';
     $current_version = tep_get_version();
     $new_version = false;
     if (file_exists($cache_file)) {
         $date_last_checked = tep_datetime_short(date('Y-m-d H:i:s', filemtime($cache_file)));
         $releases = unserialize(implode('', file($cache_file)));
         foreach ($releases as $version) {
             $version_array = explode('|', $version);
             if (version_compare($current_version, $version_array[0], '<')) {
                 $new_version = true;
                 break;
             }
         }
     } else {
         $date_last_checked = MODULE_ADMIN_DASHBOARD_VERSION_CHECK_NEVER;
     }
     $output = '<table border="0" width="100%" cellspacing="0" cellpadding="4">' . '  <tr class="dataTableHeadingRow">' . '    <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_VERSION_CHECK_TITLE . '</td>' . '    <td class="dataTableHeadingContent" align="right">' . MODULE_ADMIN_DASHBOARD_VERSION_CHECK_DATE . '</td>' . '  </tr>';
     if ($new_version == true) {
         $output .= '  <tr>' . '    <td class="messageStackWarning" colspan="2">' . tep_image('images/icons/warning.gif', ICON_WARNING) . '&nbsp;<strong>' . MODULE_ADMIN_DASHBOARD_VERSION_CHECK_UPDATE_AVAILABLE . '</strong></td>' . '  </tr>';
     }
     $output .= '  <tr class="dataTableRow" onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . '    <td class="dataTableContent"><a href="' . tep_href_link('version_check.php') . '">' . MODULE_ADMIN_DASHBOARD_VERSION_CHECK_CHECK_NOW . '</a></td>' . '    <td class="dataTableContent" align="right">' . $date_last_checked . '</td>' . '  </tr>' . '</table>';
     return $output;
 }
 function email($headers = '')
 {
     global $phpMail;
     $phpMail->XMailer = 'osCommerce ' . tep_get_version();
     $phpMail->SMTPDebug = $this->debug;
     $phpMail->Debugoutput = $this->debug_output;
     $phpMail->CharSet = CHARSET;
     $phpMail->WordWrap = 998;
     if (EMAIL_LINEFEED == 'CRLF') {
         $this->lf = "\r\n";
     } else {
         $this->lf = "\n";
     }
 }
Пример #3
0
function tep_get_system_information()
{
    global $HTTP_SERVER_VARS;
    $db_query = tep_db_query("select now() as datetime");
    $db = tep_db_fetch_array($db_query);
    @(list($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5));
    $data = array();
    $data['oscommerce'] = array('version' => tep_get_version());
    $data['system'] = array('date' => date('Y-m-d H:i:s O T'), 'os' => PHP_OS, 'kernel' => $kernel, 'uptime' => @exec('uptime'), 'http_server' => $HTTP_SERVER_VARS['SERVER_SOFTWARE']);
    $data['mysql'] = array('version' => tep_db_get_server_info(), 'date' => $db['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'), 'magic_quotes_gpc' => (int) @ini_get('magic_quotes_gpc'), 'register_globals' => (int) @ini_get('register_globals'), 'filter.default' => @ini_get('filter.default'), 'zend.ze1_compatibility_mode' => (int) @ini_get('zend.ze1_compatibility_mode'), 'unicode.semantics' => (int) @ini_get('unicode.semantics'), 'zend_thread_safty' => (int) function_exists('zend_thread_id'), 'extensions' => get_loaded_extensions());
    return $data;
}
Пример #4
0
    define('MH_PLATFORM_XTC_SEO', preg_match('/commerce:SEO/', PROJECT_VERSION));
    define('MH_PLATFORM_XTC_ECB', preg_match('/eComBASE/', PROJECT_VERSION));
} elseif (defined('FILENAME_ADVANCED_MENU')) {
    define('MH_PLATFORM', 'digistore');
} elseif (preg_match('/CRE Loaded/', PROJECT_VERSION) || preg_match('/Loaded/', PROJECT_VERSION)) {
    // CRE Loaded PCI B2B
    define('MH_PLATFORM', 'creloaded');
    if (preg_match('/CRE Loaded PCI B2B/', PROJECT_VERSION) || preg_match('/Loaded Commerce B2B/', PROJECT_VERSION)) {
        define('MH_PLATFORM_CRE', 'B2B');
    } else {
        define('MH_PLATFORM_CRE', '');
    }
} else {
    define('MH_PLATFORM', 'oscommerce');
    if (function_exists('tep_get_version')) {
        define('MH_PLATFORM_OSC', (double) tep_get_version());
    } else {
        define('MH_PLATFORM_OSC', '2.2');
    }
    if (MH_PLATFORM_OSC > 2.2) {
        mh_define('MH_PLATFORM_OSC_23', true);
    }
    define('MH_PLATFORM_OSCMAX_25', preg_match('/osCmax v2.5/', PROJECT_VERSION));
    define('MH_PLATFORM_TRUELOADED', preg_match('/Trueloaded/', PROJECT_VERSION));
    // WP Online Store
    if (defined('WPOLS_PLUGINS_DIR')) {
        define('MH_PLATFORM_OSC_WPOS', PROJECT_VERSION);
        define('MH_FORM_METHOD', 'post');
        define('MH_PAGE_NAME', 'pages');
        $post = MAILBEEZ_MAILHIVE_WPOLS_PAGE_ID;
        if (MH_CONTEXT == 'STORE') {
Пример #5
0
 function sendTransactionToGateway($url, $parameters = null, $curl_opts = array())
 {
     $server = parse_url($url);
     if (isset($server['port']) === false) {
         $server['port'] = $server['scheme'] == 'https' ? 443 : 80;
     }
     if (isset($server['path']) === false) {
         $server['path'] = '/';
     }
     $header = array('Stripe-Version: ' . $this->api_version, 'User-Agent: OSCOM ' . tep_get_version());
     if (is_array($parameters) && !empty($parameters)) {
         $post_string = '';
         foreach ($parameters as $key => $value) {
             $post_string .= $key . '=' . urlencode(utf8_encode(trim($value))) . '&';
         }
         $post_string = substr($post_string, 0, -1);
         $parameters = $post_string;
     }
     $curl = curl_init($server['scheme'] . '://' . $server['host'] . $server['path'] . (isset($server['query']) ? '?' . $server['query'] : ''));
     curl_setopt($curl, CURLOPT_PORT, $server['port']);
     curl_setopt($curl, CURLOPT_HEADER, false);
     curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
     curl_setopt($curl, CURLOPT_FORBID_REUSE, true);
     curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);
     curl_setopt($curl, CURLOPT_USERPWD, MODULE_PAYMENT_STRIPE_SECRET_KEY . ':');
     curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
     if (!empty($parameters)) {
         curl_setopt($curl, CURLOPT_POST, true);
         curl_setopt($curl, CURLOPT_POSTFIELDS, $parameters);
     }
     if (MODULE_PAYMENT_STRIPE_VERIFY_SSL == 'True') {
         curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
         curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
         if (file_exists(DIR_FS_CATALOG . 'ext/modules/payment/stripe/stripe.com.crt')) {
             curl_setopt($curl, CURLOPT_CAINFO, DIR_FS_CATALOG . 'ext/modules/payment/stripe/stripe.com.crt');
         } elseif (file_exists(DIR_FS_CATALOG . 'includes/cacert.pem')) {
             curl_setopt($curl, CURLOPT_CAINFO, DIR_FS_CATALOG . 'includes/cacert.pem');
         }
     } else {
         curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
     }
     if (tep_not_null(MODULE_PAYMENT_STRIPE_PROXY)) {
         curl_setopt($curl, CURLOPT_HTTPPROXYTUNNEL, true);
         curl_setopt($curl, CURLOPT_PROXY, MODULE_PAYMENT_STRIPE_PROXY);
     }
     if (!empty($curl_opts)) {
         foreach ($curl_opts as $key => $value) {
             curl_setopt($curl, $key, $value);
         }
     }
     $result = curl_exec($curl);
     curl_close($curl);
     return $result;
 }
Пример #6
0
<?php

/*
  $Id$

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

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/
require 'includes/application_top.php';
$current_version = tep_get_version();
$major_version = (int) substr($current_version, 0, 1);
$releases = null;
$new_versions = array();
$check_message = array();
if (function_exists('curl_init')) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'http://www.oscommerce.com/version/online_merchant/' . $major_version);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $response = trim(curl_exec($ch));
    curl_close($ch);
    if (!empty($response)) {
        $releases = explode("\n", $response);
    }
} else {
    if ($fp = @fsockopen('www.oscommerce.com', 80, $errno, $errstr, 30)) {
        $header = 'GET /version/online_merchant/' . $major_version . ' HTTP/1.0' . "\r\n" . 'Host: www.oscommerce.com' . "\r\n" . 'Connection: close' . "\r\n\r\n";
        fwrite($fp, $header);
Пример #7
0
body, td, th {font-family: sans-serif; font-size: 10px;}
.p {text-align: left;}
.e {background-color: #ccccff; font-weight: bold;}
.h {background-color: #9999cc; font-weight: bold;}
.v {background-color: #cccccc;}
i {color: #666666;}
hr {display: none;}
</style>
<?php 
        ob_start();
        phpinfo();
        $phpinfo = ob_get_contents();
        ob_end_clean();
        $phpinfo = str_replace('border: 1px', '', $phpinfo);
        preg_match('/<body>(.*)<\\/body>/is', $phpinfo, $regs);
        echo '<table border="1" cellpadding="3" width="600" style="border: 0px; border-color: #000000;">' . '  <tr><td><a href="http://www.oscommerce.com"><img border="0" src="images/oscommerce.png" title="osCommerce Online Merchant v' . tep_get_version() . '" /></a><h1 class="p">osCommerce Online Merchant v' . tep_get_version() . '</h1></td>' . '  </tr>' . '</table>';
        echo $regs[1];
    } else {
        phpinfo();
    }
    ?>
        </td>
      </tr>
<?php 
}
?>
    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>
<!-- body_eof //-->
Пример #8
0
  $Id$

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

  Copyright (c) 2008 osCommerce

  Released under the GNU General Public License
*/
if ($messageStack->size > 0) {
    echo $messageStack->output();
}
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2"><?php 
echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.png', 'osCommerce Online Merchant v' . tep_get_version()) . '</a>';
?>
</td>
  </tr>
  <tr class="headerBar">
    <td class="headerBarContent">&nbsp;&nbsp;<?php 
echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '" class="headerLink">' . HEADER_TITLE_ADMINISTRATION . '</a> &nbsp;|&nbsp; <a href="' . tep_catalog_href_link() . '" class="headerLink">' . HEADER_TITLE_ONLINE_CATALOG . '</a> &nbsp;|&nbsp; <a href="http://www.oscommerce.com" class="headerLink">' . HEADER_TITLE_SUPPORT_SITE . '</a>';
?>
</td>
    <td class="headerBarContent" align="right"><?php 
echo tep_session_is_registered('admin') ? 'Logged in as: ' . $admin['username'] . ' (<a href="' . tep_href_link(FILENAME_LOGIN, 'action=logoff') . '" class="headerLink">Logoff</a>)' : '';
?>
&nbsp;&nbsp;</td>
  </tr>
</table>
Пример #9
0
<?php 
}
?>
 
<nav class="navbar navbar-default" role="navigation">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
	  <?php 
echo '<a class="navbar-brand" href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.png', 'osCommerce Online Merchant v' . tep_get_version(), '', '', 'class="img-responsive"') . '</a>';
?>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Documentation</a></li>
        <li><a href="#">Quick help</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">+ New Element<span class="caret"></span></a>
          <ul class="dropdown-menu" role="menu">
            <li><a data-action="create_header" data-type="nav" class="action "href="#">New nav</a></li>
            <li><a data-action="create_header" data-type="navtoggle" class="action "href="#">New *NavToggle</a></li>
            <li class="divider"></li>
            <li><a data-action="create_header" data-type="div" class="action "href="#">New divider</a></li>
Пример #10
0
function tep_get_system_information($anonymous = false)
{
    global $HTTP_SERVER_VARS;
    $db_query = tep_db_query("select now() as datetime");
    $db = tep_db_fetch_array($db_query);
    list($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5);
    $data = array();
    $data['oscommerce'] = array('version' => tep_get_version());
    $data['system'] = array('date' => tep_datetime_short(date('Y-m-d H:i:s')), 'os' => PHP_OS, 'kernel' => $kernel, 'host' => $host, 'uptime' => @exec('uptime'), 'ip' => gethostbyname($host), 'http_server' => $HTTP_SERVER_VARS['SERVER_SOFTWARE']);
    $data['mysql'] = array('version' => 'MySQL ' . (function_exists('mysql_get_server_info') ? mysql_get_server_info() : ''), 'server' => DB_SERVER, 'ip' => gethostbyname(DB_SERVER), 'date' => tep_datetime_short($db['datetime']));
    $data['php'] = array('version' => PHP_VERSION, 'zend' => function_exists('zend_version') ? 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'), 'magic_quotes_gpc' => (int) @ini_get('magic_quotes_gpc'), 'register_globals' => (int) @ini_get('register_globals'), 'filter.default' => @ini_get('filter.default'), 'zend.ze1_compatibility_mode' => (int) @ini_get('zend.ze1_compatibility_mode'), 'unicode.semantics' => (int) @ini_get('unicode.semantics'), 'zend_thread_safty' => (int) function_exists('zend_thread_id'), 'extensions' => get_loaded_extensions());
    // If we need anonymous data we need to remove some data which could
    // potentially be used to identify a particular installation. A SHA1 hash
    // is used purely to identify duplicate submissions
    if ($anonymous === true) {
        $data['system']['host'] = sha1($data['system']['host'] . $data['system']['ip']);
        $data['system']['ip'] = '0.0.0.0';
        $data['system']['uptime'] = '0';
        $data['mysql']['server'] = '';
        $data['mysql']['ip'] = '';
    }
    return $data;
}
Пример #11
0
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2014 osCommerce

  Released under the GNU General Public License
*/
if ($messageStack->size > 0) {
    echo $messageStack->output();
}
?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2"><?php 
echo '<a href="' . tep_href_link('index.php') . '">' . tep_image('images/oscommerce.png', 'osCommerce Online Merchant v' . tep_get_version()) . '</a>';
?>
</td>
  </tr>
  <tr class="headerBar">
    <td class="headerBarContent">&nbsp;&nbsp;<?php 
echo '<a href="' . tep_href_link('index.php') . '" class="headerLink">' . HEADER_TITLE_ADMINISTRATION . '</a> &nbsp;|&nbsp; <a href="' . tep_catalog_href_link() . '" class="headerLink">' . HEADER_TITLE_ONLINE_CATALOG . '</a> &nbsp;|&nbsp; <a href="http://www.oscommerce.com" class="headerLink">' . HEADER_TITLE_SUPPORT_SITE . '</a>';
?>
</td>
    <td class="headerBarContent" align="right"><?php 
echo tep_session_is_registered('admin') ? 'Logged in as: ' . $admin['username'] . ' (<a href="' . tep_href_link('login.php', 'action=logoff') . '" class="headerLink">Logoff</a>)' : '';
?>
&nbsp;&nbsp;</td>
  </tr>
</table>
 /**
  * @param string $path
  * @param bool $authenticationRequired
  * @return string
  */
 protected function getApiUrl($path, $authenticationRequired = null)
 {
     $serverUrl = tep_output_string_protected(MODULE_HEADER_TAGS_DARWINPRICING_SERVER_URL);
     $clientId = (int) MODULE_HEADER_TAGS_DARWINPRICING_CLIENT_ID;
     $clientSecret = tep_output_string_protected(MODULE_HEADER_TAGS_DARWINPRICING_CLIENT_SECRET);
     $serverUrl = rtrim($serverUrl, '/');
     $apiUrl = $serverUrl . $path;
     $parameterList = array('platform' => 'oscommerce-' . tep_get_version(), 'site-id' => $clientId);
     if ($authenticationRequired) {
         $parameterList['hash'] = $clientSecret;
         $parameterList['visitor-ip'] = $this->getRemoteIp();
     }
     $apiUrl .= '?' . http_build_query($parameterList);
     return $apiUrl;
 }
 function before_process()
 {
     global $order;
     $_SESSION['paymill_identifier'] = time();
     $this->paymentProcessor->setToken((string) $_POST['paymill_token']);
     $this->paymentProcessor->setAmount((int) $this->format_raw($order->info['total']));
     $this->paymentProcessor->setApiUrl((string) $this->apiUrl);
     $this->paymentProcessor->setCurrency((string) strtoupper($order->info['currency']));
     $this->paymentProcessor->setDescription(utf8_encode(substr((string) STORE_NAME, 0, 128)));
     $this->paymentProcessor->setEmail((string) $order->customer['email_address']);
     $this->paymentProcessor->setName((string) $order->customer['lastname'] . ', ' . $order->customer['firstname']);
     $this->paymentProcessor->setPrivateKey((string) $this->privateKey);
     $this->paymentProcessor->setLogger($this);
     $this->paymentProcessor->setSource($this->version . '_OSCOM_' . tep_get_version());
     $this->fastCheckout->setFastCheckoutFlag($this->fastCheckoutFlag);
     if ($_POST['paymill_token'] == 'dummyToken') {
         $this->fastCheckout();
     }
     $data = $this->fastCheckout->loadFastCheckoutData($_SESSION['customer_id']);
     if (array_key_exists('clientID', $data) && $data['clientID'] != '' && $data['clientID'] != null) {
         $this->existingClient($data);
     }
     if (!$this->preauth) {
         $result = $this->paymentProcessor->processPayment();
         $_SESSION['paymill']['transaction_id'] = $this->paymentProcessor->getTransactionId();
     } else {
         $result = $this->paymentProcessor->processPayment(!$this->preauth);
         $_SESSION['paymill']['preauth_id'] = $this->paymentProcessor->getPreauthId();
     }
     if (!$result) {
         unset($_SESSION['paymill_identifier']);
         $errorCode = $this->paymentProcessor->getErrorCode();
         tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false) . '?step=step2&payment_error=' . $this->code . '&error=' . $errorCode);
     }
     if ($this->fastCheckoutFlag) {
         $this->savePayment();
     } else {
         $this->saveClient();
     }
     unset($_SESSION['paymill_identifier']);
 }