/** * 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')); } }
public static function updateInstallID() { $result = array(); if (lC_Server_info_Admin::updateInstallID($_GET['id'])) { $result['rpcStatus'] = RPC_STATUS_SUCCESS; } echo json_encode($result); }
</legend> <ul class="list spaced addons-list"><?php echo lC_Server_info_Admin::listAddons(); ?> </ul> </fieldset> </div> <div class="six-columns twelve-columns-tablet"> <fieldset class="fieldset large-margin-right"> <legend class="legend"><?php echo $lC_Language->get('heading_legend_hooks_running'); ?> </legend> <ul class="list spaced hooks-list"><?php echo lC_Server_info_Admin::checkHooks(); ?> </p> </fieldset> </div> <div class="new-row twelve-columns-tablet"> <p class="align-center"> <span> <a href="http://www.loaded7.com" target="_blank"><?php echo lc_image(lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . '&action=image'), 'Loaded Commerce'); ?> <br /><b><?php echo $lC_Language->get('text_version') . ' ' . utility::getVersion(); ?> </b></a>