Esempio n. 1
0
 /**
  * Register the new install with the LC API
  *  
  * @access private      
  * @return string
  */
 private function _doRegister($data)
 {
     global $lC_Database, $lC_Cache;
     if (isset($data['activation_email']) && $data['activation_email'] != NULL) {
         $storeEmail = $data['activation_email'];
     } else {
         $storeEmail = STORE_OWNER_EMAIL_ADDRESS;
     }
     if (isset($data['activation_serial']) && $data['activation_serial'] != NULL) {
         $storeSerial = $data['activation_serial'];
     } else {
         $storeSerial = '';
     }
     // register the install with LC API
     $registerArr = array('serial' => $storeSerial, 'storeName' => STORE_NAME, 'storeEmail' => $storeEmail, 'storeWWW' => HTTP_SERVER . DIR_WS_HTTP_CATALOG, 'storeSSL' => HTTPS_SERVER . DIR_WS_HTTPS_CATALOG, 'systemMetaData' => base64_encode(json_encode(lc_get_system_information())), 'serverMetaData' => isset($_SERVER) && is_array($_SERVER) ? base64_encode(json_encode($_SERVER)) : NULL, 'envMetaData' => isset($_ENV) && is_array($_ENV) ? base64_encode(json_encode($_ENV)) : NULL);
     $checksum = hash('sha256', json_encode($registerArr));
     $registerArr['checksum'] = $checksum;
     $api_version = defined('API_VERSION') && API_VERSION != NULL ? API_VERSION : '1_0';
     $registerArr['ver'] = utility::getVersion();
     $request_type = getRequestType();
     $resultXML = transport::getResponse(array('url' => $request_type . '://api.loadedcommerce.com/' . $api_version . '/register/install/', 'method' => 'post', 'parameters' => $registerArr, 'timeout' => 10));
     $newInstallationID = preg_match("'<installationID[^>]*?>(.*?)</installationID>'i", $resultXML, $regs) == 1 ? $regs[1] : NULL;
     $products = preg_match("'<products[^>]*?>(.*?)</products>'i", $resultXML, $regs) == 1 ? $regs[1] : NULL;
     if (lC_Server_info_Admin::updateInstallID($newInstallationID)) {
         return utility::arr2xml(array('error' => FALSE, 'installationID' => $newInstallationID, 'products' => $products));
     } else {
         return utility::arr2xml(array('error' => TRUE, 'message' => 'error processing the request'));
     }
 }
Esempio n. 2
0
<?php

/**
  @package    catalog::admin::applications
  @author     Loaded Commerce
  @copyright  Copyright 2003-2014 Loaded Commerce, LLC
  @copyright  Portions Copyright 2003 osCommerce
  @copyright  Template built on Developr theme by DisplayInline http://themeforest.net/user/displayinline under Extended license 
  @license    https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt
  @version    $Id: main.php v1.0 2013-08-08 datazen $
*/
$lC_ObjectInfo = new lC_ObjectInfo(lc_get_system_information());
//echo "<pre>";
//print_r(lC_Server_info_Admin::getAddons());
//echo "</pre>";
?>
<!-- Main content -->
<section role="main" id="main">
  <noscript class="message black-gradient simpler"><?php 
echo $lC_Language->get('ms_error_javascript_not_enabled_warning');
?>
</noscript>
  <hgroup id="main-title" class="thin">
    <h1><?php 
echo $lC_Template->getPageTitle();
?>
</h1>
  </hgroup>
  <style>
  LABEL { width: 30% !important; }
  </style>