示例#1
0
function fn_ebay_check_license($silent = false, $skip_messages = false)
{
    // addons.ebay.ebay_license_number
    $license_number = Registry::get(str_rot13('nqqbaf.ronl.ronl_yvprafr_ahzore'));
    $_SESSION['eauth'] = time();
    if (empty($license_number)) {
        if (!$silent) {
            // ebay_empty_license_number
            fn_set_notification('E', __('error'), __(str_rot13('ronl_rzcgl_yvprafr_ahzore')));
        }
        return false;
    } else {
        // Some HD checking code
        $data = Helpdesk::getLicenseInformation($license_number, array('edition' => 'EBAY'));
        list($license_status, , $messages) = Helpdesk::parseLicenseInformation($data, array(), false);
        if (!empty($messages) && !$skip_messages) {
            foreach ($messages as $message) {
                fn_set_notification($message['type'], $message['title'], $message['text']);
            }
        }
        if ($license_status == 'ACTIVE') {
            return 'A';
        } elseif ($license_status == '') {
            // Timeout
            fn_set_notification('E', __('error'), __('unable_to_check_license'));
            return 'T';
        } else {
            return 'I';
        }
    }
}
示例#2
0
function fn_settings_actions_upgrade_center_license_number(&$new_value, &$old_value)
{
    if (empty($new_value)) {
        $new_value = $old_value;
        fn_set_notification('E', __('error'), __('license_number_cannot_be_empty'));
        return false;
    }
    $mode = fn_get_storage_data('store_mode');
    $data = Helpdesk::getLicenseInformation($new_value);
    list($license_status, $updates, $messages) = Helpdesk::parseLicenseInformation($data, $_SESSION['auth'], true);
    if ($license_status == 'ACTIVE' && ($mode != 'full' || empty($old_value))) {
        fn_set_storage_data('store_mode', 'full');
        $_SESSION['mode_recheck'] = true;
    } else {
        if ($license_status != 'ACTIVE') {
            $new_value = $old_value;
        }
    }
}
示例#3
0
function fn_ebay_check_license($silent = false, $skip_messages = false)
{
    // addons.ebay.ebay_license_number
    $license_number = Registry::get(str_rot13('nqqbaf.ronl.ronl_yvprafr_ahzore'));
    Tygh::$app['session']['eauth'] = time();
    if (empty($license_number)) {
        if (!$silent) {
            // ebay_empty_license_number
            fn_set_notification('E', __('error'), __(str_rot13('ronl_rzcgl_yvprafr_ahzore')));
        }
        return false;
    } else {
        // Some HD checking code
        $data = Helpdesk::getLicenseInformation($license_number, array('edition' => 'EBAY'));
        list($license_status, , $messages, $params) = Helpdesk::parseLicenseInformation($data, array(), false);
        if (!$skip_messages) {
            foreach ($messages as $key => $message) {
                if ($message['type'] == 'E') {
                    fn_set_notification($message['type'], $message['title'], $message['text']);
                }
            }
        }
        if (isset($params['trial_left_time'])) {
            fn_set_storage_data('ebay_trial_expiry_time', TIME + $params['trial_left_time']);
        }
        if (in_array($license_status, array('ACTIVE', 'TRIAL'))) {
            return 'A';
        } elseif ($license_status == '') {
            // Timeout
            fn_set_notification('E', __('error'), __('unable_to_check_license'));
            return 'T';
        } else {
            return 'I';
        }
    }
}
示例#4
0
             if (!empty($_REQUEST['update_all_vendors'][$k])) {
                 Settings::instance()->resetAllVendorsSettings($k);
             }
         }
     }
     $_suffix = ".manage";
     if (defined('AJAX_REQUEST')) {
         exit;
     }
 }
 if ($mode == 'change_store_mode') {
     if ($_REQUEST['store_mode'] == 'full') {
         if (empty($_REQUEST['license_number'])) {
             fn_set_storage_data('store_mode_errors', serialize(array('empty_number' => array('type' => 'E', 'title' => __('error'), 'text' => __('license_number_cannot_be_empty')))));
         } else {
             $data = Helpdesk::getLicenseInformation($_REQUEST['license_number'], array('store_mode_selector' => 'Y'));
             list($license_status, $updates, $messages) = Helpdesk::parseLicenseInformation($data, $auth, false);
             if ($license_status == 'ACTIVE') {
                 // Save data
                 Settings::instance()->updateValue('license_number', $_REQUEST['license_number']);
                 fn_set_storage_data('store_mode', 'full');
             } else {
                 if (empty($messages)) {
                     $messages['unable_to_check'] = array('type' => 'E', 'title' => __('error'), 'text' => __('unable_to_check_license'));
                 }
                 fn_set_storage_data('store_mode_errors', serialize($messages));
                 fn_set_storage_data('store_mode_license', $_REQUEST['license_number']);
             }
             $_SESSION['mode_recheck'] = true;
         }
     } else {
            $uc_settings = Settings::instance()->getValues('Upgrade_center');
            $is_valid = fn_get_contents(Registry::get('config.resources.updates_server') . '/index.php?dispatch=validators.validate_request&token=' . $_REQUEST['token'] . '&license_key=' . $uc_settings['license_number']);
            if ($is_valid == 'valid') {
                $data = simplexml_load_string(urldecode($_REQUEST['request']));
                Helpdesk::processMessages($data->Messages);
                echo 'OK';
                exit(0);
            } else {
                return array(CONTROLLER_STATUS_NO_PAGE);
            }
        }
    }
}
if ($mode == 'auth') {
    header('Content-Type: image/png');
    echo base64_decode('iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlJJREFUeNqkUztoVEEUPfN5k7gf4q4J6yduxKDRQhBEUCQ2KbaJCiI2Wtgt0cJCUEGxshJs/EBSWCoWFhKxULtFDUYXBUFMjJFl1WVBVkX39/a9N96ZfbtuoYU4cLgz8+45986ZeUxrjf8ZMjfBTIxxjqzgyAiJpBT0Qf4ZXKDCGR4whhni/ZQ0ASE7mE4cH9qYGFYRpRhlciHATeyA1owQtFpurVgYbXwqmsKXJVU1AhlDrjerquU3IShREqkDhGRGbQrGVDQ9MkwCmbaAtAJJU9mQV1/4CFAMKh8QFB5Dv7kDXi2DE5kxe1xw1afIuqSd2/MK2DZN5ebcdbRe3QLqXyG3H4Vz+DbE1gNdsjG9DVjYDs03HrbtPr1iozbrwU3g46eBveeIyqAXZi0Zvt8V4F13w/PGTy1gxdQ8nMmrVhSPzgCll8Cuk9CxNcQlsuch+JtAkL8B/f4hWGobMDlNF5yCfnKJkvqBLQfhGTJBB0AQ9Aiw0AM9fw3IXQTuHmu/lJ0noCvL0NQFG9nTFfCJ7PcIuKZdIyCmKDGbB358Bgo5YO0O23bwZREsseG3gAeXABm+5FLnnjvDmlWvgDlRS5JujQr0tQVIsFpFyaSw14eMv5gZ2zd+RDZq0d6rMpUNoRdmT6lINX/v3U3yICuelYGJVUi7nh6NrxsaEPGoRD8ZphTgONSBA04QBIf2ghZvLL6oLBWX6/fPL+G5eR3p9RGkzo5h/+YYdkNjpXG347IfRgsfdHB8e/sdc9NlzJY9lI3AAIFKQvzjn0xyaPwSYACS4hG3ZjB6zgAAAABJRU5ErkJggg==');
    if (Tygh::$app['session']['auth']['area'] == 'A' && !empty(Tygh::$app['session']['auth']['user_id'])) {
        $domains = '';
        if (fn_allowed_for('ULTIMATE')) {
            $storefronts = db_get_fields('SELECT storefront FROM ?:companies WHERE storefront != ""');
            if (!empty($storefronts)) {
                $domains = implode(',', $storefronts);
            }
        }
        $extra_fields = array('token' => Helpdesk::token(true), 'store_key' => Helpdesk::getStoreKey(), 'domains' => $domains);
        $data = Helpdesk::getLicenseInformation('', $extra_fields);
        Helpdesk::parseLicenseInformation($data, $auth);
    }
    exit;
}
return array(CONTROLLER_STATUS_NO_PAGE);