$_SESSION['configuration']['hostname_type'], 'domain_hostname' => $_SESSION['configuration']['domain_hostname'], 'subdomain_hostname' => $_SESSION['configuration']['subdomain_hostname'], 'subdomain' => $_SESSION['configuration']['subdomain'] ); unset($_SESSION['configuration']); $_SESSION['configuration'] = $hostname_settings; } else { ## other package types, just forget all configuration unset($_SESSION['configuration']); } } else { unset($_SESSION['configuration']); } } ## /if(!param('continue')) { ## OTF and SSL plans cannot be sold with domains if(is_array($_SESSION['domains']) && in_array($_SESSION['package']['type']['id'], array( HP_TYPE_ONETIME_FEE_ITEM, HP_TYPE_SSL_SINGLE )) ) { unset($_SESSION['domains']); } ## for domain pointers customer should buy real HP, not only domain registration if(!is_array($_SESSION['package'])) { $register_new_domains = 1; foreach ($_SESSION['domains'] AS $key => $value) { if ($value['dm_action'] == 'domain_pointer') { $register_new_domains = 0; break; } } if(!$register_new_domains) { $_SESSION['error_message'] .= string(STR_SHOULD_BUY_NOT_ONLY_DOMAIN_PACKAGE)."\n"; rollback_step(); } } if($_SESSION['package']['assigned_dm_plan'] && !$_SESSION['domains'] && $_SESSION['sub_steps_order'][0] == 'package' && (!is_array($_SESSION['configuration']) || (is_array($_SESSION['configuration']) && !in_array($_SESSION['configuration']['hostname_type'], array('use_domain', 'use_subdomain')))) ) { redirect('domains.php'); } if (##!$_SESSION['addons'] && ($_SESSION['package']['app_list'] || $_SESSION['package']['custom_attribute_list'] || ($_SESSION['package']['license_list'] && $_SESSION['package_period_id'] !== 'trial') || $_SESSION['package']['sb_plan'])) redirect('addons.php'); redirect('sign_in.php'); } function teaser_step() { $hosting_plans = get_sellable_plan_list( $_GET['type_id'], $_SESSION['campaign']['promotion']['promo_id'], NULL, ##$_SESSION['account']['account_id'], to speed up plan loading $_SESSION['sb_sid'], $_SESSION['sb_node'] ); $plans_to_show = array($hosting_plans); if (is_array($hosting_plans)) foreach ($hosting_plans AS $plans) { // Check if domain package is selected, then show only assigned plans $new_plans = array(); foreach ($plans AS $plan) { if( $_SESSION['domain_package'] && count($_SESSION['domains']) && $plan['assigned_dm_plan'] != $_SESSION['domain_package']['series_key'] ) { ## if (!( ($_SESSION['domain_package'] && $plan['assigned_dm_plan'] == $_SESSION['domain_package']['series_key']) ## || (!$_SESSION['domain_package']))) { unset($plan); } //else if(array_key_exists('category_id', $_GET)) { if((is_array($plan['category']) && $plan['category']['id'] != $_GET['category_id']) || (!is_array($plan['category']) && $_GET['category_id'])) { unset($plan); } } if(array_key_exists('product_id', $_GET) && $_GET['product_id'] != $plan['series_key']) { unset($plan); } if ($plan) $new_plans[] = $plan; } if (count($new_plans)) $plans_to_show[] = $new_plans; } if(!count($plans_to_show)) $_SESSION['error_message'] .= string(STR_NO_ACTIVE_PLANS_FOUND)."\n"; $show_cart = true; $title = string(STR_NEW_ORDER); ##string(STR_HOSTING_PLANS) . ($_GET['type_id'] ? ' » ' . $plans_to_show[0][0]['type']['name'] : ''); $step = 'plans'; include('templates/general.inc'); } function rollback_step() { teaser_step(); exit; } ?>