1) { if (!$_SESSION['userId'] and $usertype == "exists") { if (!$elogin) {$error = $_lang[ErrorNoLogin];} else if (!$epassword) {$error = $_lang[ErrorNoPassword];} else { $auth=userLogOn($elogin,$epassword); if ($auth == '-1') {$error=$_lang[ErrorNonExistsLogin];} else if (!$auth) {$error=$_lang[ErrorBadPassword];} } } else if (!$_SESSION['userId'] and $usertype == "new") { $login=mb_strtolower($login); $email=mb_strtolower($email); if ($noIdenticalMobile and $mobile) { $mobileNumberDB = @mysql_query("select id from users WHERE mobile='$mobile'"); $mobileNumberDB = @mysql_num_rows($mobileNumberDB); } if (!$login) {$error=$_lang[ErrorNoLogin];} else if (preg_match("/^[0-9]/ui",$login)) {$error=$_lang[OrderErrorLoginBegin];} else if (preg_match("/[^a-z0-9]/ui",$login)) {$error=$_lang[OrderErrorLoginSymbols];} else if (strlen($login) < 3 or strlen($login) > 10) {$error=$_lang[OrderErrorLoginLength];} else if (!$password) {$error=$_lang[ErrorNoPassword];} else if (!$repassword) {$error=$_lang[ErrorPasswordNoConfirm];} else if (strlen($password) < 6) {$error=$_lang[ErrorPasswordLength];} else if ($password != $repassword) {$error=$_lang[ErrorPasswordConfirm];} else if (!valid_email($email,$VALID_EMAIL_CHECKMX)) {$error=$_lang[OrderErrorWrongEmail];} else if (IsEmailUsed($email)) {$error=$_lang[OrderErrorEmailExists];} else if ($noIdenticalMobile and $mobile and $mobileNumberDB > 0) { $error=$_lang[OrderErrorMobileExists]; } else if ((($registerNeedMobile == "1" and $mobile) or $registerNeedMobile == "2") and (!preg_match("/^\+\d+\s{1}\d+\s{1}\d+$/u",$mobile) or strlen($mobile) < 8)) {$error=$_lang[OrderErrorField]." ".$_lang[ProfileMobile];} else if ($org != 3 and (($registerNeedFIO == "1" and $surname) or $registerNeedFIO == "2") and mb_strlen($surname) < 3) {$error=$_lang[OrderErrorField]." ".$_lang[ProfileSurname];} else if ($org != 3 and (($registerNeedFIO == "1" and $name) or $registerNeedFIO == "2") and mb_strlen($name) < 2) {$error=$_lang[OrderErrorField]." ".$_lang[ProfileName];} else if ($org != 3 and (($registerNeedFIO == "1" and $otchestvo) or $registerNeedFIO == "2") and mb_strlen($otchestvo) < 3) {$error=$_lang[OrderErrorField]." ".$_lang[ProfileOtchestvo];} else if ($type != "partner" and $attachPDFtoBill and $org == "") {$error = $_lang[OrderErrorNoOrg];} else if ($type != "partner" and $attachPDFtoBill and !$country) {$error=$_lang[OrderErrorField]." ".$_lang[ProfileCountry];} else if ($type != "partner" and $attachPDFtoBill and ($org == "1" or $org == "2") and !$surname) {$error=$_lang[OrderErrorField]." ".$_lang[ProfileSurname];} else if ($type != "partner" and $attachPDFtoBill and ($org == "1" or $org == "2") and !$name) {$error=$_lang[OrderErrorField]." ".$_lang[ProfileName];} else if ($type != "partner" and $attachPDFtoBill and ($org == "1" or $org == "2") and !$otchestvo) {$error=$_lang[OrderErrorField]." ".$_lang[ProfileOtchestvo];} else if ($type != "partner" and $attachPDFtoBill and $org == "3" and !$firma) {$error=$_lang[OrderErrorField]." ".$_lang[ProfileOrg];} else if ($type != "partner" and $attachPDFtoBill and (!preg_match("/^\+\d+\s{1}\d+\s{1}\d+$/u",$phone) or strlen($phone) < 8)) {$error=$_lang[OrderErrorField]." ".$_lang[ProfilePhone];} else if ($needrules and !$rules) {$error=$_lang[OrderErrorNoRules];} else if ($type == "partner" and $needpersonalinfo and !$personalinfo) {$error=$_lang[OrderErrorNoPersonalInfo];} else { $r=@mysql_query("select * from users where login='$login'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($r) > 0) {$error=$_lang[OrderErrorLoginExists];} else { if ($step > 3 or $type == "partner") { if (!$_SESSION['userId'] and $usertype == "new") { if ((GetSetting("captcha_reg") and $_SESSION['captchakey'] == $captchakeyin) or !GetSetting("captcha_reg")) { if ($_SESSION["userLang"]) {$user_lng = $_SESSION["userLang"];} if ($referalLogin) { $referal = GetUserByLogin($referalLogin); $referal = $referal->id; } if ($referal and $partnerEnable) { $refUser = GetUserById($referal); if ($refUser->id) { $partnerMaxReferals = GetSetting("partnerMaxReferals"); $refsCount = GetUserReferalsCount($refUser->id); if ($refUser->partnerMaxReferals > 0 and $refsCount >= $refUser->partnerMaxReferals) { $referal = ""; } else if ($partnerMaxReferals > 0 and $refsCount >= $partnerMaxReferals) { $referal = ""; } else { @mysql_query("update users SET isPartner='1' where id='$refUser->id'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } } else { $referal = ""; } } else { $referal = ""; } @mysql_query("insert into users (login,password,email,datareg,referal,aboutusfromid,currency,lang,mobile,surname,name,otchestvo) values('$login','".crypt($password)."','$email',NOW(),'$referal','$aboutusfromid','".strtoupper($valuta)."','$user_lng','$mobile','$surname','$name','$otchestvo')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); userLogOn("$login","$password"); @mysql_query("insert into users_profile (uid,email,org,country,surname,name,otchestvo,phone,firma,mobile) values('".$_SESSION["userId"]."','$email','$org','$country','$surname','$name','$otchestvo','$phone','$firma','$mobile')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $profileId=mysql_insert_id(); @mysql_query("update users SET defaultProfileId='$profileId' where id='".$_SESSION["userId"]."'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } else if ($type == "partner") { $error=$_lang[ErrorWrongCaptcha]; } } } } } } if ($_SESSION['userId']) { $user = GetUserById($_SESSION['userId']); } else if ($_SESSION['userLogin']) { $user = GetUserByLogin($_SESSION['userLogin']); } if (!$error and $type == "h") { $t = GetTarifById($tarif_id); if ($costId) { $tc = GetTarifsCostById($costId); $t->cost = $tc->cost / GetCurrencyKoeficientByCode($tc->costCurrency); $t->cost_setup = $tc->cost_setup / GetCurrencyKoeficientByCode($tc->cost_setupCurrency); } else { $t->cost = $t->cost / GetCurrencyKoeficientByCode($t->costCurrency); $t->cost_setup = $t->cost_setup / GetCurrencyKoeficientByCode($t->cost_setupCurrency); } if ($t->enableSlots and $slotsCount > 0) { $t->cost = $t->cost*$slotsCount; } $PAGE_TITLE_ITEMNAME = $t->name; if ($selectedZone) {$zone = $selectedZone;} if ($domain and $zone) { $domain=mb_strtolower(trim($domain)); $fulldomain=mb_strtolower(trim($domain).".".$zone); $zones=@mysql_query("select * from zones where zone='$zone' and active='1' order by isDefault desc") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($zones) > 1) { $selectRegistratorFlag = 1; } if (!$zone_id) { $zone_one=mysql_fetch_object($zones); $zone_id = $zone_one->id; } $tzones=@mysql_query("select * from zones where zone='$zone' and id='$zone_id'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $tzones=mysql_fetch_object($tzones); $zid=$tzones->id; if ($step == 2 and $selectRegistratorFlag) { while ($zz = @mysql_fetch_object($zones)) { $idnArr[] = $zz->idn; } if ($tzones->idn == "no" and (in_array("yes", $idnArr) or in_array("only", $idnArr))) { $tzones->idn = "yes"; } else if ($tzones->idn == "only" and (in_array("yes", $idnArr) or in_array("no", $idnArr))) { $tzones->idn = "yes"; } } $warning = $tzones->warning; $domainMinSrok=$tzones->minsrok; if ($domain_reg == "3") {$isTransfer = 1;} else {$isTransfer = 0;} $domainCost = GetDomainCostForUserByZoneId($_SESSION["userId"],$tzones->id,1,$isTransfer) * ($domainMinSrok/12); } else { $fulldomain=mb_strtolower(trim($otherdomain)); $fulldomain=preg_replace("/^www\./ui","",$fulldomain); } if ($fulldomain) { $dom=new domain($fulldomain); $r=@mysql_query("select * from orders where archived=0 and domain='$fulldomain' and startdate<>'0000-00-00'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $k=@mysql_query("select * from orders_domains where domain='$fulldomain' and startdate<>'0000-00-00'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } if (!$tarif_id) {$error=$_lang[OrderErrorNoTarif];} else if ($costId and $tc->tarif_id != $t->id) {$costId=""; $error=$_lang[OrderErrorCostsVariant];} else if ($t->enableSlots and !$slotsCount) {$error=$_lang[OrderErrorNoSlots];} else if ($t->enableSlots and $t->minSlots and $slotsCount < $t->minSlots) {$error=$_lang[OrderErrorMinSlots]." ".$t->minSlots;} else if ($t->enableSlots and $t->maxSlots and $slotsCount > $t->maxSlots) {$error=$_lang[OrderErrorMaxSlots]." ".$t->maxSlots;} else if ($domain_reg == '') {$error=$_lang[OrderErrorNoDomainReg];} else if (((!$domain or !$zone) and ($domain_reg == "1" or $domain_reg == "3")) or (!$otherdomain and $domain_reg == "0") or (!preg_match("/\./ui",$otherdomain) and $domain_reg == "0") or (preg_match("/\.$/ui",$otherdomain) and $domain_reg == "0") or (preg_match("/^\./ui",$otherdomain) and $domain_reg == "0")) {$error=$_lang[OrderErrorNoDomain];} else if (($domain_reg == "1" or $domain_reg == "3") and (mb_strlen($domain) < $tzones->minWidth or mb_strlen($domain) > $tzones->maxWidth)) { $error = $_lang[OrderErrorDomainLength];$error=str_replace("{minWidth}",$tzones->minWidth,$error);$error=str_replace("{maxWidth}",$tzones->maxWidth,$error);} else if (($domain_reg == "1" or $domain_reg == "3") and !preg_match("/^[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9-]*[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}\.[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9-.]*[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}$/u",$fulldomain)) { $error = $_lang[OrderErrorDomainSymbols];} else if (($domain_reg == "1" or $domain_reg == "3") and $tzones->idn == "no" and !preg_match("/^[a-z0-9]{1}[a-z0-9-]*[a-z0-9]{1}$/u",$domain)) { $error = $_lang[OrderErrorDomainSymbolsNoIDN];} else if (($domain_reg == "1" or $domain_reg == "3") and $tzones->idn == "yes" and !preg_match("/^[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9-]*[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}$/u",$domain)) { $error = $_lang[OrderErrorDomainSymbols];} else if (($domain_reg == "1" or $domain_reg == "3") and $tzones->idn == "only" and !preg_match("/^[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9-]*[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}$/u",$domain)) { $error = $_lang[OrderErrorDomainSymbolsOnlyIDN];} else if ($domain_reg == "3" and !$tzones->transferAllow) { $error=$_lang[OrderErrorDomainNoTransferSupport]; } else if ($domain_reg == "1" and !$dom->is_available()) {$error=$_lang[OrderErrorDomainRegistered]; $domainNotAvailable=1;} else if ($domain_reg == "3" and $dom->is_available()) {$error=$_lang[OrderErrorDomainNotRegistered];} else if (@mysql_num_rows($r) > 0) {$error=$_lang[OrderErrorTarifForDomainOrderByAnotherUser];} else if (($domain_reg == "1" or $domain_reg == "3") and @mysql_num_rows($k) > 0) {$error=$_lang[OrderErrorDomainOrderByAnotherUser];} else if (($domain_reg == "1" or $domain_reg == "3") and $tzones->free and $_SESSION['userId'] and $domainFreeLimit > 0 and GetDomainsFreeCountTodayByUserId($_SESSION['userId']) >= $domainFreeLimit) {$error=$_lang[OrderErrorDomainFreeLimit]." ($domainFreeLimit)";} else if ($_SESSION['userId']) { $tarifSpecCost = GetSpecialCost($_SESSION['userId'],"tarif",$t->id); if ($tarifSpecCost and !$costId) { $t->cost_setup = $tarifSpecCost["cost1"]; $t->cost = $tarifSpecCost["cost2"]; if ($t->enableSlots and $slotsCount > 0) { $t->cost = $t->cost*$slotsCount; } } $domainCost = GetDomainCostForUserByZoneId($_SESSION["userId"],$tzones->id,1); $domainCost=$domainCost*($domainMinSrok/12); } if ($domain_reg == "3" and !$tzones->transferRenew and !$tzones->transferCost) { $domainCost = 0; $domainMinSrok = 0; } if ($server) { $serverid = $server; } else if ($t->serverid) { $serverid = $t->serverid; } else { $serverid = 0; } if ($serverid) { $srv = GetServers($serverid); if ($srv->nacenka) { $srvNacenka = $srv->nacenka; } } if ($srvNacenka) { $t->cost=$t->cost+($t->cost/100)*$srvNacenka; } } if (!$error and $type == "d") { if ($selectedZone) {$zone = $selectedZone;} $domain=mb_strtolower(trim($domain)); $fulldomain=mb_strtolower(trim($domain).".".$zone); $PAGE_TITLE_ITEMNAME = $fulldomain; if ($zone) { $zones=@mysql_query("select * from zones where zone='$zone' and active='1' order by isDefault desc") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($zones) > 1) { $selectRegistratorFlag = 1; } if (!$zone_id) { $zone_one=mysql_fetch_object($zones); $zone_id = $zone_one->id; } $tzones=@mysql_query("select * from zones where zone='$zone' and id='$zone_id'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $tzones=mysql_fetch_object($tzones); $zid=$tzones->id; if ($step == 2 and $selectRegistratorFlag) { while ($zz = @mysql_fetch_object($zones)) { $idnArr[] = $zz->idn; } if ($tzones->idn == "no" and (in_array("yes", $idnArr) or in_array("only", $idnArr))) { $tzones->idn = "yes"; } else if ($tzones->idn == "only" and (in_array("yes", $idnArr) or in_array("no", $idnArr))) { $tzones->idn = "yes"; } } $warning = $tzones->warning; $domainMinSrok=$tzones->minsrok; if ($domain_reg == "3") {$isTransfer = 1;} else {$isTransfer = 0;} $domainCost = GetDomainCostForUserByZoneId($_SESSION["userId"],$tzones->id,0,$isTransfer) * ($domainMinSrok/12); } if ($fulldomain) { $dom=new domain($fulldomain); $k=@mysql_query("select * from orders_domains where domain='$fulldomain' and todate>NOW()") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } if (!$domain or !$zone) {$error=$_lang[OrderErrorNoDomain];} else if (mb_strlen($domain) < $tzones->minWidth or mb_strlen($domain) > $tzones->maxWidth) { $error = $_lang[OrderErrorDomainLength]; $error=str_replace("{minWidth}",$tzones->minWidth,$error);$error=str_replace("{maxWidth}",$tzones->maxWidth,$error);} else if ($tzones->idn == "no" and !preg_match("/^[a-z0-9]{1}[a-z0-9-]*[a-z0-9]{1}$/u",$domain)) { $error = $_lang[OrderErrorDomainSymbolsNoIDN];} else if ($tzones->idn == "yes" and !preg_match("/^[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9-]*[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}$/u",$domain)) { $error = $_lang[OrderErrorDomainSymbols];} else if ($tzones->idn == "only" and !preg_match("/^[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9-]*[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}$/u",$domain)) { $error = $_lang[OrderErrorDomainSymbolsOnlyIDN];} else if ($domain_reg == "3" and !$tzones->transferAllow) { $error=$_lang[OrderErrorDomainNoTransferSupport]; } else if ($domain_reg == "1" and !$dom->is_available()) {$error=$_lang[OrderErrorDomainRegistered]; $domainNotAvailable=1;} else if ($domain_reg == "3" and $dom->is_available()) {$error=$_lang[OrderErrorDomainNotRegistered];} else if (@mysql_num_rows($k) > 0) {$error=$_lang[OrderErrorDomainOrderByAnotherUser];} else if ($tzones->free and $_SESSION['userId'] and $domainFreeLimit > 0 and GetDomainsFreeCountTodayByUserId($_SESSION['userId']) >= $domainFreeLimit) {$error=$_lang[OrderErrorDomainFreeLimit]." ($domainFreeLimit)";} else if ($_SESSION['userId']) { if ($domain_reg == "3") {$isTransfer = 1;} else {$isTransfer = 0;} $domainCost = GetDomainCostForUserByZoneId($_SESSION["userId"],$tzones->id,0,$isTransfer); $domainCost=$domainCost*($domainMinSrok/12); } if ($domain_reg == "3" and !$tzones->transferRenew and !$tzones->transferCost) { $domainCost = 0; $domainMinSrok = 0; } } if (!$error and $type == "dopt") { if ($freedomains == '') {$error=$_lang[OrderErrorNoFreeDomains];} else if (!$dnstype) {$error=$_lang[OrderErrorNoDnsType];} } if (!$error and $type == "shop") { $t = GetShopItemById($item_id); $PAGE_TITLE_ITEMNAME = $t->name; if (!$item_id) {$error=$_lang[OrderErrorNoItem];} else if ($_SESSION['userId']) { $itemSpecCost = GetSpecialCost($_SESSION['userId'],"shop",$t->id); if ($itemSpecCost) { $t->cost = $itemSpecCost["cost1"]; } } } if (!$error and $type == "partner") { $chkProfile = GetSetting("checkprofiletype"); $resCheckProfile = checkProfile($chkProfile, $_SESSION["userId"]); if (!$resCheckProfile) { Header("Location: billing.php?do=profile"); exit; } else { Header("Location: billing.php?do=partner"); exit; } } } if ($step > 2 and !$error) { if (!$promocode) { $currentUser = GetUserById($_SESSION["userId"]); if ($currentUser->specialPromoCode and $currentUser->specialPromoCodeForUser) { $promocode = $currentUser->specialPromoCode; } else if ($currentUser->referal or (!$_SESSION["userId"] and $referal)) { if ($currentUser->referal) { $referal = $currentUser->referal; } $referalUser = GetUserById($referal); if ($referalUser->specialPromoCode and $referalUser->specialPromoCodeForReferals) { $promocode = $referalUser->specialPromoCode; } } } } if ($step > 2 and !$error and $type == "h") { $months=@intval($months); if (@is_array($addons)) {$selectedAddons=$addons;} else {$selectedAddons=@mb_split(":x:",$addons);} if (@is_array($addonsInputCnt)) {$selectedAddonsInputCnt=$addonsInputCnt;} else {$selectedAddonsInputCnt=parseRPStrArray($addonsInputCnt,":x:",":");} while (list($k,$v) = @each($selectedAddons)) { if ($v) { $selectedAddon = GetAddonById($v); if ($selectedAddon->isOs or $selectedAddon->isPanel) { $selectedAddonsInputCnt[$v] = 1; } if ($selectedAddonsInputCnt[$v] < 0) { $selectedAddonsInputCnt[$v] = -1 * $selectedAddonsInputCnt[$v]; } if ($selectedAddon->cntforoneorder and $selectedAddonsInputCnt[$v] > $selectedAddon->cntforoneorder) { $addonsCntError = $_lang[OrderErrorAddonsCntWrong]." ".$selectedAddon->name.": ".$selectedAddon->cntforoneorder." ".$_lang[FakturaSokraschenieShtuka]; break; } } } if (!$months or $months <= 0) {$error=$_lang[OrderErrorNoSrokZakaza];} else if (($domain_reg == "1" or $domain_reg == "3") and !$license and ($tzones->licenseRequired == "yes" or ($tzones->licenseRequired == "idn" and preg_match("/[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ]+/u",$domain)))) {$error=$_lang[OrderErrorNoLicense];} else if ($domain_reg == "3" and $tzones->transferNeedAuth and !$transferAuth) {$error=$_lang[OrderErrorNoTransferAuth];} else if ($addonsCntError) { $error = $addonsCntError; } else { $hostmonths = $months; $host_setup = $t->cost_setup; $hostcost = $t->cost; $tsroki=@mysql_query("select discount from tarifs_sroki where tarif_id='$tarif_id' and months='$hostmonths' and `order`='1'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($tsroki) > 0) { $tsroki=mysql_fetch_object($tsroki); $srokDiscount=$tsroki->discount; } else { $srokDiscount=0; } $host=$hostcost*$hostmonths; $host=$host-($host/100)*$srokDiscount+$host_setup; # Учитываем скидку на хостинг при регистрации клиента с указанием источника имеющего скидку # if ($aboutusfromid and $host > 0) { $host=$host-($host/100)*GetAboutUsFromDiscount($aboutusfromid,'host'); } $addonsCost=0; $addonsToSave=""; $addonsToSaveText=""; reset($selectedAddons); while (list($k,$v) = @each($selectedAddons)) { if ($v) { $selectedAddon = GetAddonById($v); if ($selectedAddon->isOs or $selectedAddon->isPanel) { $selectedAddonsInputCnt[$v] = 1; } if ($selectedAddonsInputCnt[$v] < 0) { $selectedAddonsInputCnt[$v] = -1 * $selectedAddonsInputCnt[$v]; } if ($addonsToSaveText) { $addonsToSaveText = $addonsToSaveText.", ".$selectedAddon->name." - ".intval($selectedAddonsInputCnt[$v])." ".$_lang[FakturaSokraschenieShtuka]; } else { $addonsToSaveText = $selectedAddon->name." - ".intval($selectedAddonsInputCnt[$v])." ".$_lang[FakturaSokraschenieShtuka]; } # if ($addonsToSave) { $zz = 0; while ($zz < intval($selectedAddonsInputCnt[$v])) { $zz++; $addonsToSave = $addonsToSave.":x:$selectedAddon->id"; } # } else { # $addonsToSave = $selectedAddon->id; # } #Устанавливаем спец. цену, если она указана для данной доп. услуги и данного пользователя # $addonSpecCost = GetSpecialCost($_SESSION['userId'],"addon",$selectedAddon->id); if ($addonSpecCost) { $currCost = $addonSpecCost["cost1"]*intval($selectedAddonsInputCnt[$v]) + $addonSpecCost["cost2"]*$hostmonths*intval($selectedAddonsInputCnt[$v]); } else { $selectedAddon->cost_start = $selectedAddon->cost_start / GetCurrencyKoeficientByCode($selectedAddon->cost_startCurrency); $selectedAddon->cost_monthly = $selectedAddon->cost_monthly / GetCurrencyKoeficientByCode($selectedAddon->cost_monthlyCurrency); $currCost = $selectedAddon->cost_start*intval($selectedAddonsInputCnt[$v]) + $selectedAddon->cost_monthly*$hostmonths*intval($selectedAddonsInputCnt[$v]); } if ($promocode and $currCost > 0) { $coupon = GetCoupon("promo",$promocode,0,"addon",$selectedAddon->id); if (IsCanUseCoupon($coupon->id,$_SESSION["userId"])) { $promoIds[] = $coupon->id; $promoSkidkaAddon = $coupon->value; $promoMaxSrokAddon = $coupon->addonsMaxSrok; $promoTXT = ", promo-code $promocode"; $promoCodeTXT = $promocode; $calcRes = calculatePromoDiscountWithMaxSrok($currCost, $hostmonths, $promoMaxSrokAddon, $promoSkidkaAddon); $promoTotal += $calcRes[summDiscount]; $currCost = $calcRes[totalSummWithDiscount]; } } $addonsCost += $currCost; } } if (!$addonsToSaveText) { $addonsToSaveText=$_lang[No]; } # Учитываем скидку на доп. услуги при регистрации клиента с указанием источника имеющего скидку # if ($aboutusfromid and $addonsCost > 0) { $addonsCost=$addonsCost-($addonsCost/100)*GetAboutUsFromDiscount($aboutusfromid,'addon'); } $dom=0; if ($domain_reg == "1" or $domain_reg == "3") { if ($domain_reg == "3") {$isTransfer = 1;} else {$isTransfer = 0;} $domaincost = GetDomainCostForUserByZoneId($_SESSION["userId"],$tzones->id,1,$isTransfer); $domainminsrok=$tzones->minsrok; if ($domain_reg == "3" and !$tzones->transferRenew and !$tzones->transferCost) { $domaincost = 0; $domainminsrok = 0; } $dom=$domaincost*($domainminsrok/12); # Учитываем скидку на домен при регистрации клиента с указанием источника имеющего скидку # if ($aboutusfromid and $dom > 0) { $dom=$dom-($dom/100)*GetAboutUsFromDiscount($aboutusfromid,'domain'); } if ($certOrder) { $certCost = GetSetting("sertificateCost"); } else { $certCost = 0; } $pr = GetUserProfileByUserId($_SESSION['userId'],$profileId); if ($tzones->privacy == "person" and $pr->org == "3") { $privacyOrder = 0; $privacyCost = 0; } else if ($tzones->privacy and $tzones->privacy_required and !$privacyOrder) { $privacyOrder = 1; } if ($privacyOrder) { $privacyCost = $tzones->privacy_cost; } else { $privacyCost = 0; } if ($localContactOrder) { $localContactCost = $tzones->localContact_cost; } else { $localContactCost = 0; } $allsumm = $host+$dom+$certCost+$addonsCost+$privacyCost+$localContactCost; $domainfree = 0; $tfreedomains=@mysql_query("select * from tarifs_freedomains where tarif_id='$tarif_id' and zone='$zone' and hostmonths='$hostmonths' and renew='0'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($tfreedomains) > 0) {$domainfree=1;} $tfreedomains=@mysql_query("select * from tarifs_freedomains where tarif_id='$tarif_id' and zone='$zone' and ordersum > 0 and ordersum <= $allsumm and renew='0'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($tfreedomains) > 0) {$domainfree=1;} if ($domainfree) {$dom=0; $bonus=$_lang[OrderFreeDomainInZone]." .$zone";} } if ($promocode and $host > 0) { $coupon = GetCoupon("promo",$promocode,0,"tarif",$tarif_id); if (IsCanUseCoupon($coupon->id,$_SESSION["userId"])) { $promoIds[] = $coupon->id; $promoSkidkaTarif = $coupon->value; $promoMaxSrokTarif = $coupon->tarifsMaxSrok; $promoTXT = ", promo-code $promocode"; $promoCodeTXT = $promocode; } } if ($promocode and $dom > 0) { $coupon = GetCoupon("promo",$promocode,0,"zone",$zid); if (IsCanUseCoupon($coupon->id,$_SESSION["userId"])) { $promoIds[] = $coupon->id; $promoSkidkaZone = $coupon->value; $promoMaxSrokZone = $coupon->zonesMaxSrok; $promoTXT = ", promo-code $promocode"; $promoCodeTXT = $promocode; } } if ($promoSkidkaTarif) { $calcRes = calculatePromoDiscountWithMaxSrok($host, $hostmonths, $promoMaxSrokTarif, $promoSkidkaTarif); $promoTotal += $calcRes[summDiscount]; $host = $calcRes[totalSummWithDiscount]; } $host = round($host,2); $addonsCost=round($addonsCost,2); if ($promoSkidkaZone) { $calcRes = calculatePromoDiscountWithMaxSrok($dom, $domainminsrok, $promoMaxSrokZone, $promoSkidkaZone); $promoTotal += $calcRes[summDiscount]; $dom = $calcRes[totalSummWithDiscount]; } $dom = round($dom+$certCost+$privacyCost+$localContactCost,2); $allsumm = $host+$addonsCost+$dom; } } if ($step > 2 and !$error and $type == "d") { if ($useDefaultNS) { $ns1 = $tzones->defaultNS1; $ns2 = $tzones->defaultNS2; $ns3 = $tzones->defaultNS3; $ns4 = $tzones->defaultNS4; } $ns1=trim(mb_strtolower($ns1)); $ns1 = preg_replace("/\.$/ui","",$ns1); $ns2=trim(mb_strtolower($ns2)); $ns2 = preg_replace("/\.$/ui","",$ns2); $ns3=trim(mb_strtolower($ns3)); $ns3 = preg_replace("/\.$/ui","",$ns3); $ns4=trim(mb_strtolower($ns4)); $ns4 = preg_replace("/\.$/ui","",$ns4); $ns1ip=trim($ns1ip); if (!preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns1ip)) { $ns1ip = ""; } $ns2ip=trim($ns2ip); if (!preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns2ip)) { $ns2ip = ""; } $ns3ip=trim($ns3ip); if (!preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns3ip)) { $ns3ip = ""; } if (!$ns3) { $ns3ip = ""; } $ns4ip=trim($ns4ip); if (!preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns4ip)) { $ns4ip = ""; } if (!$ns4) { $ns4ip = ""; } if (!$ns1) {$error=$_lang[OrderErrorNoPrymaryNS];} else if (!preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$ns1)) {$error=$_lang[OrderErrorNoPrymaryNS];} else if (preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns1)) {$error=$_lang[OrderErrorNoPrymaryNS];} else if (preg_match("/\.$fulldomain$/u",$ns1) and !$ns1ip) {$error=$_lang[OrderErrorOwnNS1];} else if ($ns1ip and !preg_match("/\.$fulldomain$/u",$ns1)) {$error=$_lang[OrderErrorOwnNSIP];} else if (!$ns2) {$error=$_lang[OrderErrorNoSecondaryNS];} else if (!preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$ns2)) {$error=$_lang[OrderErrorNoSecondaryNS];} else if (preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns2)) {$error=$_lang[OrderErrorNoSecondaryNS];} else if (preg_match("/\.$fulldomain$/u",$ns2) and !$ns2ip) {$error=$_lang[OrderErrorOwnNS2];} else if ($ns2ip and !preg_match("/\.$fulldomain$/u",$ns2)) {$error=$_lang[OrderErrorOwnNSIP];} else if ($ns3 and !preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$ns3)) {$error=$_lang[OrderErrorNoThirdNS];} else if (preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns3)) {$error=$_lang[OrderErrorNoThirdNS];} else if ($ns3 and preg_match("/\.$fulldomain$/u",$ns3) and !$ns3ip) {$error=$_lang[OrderErrorOwnNS3];} else if ($ns3ip and !preg_match("/\.$fulldomain$/u",$ns3)) {$error=$_lang[OrderErrorOwnNSIP];} else if ($ns4 and !preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$ns4)) {$error=$_lang[OrderErrorNoFourNS];} else if (preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns4)) {$error=$_lang[OrderErrorNoFourNS];} else if ($ns4 and preg_match("/\.$fulldomain$/u",$ns4) and !$ns4ip) {$error=$_lang[OrderErrorOwnNS4];} else if ($ns4ip and !preg_match("/\.$fulldomain$/u",$ns4)) {$error=$_lang[OrderErrorOwnNSIP];} else if ($ns1 == $ns2) {$error=$_lang[OrderErrorNoSecondaryNS];} else if ($ns3 and ($ns3 == $ns1 or $ns3 == $ns2)) {$error=$_lang[OrderErrorNoThirdNS];} else if ($ns4 and ($ns4 == $ns1 or $ns4 == $ns2 or $ns4 == $ns3)) {$error=$_lang[OrderErrorNoFourNS];} else if ($ns2ip and $ns1ip == $ns2ip) {$error=$_lang[OrderErrorOwnNS2];} else if ($ns3ip and ($ns3ip == $ns1ip or $ns3ip == $ns2ip)) {$error=$_lang[OrderErrorOwnNS3];} else if ($ns4ip and ($ns4ip == $ns1ip or $ns4ip == $ns2ip or $ns4ip == $ns3ip)) {$error=$_lang[OrderErrorOwnNS4];} else if ($domain_reg == "3" and $tzones->transferNeedAuth and !$transferAuth) {$error=$_lang[OrderErrorNoTransferAuth];} else if (!$useDefaultNS and $tzones->enableCheckNS and !checkDNS($fulldomain, $tzones->id, $ns1, $ns2, $ns3, $ns4)) {$error=$GLOBALerror;} else if (!$license and ($tzones->licenseRequired == "yes" or ($tzones->licenseRequired == "idn" and preg_match("/[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ]+/u",$domain)))) {$error=$_lang[OrderErrorNoLicense];} else { # Учитываем скидку на домен при регистрации клиента с указанием источника имеющего скидку # if ($aboutusfromid and $domainCost > 0) { $domainCost=$domainCost-($domainCost/100)*GetAboutUsFromDiscount($aboutusfromid,'domain'); } if ($certOrder) { $certCost = GetSetting("sertificateCost"); } else { $certCost = 0; } $pr = GetUserProfileByUserId($_SESSION['userId'],$profileId); if ($tzones->privacy == "person" and $pr->org == "3") { $privacyOrder = 0; $privacyCost = 0; } else if ($tzones->privacy and $tzones->privacy_required and !$privacyOrder) { $privacyOrder = 1; } if ($privacyOrder) { $privacyCost = $tzones->privacy_cost; } else { $privacyCost = 0; } if ($localContactOrder) { $localContactCost = $tzones->localContact_cost; } else { $localContactCost = 0; } if ($promocode and $domainCost > 0) { $coupon = GetCoupon("promo",$promocode,0,"zone",$zid); if (IsCanUseCoupon($coupon->id,$_SESSION["userId"])) { $promoId = $coupon->id; $promoSkidka = $coupon->value; $promoMaxSrok = $coupon->zonesMaxSrok; $promoTXT = ", promo-code $promocode"; $promoCodeTXT = $promocode; } } if ($promoSkidka) { $calcRes = calculatePromoDiscountWithMaxSrok($domainCost, $tzones->minsrok, $promoMaxSrok, $promoSkidka); $promoTotal += $calcRes[summDiscount]; $domainCost = $calcRes[totalSummWithDiscount]; } $domainCost=round($domainCost+$certCost+$privacyCost+$localContactCost,2); $allsumm = $domainCost; } } if ($step > 2 and !$error and $type == "dopt") { if ($dnstype == "each") { $nodnsflag=false; $noipdnsflag=false; $nonsipdnsflag=false; $freedom = @mb_split("\r\n",$freedomains); while (list($k,$v) = @each($freedom)) { $dns1[$v]=trim(mb_strtolower($dns1[$v])); $dns1[$v] = preg_replace("/\.$/ui","",$dns1[$v]); $dns2[$v]=trim(mb_strtolower($dns2[$v])); $dns2[$v] = preg_replace("/\.$/ui","",$dns2[$v]); $dns3[$v]=trim(mb_strtolower($dns3[$v])); $dns3[$v] = preg_replace("/\.$/ui","",$dns3[$v]); $dns4[$v]=trim(mb_strtolower($dns4[$v])); $dns4[$v] = preg_replace("/\.$/ui","",$dns4[$v]); $dns1ip[$v]=trim($dns1ip[$v]); if (!preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$dns1ip[$v])) { $dns1ip[$v] = ""; } $dns2ip[$v]=trim($dns2ip[$v]); if (!preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$dns2ip[$v])) { $dns2ip[$v] = ""; } $dns3ip[$v]=trim($dns3ip[$v]); if (!preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$dns3ip[$v])) { $dns3ip[$v] = ""; } if (!$dns3[$v]) { $dns3ip[$v] = ""; } $dns4ip[$v]=trim($dns4ip[$v]); if (!preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$dns3ip[$v])) { $dns3ip[$v] = ""; } if (!$dns4[$v]) { $dns4ip[$v] = ""; } if (!$dns1[$v] or !$dns2[$v]) {$nodnsflag=true;} if (!preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$dns1[$v]) or !preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$dns2[$v])) {$nodnsflag=true;} if ($dns3[$v] and !preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$dns3[$v])) {$nodnsflag=true;} if ($dns4[$v] and !preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$dns4[$v])) {$nodnsflag=true;} if (preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$dns1[$v])) {$nodnsflag=true;} if (preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$dns2[$v])) {$nodnsflag=true;} if ($dns3[$v] and preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$dns3[$v])) {$nodnsflag=true;} if ($dns4[$v] and preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$dns4[$v])) {$nodnsflag=true;} if (preg_match("/\.$v$/u",$dns1[$v]) and !$dns1ip[$v]) {$noipdnsflag=true;} if (preg_match("/\.$v$/u",$dns2[$v]) and !$dns2ip[$v]) {$noipdnsflag=true;} if ($dns3[$v] and preg_match("/\.$v$/u",$dns3[$v]) and !$dns3ip[$v]) {$noipdnsflag=true;} if ($dns4[$v] and preg_match("/\.$v$/u",$dns4[$v]) and !$dns4ip[$v]) {$noipdnsflag=true;} if ($dns1ip[$v] and !preg_match("/\.$v$/u",$dns1[$v])) {$nonsipdnsflag=true;} if ($dns2ip[$v] and !preg_match("/\.$v$/u",$dns2[$v])) {$nonsipdnsflag=true;} if ($dns3ip[$v] and !preg_match("/\.$v$/u",$dns3[$v])) {$nonsipdnsflag=true;} if ($dns4ip[$v] and !preg_match("/\.$v$/u",$dns4[$v])) {$nonsipdnsflag=true;} if ($dns1[$v] == $dns2[$v]) {$nodnsflag=true;} if ($dns3[$v] and ($dns3[$v] == $dns1[$v] or $dns3[$v] == $dns2[$v])) {$nodnsflag=true;} if ($dns4[$v] and ($dns4[$v] == $dns1[$v] or $dns4[$v] == $dns2[$v] or $dns4[$v] == $dns3[$v])) {$nodnsflag=true;} if ($dns2ip[$v] and $dns2ip[$v] == $dns1ip[$v]) {$noipdnsflag=true;} if ($dns3ip[$v] and ($dns3ip[$v] == $dns1ip[$v] or $dns3ip[$v] == $dns2ip[$v])) {$noipdnsflag=true;} if ($dns4ip[$v] and ($dns4ip[$v] == $dns1ip[$v] or $dns4ip[$v] == $dns2ip[$v] or $dns4ip[$v] == $dns3ip[$v])) {$noipdnsflag=true;} } } else if ($dnstype == "one") { $ns1=trim(mb_strtolower($ns1)); $ns1 = preg_replace("/\.$/ui","",$ns1); $ns2=trim(mb_strtolower($ns2)); $ns2 = preg_replace("/\.$/ui","",$ns2); $ns3=trim(mb_strtolower($ns3)); $ns3 = preg_replace("/\.$/ui","",$ns3); $ns4=trim(mb_strtolower($ns4)); $ns4 = preg_replace("/\.$/ui","",$ns4); $noowndnsflag=false; $freedom = @mb_split("\r\n",$freedomains); while (list($k,$v) = @each($freedom)) { if (preg_match("/\.$v$/u",$ns1) or preg_match("/\.$v$/u",$ns2)) {$noowndnsflag=true;} if ($ns3 and preg_match("/\.$v$/u",$ns3)) {$noowndnsflag=true;} if ($ns4 and preg_match("/\.$v$/u",$ns4)) {$noowndnsflag=true;} } } $nolicenseflag=false; $freedom = @mb_split("\r\n",$freedomains); while (list($k,$v) = @each($freedom)) { $zone=GetZoneByNonExistsDomain($v); if (!$license[$v] and ($zone->licenseRequired == "yes" or ($zone->licenseRequired == "idn" and preg_match("/[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ]+/u",$v)))) { $nolicenseflag = true; } } if ($dnstype == "one" and !$ns1) {$error=$_lang[OrderErrorNoPrymaryNS];} else if ($dnstype == "one" and !preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$ns1)) {$error=$_lang[OrderErrorNoPrymaryNS];} else if ($dnstype == "one" and preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns1)) {$error=$_lang[OrderErrorNoPrymaryNS];} else if ($dnstype == "one" and !$ns2) {$error=$_lang[OrderErrorNoSecondaryNS];} else if ($dnstype == "one" and !preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$ns2)) {$error=$_lang[OrderErrorNoSecondaryNS];} else if ($dnstype == "one" and preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns2)) {$error=$_lang[OrderErrorNoSecondaryNS];} else if ($dnstype == "one" and $ns3 and !preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$ns3)) {$error=$_lang[OrderErrorNoThirdNS];} else if ($dnstype == "one" and $ns3 and preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns3)) {$error=$_lang[OrderErrorNoThirdNS];} else if ($dnstype == "one" and $ns4 and !preg_match("/^[a-z0-9]{1}[a-z0-9-]*\.[a-z0-9-.]*[a-z0-9]{1}$/u",$ns4)) {$error=$_lang[OrderErrorNoFourNS];} else if ($dnstype == "one" and $ns4 and preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/u",$ns4)) {$error=$_lang[OrderErrorNoFourNS];} else if ($dnstype == "one" and $ns1 == $ns2) {$error=$_lang[OrderErrorNoSecondaryNS];} else if ($dnstype == "one" and $ns3 and ($ns3 == $ns1 or $ns3 == $ns2)) {$error=$_lang[OrderErrorNoThirdNS];} else if ($dnstype == "one" and $ns4 and ($ns4 == $ns1 or $ns4 == $ns2 or $ns4 == $ns3)) {$error=$_lang[OrderErrorNoFourNS];} else if ($dnstype == "each" and $nodnsflag) {$error=$_lang[OrderErrorNoOneOfNS];} else if ($noowndnsflag) {$error=$_lang[OrderErrorNoOwnNSForOptAndOne];} else if ($noipdnsflag) {$error=$_lang[OrderErrorOwnNSOpt];} else if ($nonsipdnsflag) {$error=$_lang[OrderErrorOwnNSIP];} else if ($nolicenseflag) {$error=$_lang[OrderErrorNoLicense];} else { $freedom = @mb_split("\r\n",$freedomains); $domainCostArr = array(); $domainMinSrokArr = array(); while (list($k,$v) = each($freedom)) { $arr=""; $domain=""; $zone=""; preg_match("/^([^\.]+)\.(.+)$/ui",$v,$arr); $domain=$arr[1]; $zone=$arr[2]; $domain=mb_strtolower($domain); $fulldomain=mb_strtolower($domain.".".$zone); if ($zone_id[$v]) { $zid = $zone_id[$v]; } else { $zid=@mysql_query("select * from zones where zone='$zone' and active='1' order by isDefault desc") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $zid=mysql_fetch_object($zid); $zid=$zid->id; } $tzones=@mysql_query("select * from zones where zone='$zone' and id='$zid'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $tzones=mysql_fetch_object($tzones); $domainCost = GetDomainCostForUserByZoneId($_SESSION["userId"],$tzones->id,0); $domainMinSrok=$tzones->minsrok; $domainCost=$domainCost*($domainMinSrok/12); # Учитываем скидку на домен при регистрации клиента с указанием источника имеющего скидку # if ($aboutusfromid) { $domainCost=$domainCost-($domainCost/100)*GetAboutUsFromDiscount($aboutusfromid,'domain'); } if ($certOrder[$v]) { $certCost = GetSetting("sertificateCost"); } else { $certCost = 0; } $pr = GetUserProfileByUserId($_SESSION['userId'],$profile_id[$v]); if ($tzones->privacy == "person" and $pr->org == "3") { $privacyOrder[$v] = 0; $privacyCost = 0; } else if ($tzones->privacy and $tzones->privacy_required and !$privacyOrder) { $privacyOrder[$v] = 1; } if ($privacyOrder[$v]) { $privacyCost = $tzones->privacy_cost; } else { $privacyCost = 0; } if ($localContactOrder[$v]) { $localContactCost = $tzones->localContact_cost; } else { $localContactCost = 0; } if ($promocode and $domainCost > 0) { $coupon = GetCoupon("promo",$promocode,0,"zone",$zid); if (IsCanUseCoupon($coupon->id,$_SESSION["userId"])) { $promoId = $coupon->id; $promoSkidka = $coupon->value; $promoMaxSrok = $coupon->zonesMaxSrok; $promoTXT = ", promo-code $promocode"; $promoCodeTXT = $promocode; } } if ($promoSkidka) { $calcRes = calculatePromoDiscountWithMaxSrok($domainCost, $tzones->minsrok, $promoMaxSrok, $promoSkidka); $promoTotal += $calcRes[summDiscount]; $domainCost = $calcRes[totalSummWithDiscount]; } $domainCost=round($domainCost+$certCost+$privacyCost+$localContactCost,2); $domainCostArr[$v] = $domainCost; $domainMinSrokArr[$v] = $domainMinSrok; $allsumm = $allsumm + $domainCost; } } } if ($step > 2 and !$error and $type == "shop") { $months=@intval($months); if ($t->costtype != "one" and (!$months or $months <= 0)) {$error=$_lang[OrderErrorNoSrokZakaza];} else if ($t->type == "ispmanagerlite" or $t->type == "ispmanagerlitefull" or $t->type == "ispmanagerlitetrial" or $t->type == "ispmanagerpro" or $t->type == "ispmanagerprofull" or $t->type == "ispmanagerprotrial" or $t->type == "vdsmanagerlinux" or $t->type == "vdsmanagerlinuxfull" or $t->type == "vdsmanagerfreebsd" or $t->type == "vdsmanagerfreebsdfull" or $t->type == "billmanagerstandart" or $t->type == "billmanageradvanced" or $t->type == "billmanagercorporate" or $t->type == "dsmanager" or $t->type == "dsmanagerfull" or $t->type == "dnsmanagerfull" or $t->type == "ipmanagerfull") { if (!$licenseName) {$error=$_lang[OrderErrorNoLicenseName];} else if (!$licenseIP) {$error=$_lang[OrderErrorNoLicenseIP];} else if (!preg_match("/^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}$/",$licenseIP)) {$error=$_lang[OrderErrorNoLicenseIP];} } if (!$error) { $itemmonths = $months; $itemcost = $t->cost; if ($t->costtype == "month") { $itemcost=$itemcost*$itemmonths; } else if ($t->costtype == "year") { $itemcost=$itemcost*($itemmonths/12); } $tsroki=@mysql_query("select discount from shop_sroki where item='$item_id' and months='$itemmonths' and `order`='1'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($tsroki) > 0) { $tsroki=mysql_fetch_object($tsroki); $srokDiscount=$tsroki->discount; } else { $srokDiscount=0; } $itemcost=$itemcost-($itemcost/100)*$srokDiscount; # Учитываем скидку на товары при регистрации клиента с указанием источника имеющего скидку # if ($aboutusfromid and $itemcost > 0) { $itemcost=$itemcost-($itemcost/100)*GetAboutUsFromDiscount($aboutusfromid,'shop'); } if ($promocode and $itemcost > 0) { $coupon = GetCoupon("promo",$promocode,0,"shopitem",$item_id); if (IsCanUseCoupon($coupon->id,$_SESSION["userId"])) { $promoId = $coupon->id; $promoSkidka = $coupon->value; $promoMaxSrok = $coupon->shopItemsMaxSrok; $promoTXT = ", promo-code $promocode"; $promoCodeTXT = $promocode; } } if ($promoSkidka) { $calcRes = calculatePromoDiscountWithMaxSrok($itemcost, $itemmonths, $promoMaxSrok, $promoSkidka); $promoTotal += $calcRes[summDiscount]; $itemcost = $calcRes[totalSummWithDiscount]; } $itemcost=round($itemcost,2); $allsumm = $itemcost; } } if ($step > 3 and !$error) { if (GetSetting("orderShowSSHLogin") and ($vid == "ssh") and $serverLogin) { $sshlogincheck = @mysql_query("select * from orders where archived=0 and serverlogin='$serverLogin'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } if (GetSetting("orderShowServerName") and ($vid == "vds" or $vid == "dedicated") and !$servername) {$error=$_lang[OrderErrorServerName];} else if (GetSetting("orderShowServerName") and ($vid == "vds" or $vid == "dedicated") and preg_match("/[^a-z0-9.-]/i",$servername)) {$error=$_lang[OrderErrorServerNameSymbols];} else if (GetSetting("orderShowAdminPassword") and ($vid == "vds" or $vid == "dedicated") and !$adminpassword) {$error=$_lang[OrderErrorAdminPassword];} else if (GetSetting("orderShowPurposeOfUse") and ($vid == "vds" or $vid == "dedicated") and !$purposeofuse) {$error=$_lang[OrderErrorPurposeOfUse];} else if (GetSetting("orderShowSSHLogin") and ($vid == "ssh") and !$serverLogin) {$error=$_lang[OrderErrorSSHLogin];} else if (GetSetting("orderShowSSHLogin") and ($vid == "ssh") and preg_match("/[^a-z0-9]/i",$serverLogin)) {$error=$_lang[OrderErrorSSHLoginSymbols];} else if (GetSetting("orderShowSSHLogin") and ($vid == "ssh") and $serverLogin and @mysql_num_rows($sshlogincheck) > 0) {$error=$_lang[OrderErrorSSHLoginExists];} else if (GetSetting("orderShowSSHPassword") and ($vid == "ssh") and !$serverPassword) {$error=$_lang[OrderErrorSSHPassword];} else if (GetSetting("orderShowSSHPassword") and ($vid == "ssh") and preg_match("/[^a-z0-9_\-]/i",$serverPassword)) {$error=$_lang[OrderErrorSSHPasswordSymbols];} else if ($needpersonalinfo and !$personalinfo) {$error=$_lang[OrderErrorNoPersonalInfo];} else if (GetSetting("captcha_reg") and $_SESSION['captchakey'] != $captchakeyin) {$error=$_lang[ErrorWrongCaptcha];} else { if ($type == "h") { if (preg_match("/\.{0,1}[ru|su|рф]$/ui",$zone) and ($domain_reg == "1" or $domain_reg == "3")) { $isRuDomain="&isR=1"; } else if (($domain_reg == "1" or $domain_reg == "3")) { $isDomain="&isD=1"; if ($zone == "pp.ua") { $isPPUADomain = "&isPPUA=1"; } } if (GetSetting("orderShowServerName") and ($vid == "vds" or $vid == "dedicated")) { $commentAddon = $commentAddon.$_lang[OrderServerName].": $servername\n"; } if (GetSetting("orderShowAdminPassword") and ($vid == "vds" or $vid == "dedicated")) { $commentAddon = $commentAddon.$_lang[OrderAdminPassword].": $adminpassword\n"; } if (GetSetting("orderShowRootPassword") and $rootpassword and ($vid == "vds" or $vid == "dedicated")) { $commentAddon = $commentAddon.$_lang[OrderRootPassword].": $rootpassword\n"; $serverPassword = $rootpassword; } if (GetSetting("orderShowPurposeOfUse") and $purposeofuse and ($vid == "vds" or $vid == "dedicated")) { $commentAddon = $commentAddon.$_lang[OrderPurposeOfUse].": $purposeofuse\n";} if ($commentAddon) { if ($comment) {$comment = $commentAddon."\n".$comment;} else {$comment = $commentAddon;} } $history = "Тариф: $t->name"; if ($fulldomain) { $history .= ", домен: $fulldomain"; } @mysql_query("insert into orders (uid,tarif,costId,domain,domain_reg,addons,orderdate,comment,serverid,testPeriod,slots,serverlogin,serverpassword,history,servername) values('".$_SESSION['userId']."','$tarif_id','$costId','$fulldomain','$domain_reg','$addonsToSave',NOW(),'$comment','$server','$testPeriodNeed','$slotsCount','$serverLogin','".encodePwd($serverPassword)."','$history','$servername')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $host_id=mysql_insert_id(); if ($domain_reg == "1" or $domain_reg == "3") { $zid=@mysql_query("select * from zones where zone='$zone' and id='$zone_id'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $zid=mysql_fetch_object($zid); $zid=$zid->id; if ($domain_reg == "3") { $transfer = 1; $transferTxt = " (".$_lang[DomainTransferMin].")"; } else { $transfer = 0; $transferTxt = ""; } @mysql_query("insert into orders_domains (uid,zone_id,host_id,domain,orderdate,profileId,privacy,license,transfer,transferAuth,localContact) values ('".$_SESSION['userId']."','$zid','$host_id','$fulldomain',NOW(),'$profileId','$privacyOrder','$license','$transfer','$transferAuth','$localContactOrder')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $domain_id=mysql_insert_id(); if ($tzones->free) { $domFreeCnt = GetDomainsFreeCountTodayByUserId($_SESSION['userId']); if ($domFreeCnt > 0) { @mysql_query("update users set freeDomainCount=freeDomainCount+1 where id='".$_SESSION['userId']."'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } else { @mysql_query("update users set freeDomainCount=1,freeDomainDay=NOW() where id='".$_SESSION['userId']."'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } } if ($certOrder) { @mysql_query("insert into orders_domainscert (uid,domain_id,order_date) values ('".$_SESSION['userId']."','$domain_id',NOW())") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } } $history = "Тариф: $t->name, $hostmonths мес."; if ($domain_id) { $history .= " + домен $fulldomain, ".($domainminsrok/12)." г."; if ($transfer) { $history .= " (трансфер)";} if ($certOrder) { $history .= " + ".$_lang[OrderCert].""; } if ($privacyOrder) { $history .= " + ".$_lang[OrderPrivacy].""; } if ($localContactOrder) { $history .= " + ".$_lang[OrderLocalContact].""; } } if ($addonsToSaveText and $addonsToSaveText != $_lang[No]) { $history .= " + $addonsToSaveText";} @mysql_query("insert into bills (uid,tarif,host_id,domain_id,host_srok,domain_srok,money_host,money_domain,money_addons,created,history,transfer,promocode) values('".$_SESSION['userId']."','$t->id','$host_id','$domain_id','$hostmonths','$domainminsrok','$host','$dom','$addonsCost',NOW(),'$history','$transfer','$promoCodeTXT')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $bill_id=mysql_insert_id(); $sid=sprintf("%04d", $bill_id); addUserLog($_SESSION['userId'],'order',"$t->name, $hostmonths мес., $fulldomain [".$_newreg[$domain_reg]."]$promoTXT"); $promoOk = array(); while (list($k,$pr) = @each($promoIds)) { if (!@in_array("$pr",$promoOk)) { AddUsedByToCoupon($pr,$_SESSION["userId"],$bill_id); $promoOk[] = $pr; } } $tpl = GetTpl('email_touser_'.$vid.'_order', $_SESSION["userLang"]); $subject = $tpl[subject]; $template = $tpl[template]; if ($subject and $template) { if ($attachPDFtoBill) { if ($org == "3" or $org == "2") { $attachFile = createFaktura('', $bill_id, 2); $attachFile2 = ""; } else if ($org == "1") { $attachFile = createKvitanciya('', $bill_id, 2); $attachFile2 = createFaktura('', $bill_id, 2); } if (!$attachFile) {$attachFile="";} if (!$attachFile2) {$attachFile2="";} } $company_name=GetSetting('company_name'); $company_url=GetSetting('company_url'); $billing_url=GetSetting('billing_url'); $support_url=GetSetting('support_url'); $manager_email=GetSetting('manager_email'); if ($elogin and $epassword and $usertype == "exists") {$tl=mb_strtolower($elogin); $tp=$epassword;} else if ($login and $password and $usertype == "new") {$tl=mb_strtolower($login); $tp=$password;} else {$tl=$_SESSION["userLogin"]; $tp='******';} if ($certOrder) { $certAddon = " + ".$_lang[OrderCert]; } if ($privacyOrder) { $privacyAddon = " + ".$_lang[OrderPrivacy]; } if ($localContactOrder) { $localContactAddon = " + ".$_lang[OrderLocalContact]; } $template = str_replace('{company_name}',$company_name,$template); $template = str_replace('{company_url}',$company_url,$template); $template = str_replace('{billing_url}',$billing_url,$template); $template = str_replace('{support_url}',$support_url,$template); $template = str_replace('{tarif}',$t->name,$template); $template = str_replace('{srok}',$hostmonths,$template); $template = str_replace('{domain}',$fulldomain.$certAddon.$privacyAddon.$localContactAddon,$template); $template = str_replace('{bonus}',$bonus,$template); $template = str_replace('{addons}',$addonsToSaveText,$template); $template = str_replace('{newreg}',$_newreg[$domain_reg],$template); $template = str_replace('{login}',$tl,$template); $template = str_replace('{password}',$tp,$template); $template = str_replace('{schet}',$sid,$template); $template = str_replace('{hostcost}',round($host*CURK,2)." ".CURS,$template); $template = str_replace('{domaincost}',round($dom*CURK,2)." ".CURS,$template); $template = str_replace('{addonscost}',round($addonsCost*CURK,2)." ".CURS,$template); $template = str_replace('{cost}',round(($host+$dom+$addonsCost)*CURK,2)." ".CURS,$template); $template = str_replace('{paymethod}','',$template); if ($comment) { $comment = $_lang[OrderComment].":\n".$comment; } $template = str_replace('{comment}',$comment,$template); $template = str_replace('{userid}',$_SESSION['userId'],$template); $template = str_replace('{slots}',$slotsCount,$template); $template = str_replace('{promocode}',$promoCodeTXT,$template); $subject = str_replace('{login}',$tl,$subject); WriteMailLog($subject,$template,$_SESSION['userId']); sendmail($_SESSION["userEmail"],$company_name,$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); sendmail($_SESSION["userEmail2"],$company_name,$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); $subject = "Duplicate: ".$subject; $admEmails=GetAdminEmailsWhereTrueParam("sendneworder"); if (count($admEmails) > 0) { WriteMailLog($subject,$template); } while (list($i,$em) = @each($admEmails)) { sendmail($em,'',$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); } @unlink($attachFile); @unlink($attachFile2); if ($testPeriodNeed) { $subject = "Заказ тестового периода"; $template = "Клиент $tl заказал тестовый период для заказа ID $host_id, $fulldomain для тарифного плана $t->name\r\n\r\n--\r\nRootPanel"; $admEmails=GetAdminEmailsWhereTrueParam("sendneworder"); if (count($admEmails) > 0) { WriteMailLog($subject,$template); } while (list($i,$em) = @each($admEmails)) { sendmail($em,'',$manager_email,$subject,$template); } } } if ($isRuDomain) { $isR = 1; $chkProfile = "max"; } else if ($isDomain) { $isD = 1; $chkProfile = "min"; if ($isPPUADomain) { $rF[] = "mobile"; } } else { $chkProfile = GetSetting("checkprofiletype"); } $resCheckProfile = checkProfile($chkProfile, $_SESSION["userId"], $profileId); if (!$resCheckProfile) { if (GetSetting("testPeriodEnable") and $t->testPeriod and $testPeriodNeed) { $testAddon = "&testPeriod=1&testPeriodHostId=$host_id"; } Header("Location: billing.php?do=profile&fromreg=1&bill_id=$bill_id&profileId=$profileId$testAddon".$isRuDomain.$isDomain.$isPPUADomain); exit; } else { if (GetSetting("testPeriodEnable") and $t->testPeriod and $testPeriodNeed) { if (GetSetting("testPeriodAutoCreate")) { if (!checkMobile()) { $testAddon = "&testPeriodHostId=$host_id"; } else { if (GetSetting("orderProcessTypeHost")) { AddBillToQueue($bill_id, 1); } else { if (createUser($host_id)) { $testAddon = "&testPeriodCreated=1"; } } } } $testAddon .= "&testPeriod=1"; } Header("Location: billing.php?do=pay&fromreg=1&id=$bill_id$testAddon"); exit; } } if ($type == "d") { if (preg_match("/\.{0,1}[ru|su|рф]$/ui",$zone)) { $isRuDomain="&isR=1"; } else { $isDomain="&isD=1"; if ($zone == "pp.ua") { $isPPUADomain = "&isPPUA=1"; } } if ($domain_reg == "3") { $transfer = 1; $transferTxt = " (".$_lang[DomainTransferMin].")"; } else { $transfer = 0; $transferTxt = ""; } @mysql_query("insert into orders_domains (uid,zone_id,domain,orderdate,comment,ns1,ns2,ns3,ns4,ns1ip,ns2ip,ns3ip,ns4ip,profileId,defaultNSFlag,privacy,license,transfer,transferAuth,localContact) values ('".$_SESSION['userId']."','$zid','$fulldomain',NOW(),'$comment','$ns1','$ns2','$ns3','$ns4','$ns1ip','$ns2ip','$ns3ip','$ns4ip','$profileId','$useDefaultNS','$privacyOrder','$license','$transfer','$transferAuth','$localContactOrder')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $domain_id=mysql_insert_id(); if ($tzones->free) { $domFreeCnt = GetDomainsFreeCountTodayByUserId($_SESSION['userId']); if ($domFreeCnt > 0) { @mysql_query("update users set freeDomainCount=freeDomainCount+1 where id='".$_SESSION['userId']."'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } else { @mysql_query("update users set freeDomainCount=1,freeDomainDay=NOW() where id='".$_SESSION['userId']."'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } } if ($certOrder) { @mysql_query("insert into orders_domainscert (uid,domain_id,order_date) values ('".$_SESSION['userId']."','$domain_id',NOW())") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } $history = "Домен: $fulldomain, ".($domainMinSrok/12)." г."; if ($transfer) { $history .= " (трансфер)";} if ($certOrder) { $history .= " + ".$_lang[OrderCert]; } if ($privacyOrder) { $history .= " + ".$_lang[OrderPrivacy]; } if ($localContactOrder) { $history .= " + ".$_lang[OrderLocalContact]; } @mysql_query("insert into bills (uid,domain_id,domain_srok,money_domain,created,history,transfer,promocode) values('".$_SESSION['userId']."','$domain_id','$domainMinSrok','$domainCost',NOW(),'$history','$transfer','$promoCodeTXT')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $bill_id=mysql_insert_id(); $sid=sprintf("%04d", $bill_id); addUserLog($_SESSION['userId'],'orderdomain',"$fulldomain, ".(($domainMinSrok/12))." г.$transferTxt$promoTXT"); AddUsedByToCoupon($promoId,$_SESSION["userId"],$bill_id); $tpl=GetTpl("email_touser_domain_order", $_SESSION["userLang"]); $subject = $tpl[subject]; $template = $tpl[template]; if ($subject and $template) { if ($attachPDFtoBill) { if ($org == "3" or $org == "2") { $attachFile = createFaktura('', $bill_id, 2); $attachFile2 = ""; } else if ($org == "1") { $attachFile = createKvitanciya('', $bill_id, 2); $attachFile2 = createFaktura('', $bill_id, 2); } if (!$attachFile) {$attachFile="";} if (!$attachFile2) {$attachFile2="";} } $company_name=GetSetting('company_name'); $company_url=GetSetting('company_url'); $billing_url=GetSetting('billing_url'); $support_url=GetSetting('support_url'); $manager_email=GetSetting('manager_email'); if ($elogin and $epassword and $usertype == "exists") {$tl=mb_strtolower($elogin); $tp=$epassword;} else if ($login and $password and $usertype == "new") {$tl=mb_strtolower($login); $tp=$password;} else {$tl=$_SESSION["userLogin"]; $tp='******';} if ($certOrder) { $certAddon = " + ".$_lang[OrderCert]; } if ($privacyOrder) { $privacyAddon = " + ".$_lang[OrderPrivacy]; } if ($localContactOrder) { $localContactAddon = " + ".$_lang[OrderLocalContact]; } $template = str_replace('{company_name}',$company_name,$template); $template = str_replace('{company_url}',$company_url,$template); $template = str_replace('{billing_url}',$billing_url,$template); $template = str_replace('{support_url}',$support_url,$template); $template = str_replace('{domain}',$fulldomain.$transferTxt.$certAddon.$privacyAddon.$localContactAddon,$template); $template = str_replace('{login}',$tl,$template); $template = str_replace('{password}',$tp,$template); $template = str_replace('{schet}',$sid,$template); $template = str_replace('{domaincost}',round($domainCost*CURK,2)." ".CURS,$template); $template = str_replace('{cost}',round($domainCost*CURK,2)." ".CURS,$template); $template = str_replace('{srok}',($domainMinSrok/12),$template); $template = str_replace('{paymethod}','',$template); if ($comment) { $comment = "Комментарий:\n".$comment; } $template = str_replace('{comment}',$comment,$template); if ($ns1 or $ns2) { $ns = "NS1: $ns1\nNS2: $ns2\nNS3: $ns3\nNS4: $ns4\n\n"; } $template = str_replace('{ns}',$ns,$template); $template = str_replace('{userid}',$_SESSION['userId'],$template); $template = str_replace('{promocode}',$promoCodeTXT,$template); $subject = str_replace('{login}',$tl,$subject); WriteMailLog($subject,$template,$_SESSION['userId']); sendmail($_SESSION["userEmail"],$company_name,$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); sendmail($_SESSION["userEmail2"],$company_name,$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); $subject = "Duplicate: ".$subject; $admEmails=GetAdminEmailsWhereTrueParam("sendneworder"); if (count($admEmails) > 0) { WriteMailLog($subject,$template); } while (list($i,$em) = @each($admEmails)) { sendmail($em,'',$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); } @unlink($attachFile); @unlink($attachFile2); } if ($isRuDomain) { $isR = 1; $chkProfile = "max"; } else if ($isDomain) { $isD = 1; $chkProfile = "min"; if ($isPPUADomain) { $isPPUA = 1; $rF[] = "mobile"; } } else { $chkProfile = GetSetting("checkprofiletype"); } $resCheckProfile = checkProfile($chkProfile, $_SESSION["userId"], $profileId); if (!$resCheckProfile) { Header("Location: billing.php?do=profile&fromreg=1&bill_id=$bill_id&profileId=$profileId".$isRuDomain.$isDomain.$isPPUADomain); exit; } else { Header("Location: billing.php?do=pay&fromreg=1&id=$bill_id"); exit; } } if ($type == "dopt") { $freedom = @mb_split("\r\n",$freedomains); while (list($k,$v) = each($freedom)) { $arr=""; $res=""; $domain=""; $zone=""; preg_match("/^([^\.]+)\.(.+)$/ui",$v,$arr); $domain=$arr[1]; $zone=$arr[2]; $domain=mb_strtolower($domain); $fulldomain=mb_strtolower($domain.".".$zone); if ($dnstype == "each") { $ns1 = $dns1[$v]; $ns2 = $dns2[$v]; $ns3 = $dns3[$v]; $ns4 = $dns4[$v]; $ns1ip = $dns1ip[$v]; $ns2ip = $dns2ip[$v]; $ns3ip = $dns3ip[$v]; $ns4ip = $dns4ip[$v]; } if ($profile_id[$v]) { $profileId = $profile_id[$v]; } else { $profileId = ""; } if ($zone_id[$v]) { $zid = $zone_id[$v]; } else { $zid=@mysql_query("select * from zones where zone='$zone' and active='1' order by isDefault desc") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $zid=mysql_fetch_object($zid); $zid=$zid->id; } @mysql_query("insert into orders_domains (uid,zone_id,domain,orderdate,comment,ns1,ns2,ns3,ns4,ns1ip,ns2ip,ns3ip,ns4ip,profileId,privacy,license,localContact) values ('".$_SESSION['userId']."','$zid','$fulldomain',NOW(),'$comment','$ns1','$ns2','$ns3','$ns4','$ns1ip','$ns2ip','$ns3ip','$ns4ip','$profileId','$privacyOrder[$v]','$license[$v]','$localContactOrder[$v]')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $domain_id=mysql_insert_id(); $domZone = GetZoneById($zid); if ($domZone->free) { $domFreeCnt = GetDomainsFreeCountTodayByUserId($_SESSION['userId']); if ($domFreeCnt > 0) { @mysql_query("update users set freeDomainCount=freeDomainCount+1 where id='".$_SESSION['userId']."'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } else { @mysql_query("update users set freeDomainCount=1,freeDomainDay=NOW() where id='".$_SESSION['userId']."'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } } if ($certOrder[$v]) { @mysql_query("insert into orders_domainscert (uid,domain_id,order_date) values ('".$_SESSION['userId']."','$domain_id',NOW())") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); } $history = "Домен: $fulldomain, ".($domainMinSrokArr[$v]/12)." г."; if ($certOrder[$v]) { $history .= " + ".$_lang[OrderCert]; } if ($privacyOrder[$v]) { $history .= " + ".$_lang[OrderPrivacy]; } if ($localContactOrder[$v]) { $history .= " + ".$_lang[OrderLocalContact]; } @mysql_query("insert into bills (uid,domain_id,domain_srok,money_domain,created,history,promocode) values('".$_SESSION['userId']."','$domain_id','".$domainMinSrokArr[$v]."','".$domainCostArr[$v]."',NOW(),'$history','$promoCodeTXT')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $bill_id=mysql_insert_id(); addUserLog($_SESSION['userId'],'orderdomain',"$fulldomain, ".(($domainMinSrokArr[$v]/12))." г.$promoTXT"); AddUsedByToCoupon($promoId,$_SESSION["userId"],$bill_id); $tpl=GetTpl('email_touser_domain_order', $_SESSION["userLang"]); $subject = $tpl[subject]; $template = $tpl[template]; if ($subject and $template) { if ($attachPDFtoBill) { if ($org == "3" or $org == "2") { $attachFile = createFaktura('', $bill_id, 2); $attachFile2 = ""; } else if ($org == "1") { $attachFile = createKvitanciya('', $bill_id, 2); $attachFile2 = createFaktura('', $bill_id, 2); } if (!$attachFile) {$attachFile="";} if (!$attachFile2) {$attachFile2="";} } $sid=sprintf("%04d", $bill_id); $company_name=GetSetting('company_name'); $company_url=GetSetting('company_url'); $billing_url=GetSetting('billing_url'); $support_url=GetSetting('support_url'); $manager_email=GetSetting('manager_email'); if ($elogin and $epassword and $usertype == "exists") {$tl=mb_strtolower($elogin); $tp=$epassword;} else if ($login and $password and $usertype == "new") {$tl=mb_strtolower($login); $tp=$password;} else {$tl=$_SESSION["userLogin"]; $tp='******';} if ($certOrder[$v]) { $certAddon = " + ".$_lang[OrderCert]; } else { $certAddon = ""; } if ($privacyOrder[$v]) { $privacyAddon = " + ".$_lang[OrderPrivacy]; } else { $privacyAddon = ""; } if ($localContactOrder[$v]) { $localContactAddon = " + ".$_lang[OrderLocalContact]; } else { $localContactAddon = ""; } $template = str_replace('{company_name}',$company_name,$template); $template = str_replace('{company_url}',$company_url,$template); $template = str_replace('{billing_url}',$billing_url,$template); $template = str_replace('{support_url}',$support_url,$template); $template = str_replace('{domain}',$fulldomain.$certAddon.$privacyAddon.$localContactAddon,$template); $template = str_replace('{login}',$tl,$template); $template = str_replace('{password}',$tp,$template); $template = str_replace('{schet}',$sid,$template); $template = str_replace('{domaincost}',round($domainCostArr[$v]*CURK,2)." ".CURS,$template); $template = str_replace('{cost}',round($domainCostArr[$v]*CURK,2)." ".CURS,$template); $template = str_replace('{srok}',($domainMinSrokArr[$v]/12),$template); $template = str_replace('{paymethod}','',$template); if ($comment) { $comment = $_lang[OrderComment].":\n".$comment; } $template = str_replace('{comment}',$comment,$template); if ($ns1 or $ns2) { $ns = "NS1: $ns1\nNS2: $ns2\nNS3: $ns3\nNS4: $ns4\n\n"; } $template = str_replace('{ns}',$ns,$template); $template = str_replace('{userid}',$_SESSION['userId'],$template); $template = str_replace('{promocode}',$promoCodeTXT,$template); $subject = str_replace('{login}',$tl,$subject); WriteMailLog($subject,$template,$_SESSION['userId']); sendmail($_SESSION["userEmail"],$company_name,$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); sendmail($_SESSION["userEmail2"],$company_name,$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); $subject = "Duplicate: ".$subject; $admEmails=GetAdminEmailsWhereTrueParam("sendneworder"); if (count($admEmails) > 0) { WriteMailLog($subject,$template); } while (list($i,$em) = @each($admEmails)) { sendmail($em,'',$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); } @unlink($attachFile); @unlink($attachFile2); } } Header("Location: billing.php?do=bills"); exit; } if ($type == "shop") { @mysql_query("insert into orders_shop (uid,item,orderdate,comment,field1,field2) values('".$_SESSION['userId']."','$item_id',NOW(),'$comment','$licenseName','$licenseIP')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $item_id=mysql_insert_id(); $history = "Товар: $t->name"; if ($t->costtype == "month") { $history .= ", $itemmonths мес."; } else if ($t->costtype == "year") { $history .= ", ".($itemmonths/12)." г."; } @mysql_query("insert into bills (uid,shop_id,shop_srok,money_shop,created,history,promocode) values('".$_SESSION['userId']."','$item_id','$itemmonths','$itemcost',NOW(),'$history','$promoCodeTXT')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $bill_id=mysql_insert_id(); $sid=sprintf("%04d", $bill_id); addUserLog($_SESSION['userId'],'ordershop',"$t->name, $itemmonths мес.$promoTXT"); AddUsedByToCoupon($promoId,$_SESSION["userId"],$bill_id); $tpl = GetTpl('email_touser_shop_order', $_SESSION["userLang"]); $subject = $tpl[subject]; $template = $tpl[template]; if ($subject and $template) { if ($attachPDFtoBill) { if ($org == "3" or $org == "2") { $attachFile = createFaktura('', $bill_id, 2); $attachFile2 = ""; } else if ($org == "1") { $attachFile = createKvitanciya('', $bill_id, 2); $attachFile2 = createFaktura('', $bill_id, 2); } if (!$attachFile) {$attachFile="";} if (!$attachFile2) {$attachFile2="";} } $company_name=GetSetting('company_name'); $company_url=GetSetting('company_url'); $billing_url=GetSetting('billing_url'); $support_url=GetSetting('support_url'); $manager_email=GetSetting('manager_email'); if ($elogin and $epassword and $usertype == "exists") {$tl=mb_strtolower($elogin); $tp=$epassword;} else if ($login and $password and $usertype == "new") {$tl=mb_strtolower($login); $tp=$password;} else {$tl=$_SESSION["userLogin"]; $tp='******';} $template = str_replace('{company_name}',$company_name,$template); $template = str_replace('{company_url}',$company_url,$template); $template = str_replace('{billing_url}',$billing_url,$template); $template = str_replace('{support_url}',$support_url,$template); $template = str_replace('{item}',$t->name,$template); $template = str_replace('{srok}',$itemmonths,$template); $template = str_replace('{login}',$tl,$template); $template = str_replace('{password}',$tp,$template); $template = str_replace('{schet}',$sid,$template); $template = str_replace('{itemcost}',round($itemcost*CURK,2)." ".CURS,$template); $template = str_replace('{cost}',round($allsumm*CURK,2)." ".CURS,$template); $template = str_replace('{paymethod}','',$template); if ($comment) { $comment = $_lang[OrderComment].":\n".$comment; } $template = str_replace('{comment}',$comment,$template); $template = str_replace('{userid}',$_SESSION['userId'],$template); $template = str_replace('{promocode}',$promoCodeTXT,$template); $subject = str_replace('{login}',$tl,$subject); WriteMailLog($subject,$template,$_SESSION['userId']); sendmail($_SESSION["userEmail"],$company_name,$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); sendmail($_SESSION["userEmail2"],$company_name,$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); $subject = "Duplicate: ".$subject; $admEmails=GetAdminEmailsWhereTrueParam("sendneworder"); if (count($admEmails) > 0) { WriteMailLog($subject,$template); } while (list($i,$em) = @each($admEmails)) { sendmail($em,'',$manager_email,$subject,$template,$attachFile,$attachFile2,$tpl[type]); } @unlink($attachFile); @unlink($attachFile2); } $resCheckProfile = checkProfile(GetSetting("checkprofiletype"), $_SESSION["userId"]); if (!$resCheckProfile) { Header("Location: billing.php?do=profile&fromreg=1&bill_id=$bill_id"); exit; } else { Header("Location: billing.php?do=pay&fromreg=1&id=$bill_id"); exit; } } } } if ($error) {$step--;} ################################################# # Вывод формы заказа # ################################################# if (!($type == "h" or $type == "d" or $type == "dopt" or $type == "partner" or $type == "shop")) {$type="h";} if ($type == "h") { if (!($vid == "hosting" or $vid == "reseller" or $vid == "vds" or $vid == "dedicated" or $vid == "vpn" or $vid == "ssh") and !$group) {$vid='hosting';} if ($tarif) { $r = @mysql_query("select * from tarifs where active=1 and (name='$tarif' or id='".intval($tarif)."')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($r) > 0) { $r = mysql_fetch_object($r); $tarif_id = $r->id; $tarif_group = $r->tarifsgroup; $vid = $r->vid; } else { $tarif = ""; } } } if ($type == "shop") { if ($item) { $r = @mysql_query("select * from shop_items where active=1 and (name='$item' or id='".intval($item)."')") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($r) > 0) { $r = mysql_fetch_object($r); $item_id = $r->id; $item_group = $r->itemgroup; } else { $item = ""; } } } if ($orderTableWidth) { $width = $orderTableWidth; } else { $width = "550"; } if ($type == "partner") {$pageTitle = $_lang[OrderPartnerTitle];} else {$pageTitle = $_lang[OrderTitle]." (".$_lang[OrderStep]." $step ".$_lang[OrderStepFrom]." $steps)";} if ($type == "h" and $step == "1") { $pageTitle = $_lang[OrderTitleType][$vid]." - ".$pageTitle; } else if ($type == "d" and $step == "1") { $pageTitle = $_lang[OrderTitleTypeDomain]." - ".$pageTitle; } else if ($type == "dopt" and $step == "1") { $pageTitle = $_lang[OrderTitleTypeDomainOpt]." - ".$pageTitle; } else if ($type == "shop" and $step == "1") { $pageTitle = $_lang[OrderTitleTypeShop]." - ".$pageTitle; } if ($type == "h" and $step > "1") { $pageTitle = $PAGE_TITLE_ITEMNAME." - ".$pageTitle; } else if ($type == "d" and $step > "1") { $pageTitle = $PAGE_TITLE_ITEMNAME." - ".$pageTitle; } else if ($type == "dopt" and $step > "1") { $pageTitle = $_lang[OrderTitleTypeDomainOpt]." - ".$pageTitle; } else if ($type == "shop" and $step > "1") { $pageTitle = $PAGE_TITLE_ITEMNAME." - ".$pageTitle; } if ($_SESSION["userId"] and !checkMobile()) { Header("Location: billing.php"); exit; } head('utf-8',$pageTitle); ?>$pageTitle
"; print "
"; print ""; print ""; print ""; print ""; print ""; if ($step > 1) { print ""; } if ($step > 1) { print ""; } print ""; print ""; print ""; if ($step > 1 and $type == "dopt") { print ""; } if ($step > 1 and $type == "h") { print ""; print ""; print ""; print ""; print ""; print ""; print ""; } if ($step > 1 and $type == "d") { print ""; print ""; print ""; } if ($step > 1 and $type == "dopt") { print ""; print ""; print ""; } if ($step > 1 and $type == "shop") { print ""; } if ($step > 1) { print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; if ($attachPDFtoBill or $registerNeedFIO) { if ($attachPDFtoBill) { print ""; print ""; print ""; print ""; } print ""; print ""; print ""; } if ($registerNeedMobile) { print ""; } } if ($step > 2 and $type == "h") { print ""; print ""; if (@is_array($addons)) {$hiddenAddons=@join(":x:",$addons);} else {$hiddenAddons=$addons;} print ""; if (@is_array($addonsInputCnt)) {$hiddenAddonsInputCnt=parseRPArrayStr($addonsInputCnt,":x:",":");} else {$hiddenAddonsInputCnt=$addonsInputCnt;} print ""; print ""; if ($_SESSION["userId"]) { print ""; } print ""; print ""; print ""; print ""; print ""; print ""; } if ($step > 2 and $type == "d") { print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; if ($_SESSION["userId"]) { print ""; } } if ($step > 2 and $type == "dopt") { print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; if ($_SESSION["userId"]) { $freedom = @mb_split("\r\n",$freedomains); while (list($k,$v) = @each($freedom)) { print ""; } } $freedom = @mb_split("\r\n",$freedomains); while (list($k,$v) = @each($freedom)) { print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; } while (list($k,$v) = @each($zone_id)) { print ""; } } if ($step > 2 and $type == "shop") { print ""; print ""; print ""; } if ($step > 2) { print ""; } if ($error) { print "".$_lang[Error].": $error

"; } if ($warning) { print "".htmlDecode($warning)."

"; } ################################################# # Вывод форм заказа (Шаг 1) # ################################################# if ($step == 1 and !$_SESSION['userId']) { ########################## Таблица выбора типа клиента print "".$_lang[OrderSelectUserType].":"; print ""; print ""; print ""; print "
"; if ($type == "partner") { $usertype = 'new'; } if ($type != "partner") { ?> onclick="hideblankdiv('tablereg'); showblankdiv('tablelogin')">
onclick="hideblankdiv('tablelogin'); showblankdiv('tablereg')">

"; ########################## Таблица аутентификации существующего клиента if ($usertype != "new") {$style="style='display: block;'";} else {$style="style='display: none;'";} print "
"; print "".$_lang[OrderEnterLoginAndPassword].":"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
* ".$_lang[OrderLogin].":
* ".$_lang[OrderPassword].":

"; print "
"; ########################## Таблица регистрации нового клиента if ($usertype == "new") {$style="style='display: block;'";} else {$style="style='display: none;'";} print "
"; print "".$_lang[OrderRegData].":"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; if (GetSetting("usersChangeCurrency")) { ?> "; print ""; print ""; } if ($registerNeedFIO or ($attachPDFtoBill and $type != "partner")) { if ($phone) { $phone = @mb_split(" ",$phone); $phone[0] = preg_replace("/\+/iu","",$phone[0]);} else { $phone = array(); } $profileTypes=GetSetting("profileTypes"); $profileTypes=mb_split("::",$profileTypes); if ($org and !@in_array($org,$profileTypes)) { $org = ""; } if (!$org) { if (@in_array("1",$profileTypes)) { $org = 1; } else if (@in_array("2",$profileTypes)) { $org = 2; } else if (@in_array("3",$profileTypes)) { $org = 3; } } if ($org == "1") {$orgCheck1='checked';} else if ($org == "2") {$orgCheck2='checked';} else if ($org == "3") {$orgCheck3='checked';} if ($attachPDFtoBill and $type != "partner") { print ""; print ""; print ""; } print ""; if ($attachPDFtoBill and $type != "partner") { print ""; print ""; print ""; print ""; print ""; print ""; } } if ($registerNeedMobile) { if ($mobile) { $mobile = @mb_split(" ",$mobile); $mobile[0] = preg_replace("/\+/iu","",$mobile[0]);} else { $mobile = array(); } print ""; print ""; if ($registerNeedMobile == "2" and $registerNeedMobileVerification) { print ""; } print ""; } $r = GetAboutUsFromAll(); if (@mysql_num_rows($r) > 0) { print ""; print ""; print ""; } if ($needrules) { $needrulesurl = GetSetting("needrulesurl"); if ($needrules == "1") { $title=$_lang[OrderRules]; $rulestxt = $_lang[OrderPrefixS]." ".$_lang[OrderRules2]." ".$_lang[OrderObyazVipolnyat]; } else if ($needrules == "2") { $title=$_lang[OrderDogovorOferta]; $rulestxt = $_lang[OrderSUsloviyami]." ".$_lang[OrderDogovorOferta2]." ".$_lang[OrderObyazVipolnyat]; } print ""; print ""; if ($rules) {$rulCheck1="checked";} print ""; } if ($needpersonalinfo and $type == "partner") { $needpersonalinfourl = GetSetting("needpersonalinfourl"); $personalinfotxt = $_lang[OrderPrefixS]." ".$_lang[OrderPersonalInfo2]." ".$_lang[OrderPretenziyNeImeyu]; print ""; print ""; if ($personalinfo) {$personalCheck1="checked";} print ""; } if ($partnerEnable and $partnerEnableOrderReferalLogin) { if ($_COOKIE["partnerRootPanelCookie"]) { $referalLogin = GetUserById($_COOKIE["partnerRootPanelCookie"]); $referalLogin = $referalLogin->login; } print ""; print ""; print ""; } if (GetSetting("captcha_reg") and $type == "partner") { print ""; print ""; print ""; } print "
* ".$_lang[OrderLogin].":
".$_lang[OrderLoginComment]."
* ".$_lang[OrderPassword].":
".$_lang[OrderPasswordComment]."
* ".$_lang[OrderRePassword].":
".$_lang[OrderGeneratePassword]."
* ".$_lang[OrderEmail].":
".$_lang[ProfileCurrency].":
* ".$_lang[ProfileUserType].":
"; if (@in_array("1",$profileTypes)) { print " ".$_lang[OrderUserPrivatePerson]." "; } if (@in_array("2",$profileTypes)) { print " ".$_lang[OrderUserPrivatePredprinimatel]." "; } if (@in_array("3",$profileTypes)) { print " ".$_lang[OrderUserOrg]; } print "
"; if ($org == "3") { $profileOrgDisplay = "block"; $profilePersonDisplay = "none";} else { $profileOrgDisplay = "none"; $profilePersonDisplay = "org";} if ($attachPDFtoBill and $type != "partner") { print "
"; print ""; print ""; print ""; print ""; print "
* ".$_lang[ProfileOrg].":
"; print "
"; } if ($registerNeedFIO == "2" or ($attachPDFtoBill and $type != "partner")) { $warnCode = "*"; } else { $warnCode = ""; } print "
"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
$warnCode ".$_lang[ProfileSurname].":
$warnCode ".$_lang[ProfileName].":
$warnCode ".$_lang[ProfileOtchestvo].":
"; print "
"; print "
* ".$_lang[ProfileCountry].":
"; printCountrySelect($country); print "
* ".$_lang[ProfilePhone].":
+ ( )
"; if ($registerNeedMobile == "2") { print "* "; } print $_lang[ProfileMobile].":
$_lang[VerificationInfo]
+ ( )
".$_lang[OrderAboutUsFrom].":
"; printAboutUsFromSelect($aboutusfromid); print "
* $title:
$rulestxt
* $_lang[OrderPersonalInfo]:
$personalinfotxt
".$_lang[OrderReferalLogin].":
* $_lang[Captcha]:
".$_lang[CaptchaNeVidno]." ".$_lang[CaptchaObnovit]."

"; print "
"; } if ($step == 1 and $type == "h") { if ($domain_reg == "") {$domain_reg=1;} print "".$_lang[OrderParamsOfOrder].":"; print ""; print ""; print ""; print ""; $orderNotShowDomainsBlock = @mb_split("::",GetSetting("orderNotShowDomainsBlock")); if (@in_array($vid,$orderNotShowDomainsBlock) or $vid == "vpn" or $vid == "ssh") { print ""; } else { print ""; print ""; print ""; } print "
* ".$_lang[OrderTarif].":
"; $where = ""; if ($vid) { $where = $where." and vid='$vid'"; } if ($one) { $where = $where." and id='$tarif_id'"; } else { if ($group) { $where = $where." and tarifsgroup='$group'"; } else if ($tarif_group) { $where = $where." and tarifsgroup='$tarif_group'"; } } $orderTarifType=GetSetting("orderTarifType"); if ($orderTarifType == "select") { print "id $addon $slotAddon $jsAddon> $rr->name (".$tarifCostTxt.") $description
"; $tarifsCosts = GetTarifsCostsActive($rr->id); if (@mysql_num_rows($tarifsCosts) > 0) { print "     ".$_lang[OrderCostsVariants].":
"; while ($tarifsCost = @mysql_fetch_object($tarifsCosts)) { $tarifsCost->cost_setup = $tarifsCost->cost_setup / GetCurrencyKoeficientByCode($tarifsCost->cost_setupCurrency); $tarifsCost->cost = $tarifsCost->cost / GetCurrencyKoeficientByCode($tarifsCost->costCurrency); if ($tarifsCost->cost_setup) { $addonTarifsCost=" + ".round($tarifsCost->cost_setup*CURK,2)." ".CURS." ".$_lang[OrderRazovoZaUstanovku]; } else { $addonTarifsCost=""; } if ($maxDiscount > 0) { $tarifsCost->cost = $tarifsCost->cost - $tarifsCost->cost/100*$maxDiscount; $tarifsCostTxt = $_lang[OrderFrom]." ".round($tarifsCost->cost*CURK,2)." ".CURS."/".$_lang[OrderSokraschenieMonth].$slotCostAddon.$addonTarifsCost; } else { $tarifsCostTxt = round($tarifsCost->cost*CURK,2)." ".CURS."/".$_lang[OrderSokraschenieMonth].$slotCostAddon.$addonTarifsCost; } if ($costId == $tarifsCost->id) { $tarifsCostAddon = "checked"; } else { $tarifsCostAddon = ""; } print "    id $tarifsCostAddon> $tarifsCostTxt
"; } } } } if ($orderTarifType == "select") { print ""; print " "; } if ($selectedWithSlots) { $st = "block"; } else {$st = "none";} print "

* ".$_lang[OrderSlotsCount].":
"; print "
* ".$_lang[OrderDomain].":
"; $weSalesTypes = GetSetting("weSalesTypes"); $weSalesTypes = @mb_split("::",$weSalesTypes); if (!@in_array("domains",$weSalesTypes)) { $domain_reg = "0"; } if ($domain_reg == "1") {$domCheck1="checked";} if ($domain_reg == "0") {$domCheck2="checked";} if ($domain_reg == "2") {$domCheck3="checked";} if ($domain_reg == "3") {$domCheck4="checked";} if ($selectedOnlyWithDomain) { $domDisabled1=""; $domDisabled2="disabled"; $domDisabled3="disabled"; $domDisabled4=""; } else { $domDisabled1=""; $domDisabled2=""; if ($selectedAllowWithoutDomain) { $domDisabled3=""; } else { $domDisabled3="disabled"; } $domDisabled4=""; } if (@in_array("domains",$weSalesTypes)) { print " ".$_lang[OrderDomainNew]."
"; } if (@in_array("domains",$weSalesTypes) and GetZonesNamesActiveWithTransferCount() > 0) { print " ".$_lang[OrderDomainTransfer]."
"; } print " ".$_lang[OrderDomainExists]."
"; print " ".$_lang[OrderWithoutDomain]."
"; if ($domain_reg == "0") {$style="style='display: block;'";} else {$style="style='display: none;'";} print "
"; print "www . ".$_lang[OrderDomainComment]; print "
"; if (@in_array("domains",$weSalesTypes)) { if ($domain_reg == "1" or $domain_reg == "3") {$style="style='display: block;'";} else {$style="style='display: none;'";} print "
"; print "www . "; print "
"; } print "

"; } if ($step == 1 and $type == "d") { print "".$_lang[OrderParamsOfOrder].":"; print ""; print ""; print ""; print ""; $weSalesTypes = GetSetting("weSalesTypes"); $weSalesTypes = @mb_split("::",$weSalesTypes); if (@in_array("domains",$weSalesTypes) and GetZonesNamesActiveWithTransferCount() > 0) { print ""; } else { print ""; } print "
* ".$_lang[OrderDomain].":
"; print "www . "; print "
"; if (!$domain_reg) {$domain_reg=1;} if ($domain_reg == "1") {$domCheck1="checked";} if ($domain_reg == "3") {$domCheck2="checked";} print " ".$_lang[OrderDomainNew]."
"; print " ".$_lang[OrderDomainTransfer]."
"; print "

"; } if ($step == 1 and $type == "dopt") { print "".$_lang[OrderParamsOfOrder].":"; print ""; if ($check) { print ""; print ""; print ""; print ""; print ""; print ""; } else { print ""; print ""; print ""; print ""; print ""; print ""; $onclick = "onclick=\"javascript: alert('".$_lang[OrderDomainsCheckAlert]."'); return false;\""; } print "
".$_lang[OrderResultOfCheck].":
"; print ""; print ""; $domain=@mb_split("\r\n",$domains); if ($_SESSION['userId']) { $freeDomsToday = GetDomainsFreeCountTodayByUserId($_SESSION['userId']); } else { $freeDomsToday = 0; } $freedomains=array(); while (list($k,$v) = @each($domain)) { if ($v) { $arr=""; $res=""; $v=preg_replace("/^www\./ui","",$v); preg_match("/^([^\.]+)\.(.+)$/ui",$v,$arr); $dname=mb_strtolower($arr[1]); $dzone=mb_strtolower($arr[2]); $activeZone = GetActiveZoneByZone($dzone); if (!$dname or !$dzone) { $res = $_lang[OrderDomainStatusErrorNotCorrect]; $colorStyle = "domainerror"; } else if (!$activeZone) { $res = $_lang[OrderRegIn]." .$dzone ".$_lang[OrderNotSupported]; $colorStyle = "domainerror"; } else if (mb_strlen($dname) < $activeZone->minWidth or mb_strlen($dname) > $activeZone->maxWidth) { $res = $_lang[OrderDomainStatusErrorLength]; $colorStyle = "domainerror";$res=str_replace("{minWidth}",$activeZone->minWidth,$res);$res=str_replace("{maxWidth}",$activeZone->maxWidth,$res);} else if ($activeZone->idn == "no" and !preg_match("/^[a-z0-9]{1}[a-z0-9-]*[a-z0-9]{1}$/u",$dname)) { $res = $_lang[OrderDomainStatusErrorSymbolsNoIDN]; $colorStyle = "domainerror";} else if ($activeZone->idn == "yes" and !preg_match("/^[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9-]*[a-zа-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}$/u",$dname)) { $res = $_lang[OrderDomainStatusErrorSymbols]; $colorStyle = "domainerror";} else if ($activeZone->idn == "only" and !preg_match("/^[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9-]*[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ0-9]{1}$/u",$dname)) { $res = $_lang[OrderDomainStatusErrorSymbolsOnlyIDN]; $colorStyle = "domainerror";} else if ($activeZone->free and $domainFreeLimit > 0 and $freeDomsToday >= $domainFreeLimit) { $res = $_lang[OrderErrorDomainFreeLimit]." ($domainFreeLimit)"; $colorStyle = "domainerror";} else { $k=@mysql_query("select * from orders_domains where domain='$v' and todate>NOW()") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($k) > 0) { $res=$_lang[OrderDomainStatusErrorOtherUser]; $colorStyle = "domainreged"; } else { $dom=new domain($dname.".".$dzone); if (!$dom->is_available()) { $res=$_lang[OrderDomainStatusNotFree]; $colorStyle = "domainreged"; } else { $res = $_lang[OrderDomainStatusFree]; $colorStyle = "domainfree"; $freedomains[]=$v; if ($activeZone->free) {$freeDomsToday++;} } } } print ""; } } print "
  ".$_lang[OrderDomainSmallOneWord]."  ".$_lang[OrderDomainStatus]."
"; if ($dname and $dzone) { print "$dname.$dzone"; } else {print "$v";} print "$res
"; print ""; print ""; print "
* ".$_lang[OrderDNS].":
"; print " ".$_lang[OrderDNSOne]."
"; print " ".$_lang[OrderDNSEach]."

"; print "
".$_lang[OrderAvailZones].":
"; $zones=GetZonesActive(); $zones_cnt=@mysql_num_rows($zones); while ($zone = @mysql_fetch_object($zones)) { $i++; print ".$zone->zone"; if ($zones_cnt != $i) {print ", ";} } print "
* ".$_lang[OrderDomains].":
"; print ""; print "
".$_lang[OrderDomainsComment]."
"; print ""; print "

"; } if ($step == "1" and $domainNotAvailable) { if ($type == "h") {$withhost=1;} else {$withhost=0;} if (count($checkZones) > 0) { $resTitle = $_lang[OrderFreeDomainsInSelectedZones]; $allzones = $checkZones; } else { $resTitle = $_lang[OrderFreeDomainsInFavoriteZones]; $allzones = GetZonesNamesForWhoisFavorite(); } if (count($allzones) > 0) { print "".$resTitle.":"; print ""; print ""; print ""; print "
"; print ""; print ""; $cnt = 0; while (list($k, $v) = each($allzones)) { if ($zone != $v) { $d = new domain($domain.".".$v); if ($d->is_available() and !$d->last_error) { $favoriteZone = GetZoneByZone($v); $favoriteCost = GetDomainCostForUserByZoneId($_SESSION["userId"],$favoriteZone->id,$withhost); print ""; $cnt++; } } } if (!$cnt) { print ""; } print "
  ".$_lang[OrderSmallOrder]."  ".$_lang[OrderDomainSmallOneWord]."  ".$_lang[OrderSrokSmall]."  ".$_lang[OrderCostSmall]."
$domain.".$favoriteZone->zone."  ".($favoriteZone->minsrok/12)." ".$_lang[OrderSokraschenieGod]."  ".round($favoriteCost*CURK,2)." ".CURS."
".$_lang[WhoisNoFreeDomainsInOtherZones]."
"; print "

"; } $zones = GetZonesForWhois(); if (@mysql_num_rows($zones) > 0) { print "".$_lang[OrderAvailZones].":"; print ""; print ""; print ""; print "
"; print ""; print ""; while ($zone = @mysql_fetch_object($zones)) { $zoneCost = GetDomainMinCostForUserByZone($_SESSION["userId"],$zone->zone,$withhost); print ""; } print ""; print "
  ".$_lang[OrderZoneSmall]."  ".$_lang[OrderSrokSmall]."  ".$_lang[OrderCostSmall]."
.".$zone->zone."  ".($zone->minsrok/12)." ".$_lang[OrderSokraschenieGod]."  ".round($zoneCost*CURK,2)." ".CURS."
"; print "

"; } } if ($step == 1 and $type == "shop") { print "".$_lang[OrderParamsOfOrder].":"; print ""; print ""; print ""; print ""; print "
* ".$_lang[OrderItem].":
"; if ($one) { $where = $where." and id='$item_id'"; } else { if ($group) { $where = $where." and itemgroup='$group'"; } else if ($item_group) { $where = $where." and itemgroup='$item_group'"; } } $r=@mysql_query("select * from shop_items where active=1 $where order by name") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); $items_cnt = @mysql_num_rows($r); while ($rr = @mysql_fetch_object($r)) { if ($_SESSION['userId']) { $itemSpecCost = GetSpecialCost($_SESSION['userId'],"shop",$rr->id); if ($itemSpecCost) { $rr->cost = $itemSpecCost["cost1"]; } } if ($rr->id == $item_id or $item == $rr->name or $items_cnt == 1) {$addon='checked'; $item_id=$rr->id;} else {$addon='';} if ($rr->costtype == "month") { $itemCostTxtAddon = "/".$_lang[OrderSokraschenieMonth];} else if ($rr->costtype == "year") { $itemCostTxtAddon = "/".$_lang[OrderSokraschenieGod];} else { $itemCostTxtAddon = " ".$_lang[OrderRazovo]; } $itemCostTxt = round($rr->cost*CURK,2)." ".CURS.$itemCostTxtAddon; $rr->description = htmlDecode($rr->description); $rr->description = preg_replace("/\n/ui","
",$rr->description); if ($rr->description) {$description="\"$rr-description\" border=0>";} else {$description="";} print "id $addon> $rr->name (".$itemCostTxt.") $description
"; } print "

"; } if ($step == 2 and $type == "h") { if ($t->cost_setup) {$addon_cost=" + ".round($t->cost_setup*CURK,2)." ".CURS." ".$_lang[OrderRazovoZaUstanovku];} else {$addon_cost="";} print "$t->name (".round($t->cost*CURK,2)." ".CURS."/".$_lang[OrderSokraschenieMonth]."$addon_cost)"; print ""; print ""; print ""; print ""; $addonsForTarif=@mb_split(":x:",$t->addons); $addonsCnt=0; $osCnt=0; $panelCnt=0; $allAddonsCnt=0; while (list($k,$v) = @each($addonsForTarif)) { if ($v) { $oneAddon = GetAddonById($v); if ($oneAddon->active and !$oneAddon->onlyifrenew) { $allAddonsCnt++; if ($oneAddon->isOs) {$osCnt++;} else if ($oneAddon->isPanel) {$panelCnt++;} else {$addonsCnt++;} } } } if ($allAddonsCnt > 0) { if ($prev) {$addons=@mb_split(":x:",$addons); $addonsInputCnt=parseRPStrArray($addonsInputCnt,":x:",":");} if ($osCnt > 0) { print ""; print ""; print ""; } if ($panelCnt > 0) { print ""; print ""; print ""; } if ($addonsCnt > 0) { print ""; print ""; print ""; print ""; print ""; } } if ($t->serverid) { $server_main=GetServers($t->serverid); if ($server_main->id) { $subserver = mysql_query("select * from servers where parentid='$server_main->id'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($subserver) > 0) { print ""; print ""; print ""; print ""; print ""; } print "
* ".$_lang[OrderSrokZakaza].":
"; $r=@mysql_query("select * from tarifs_sroki where tarif_id='$tarif_id' and `order`='1' order by months"); if (@mysql_num_rows($r) > 0) { print ""; print ""; while ($rr = @mysql_fetch_object($r)) { $cost = $t->cost*$rr->months; $itogo=$cost-($cost/100)*$rr->discount+$t->cost_setup; if ($rr->discount) {$discount="$rr->discount%";} else {$discount="$rr->discount%";} if ($months == $rr->months) {$monthCheck='checked';} else {$monthCheck='';} if ($domain_reg == "1" or $domain_reg == "3") { $tfreedomains=@mysql_query("select zone from tarifs_freedomains where tarif_id='$tarif_id' and hostmonths='$rr->months' and renew='0'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($tfreedomains) > 0) { $freezones=""; while ($tfreedomain = @mysql_fetch_object($tfreedomains)) { $freezones = $freezones.".".$tfreedomain->zone." "; } $akciya="<B>".$_lang[OrderAkciyaDomain]."</B><BR>".$_lang[OrderPriZakaze]." <B>$t->name</b> ".$_lang[OrderNaSrok]." <B>$rr->months ".$_lang[OrderSokraschenieMonth]."</b>,<BR> ".$_lang[OrderPoluchaeteVPodarok].":<BR> <B>$freezones</b>"; } else { $akciya=""; } } print ""; } print "
  ".$_lang[OrderSrokSmall]."  ".$_lang[OrderCostSmall]."  ".$_lang[OrderDiscountSmall]."  ".$_lang[OrderTotalSmall]."
months $monthCheck>  $rr->months ".$_lang[OrderSokraschenieMonth]."  ".round($cost*CURK,2)." ".CURS."  $discount  ".round($itogo*CURK,2)." ".CURS."$akciya
"; } else { print $_lang[OrderErrorNetSrokovZakaza]; } print "
".$_lang[OrderAddonsOs].":
"; reset($addonsForTarif); while (list($k,$v) = @each($addonsForTarif)) { if ($v) { $oneAddon = GetAddonById($v); if ($oneAddon->active and $oneAddon->isOs and !$oneAddon->onlyifrenew) { $addonSpecCost = GetSpecialCost($_SESSION['userId'],"addon",$oneAddon->id); if ($addonSpecCost) { $oneAddon->cost_start = $addonSpecCost["cost1"]; $oneAddon->cost_monthly = $addonSpecCost["cost2"]; } else { $oneAddon->cost_start = $oneAddon->cost_start / GetCurrencyKoeficientByCode($oneAddon->cost_startCurrency); $oneAddon->cost_monthly = $oneAddon->cost_monthly / GetCurrencyKoeficientByCode($oneAddon->cost_monthlyCurrency); } $addonMoney = ""; if ($oneAddon->cost_start) { $addonMoney=round($oneAddon->cost_start*CURK,2)." ".CURS." ".$_lang[OrderRazovo]; if ($oneAddon->cost_monthly) {$addonMoney = $addonMoney." + ";} } if ($oneAddon->cost_monthly) {$addonMoney=$addonMoney.round($oneAddon->cost_monthly*CURK,2)." ".CURS."/".$_lang[OrderSokraschenieMonth];} if (!$addonMoney) { $addonMoney = $_lang[OrderFree]; } if (@in_array($oneAddon->id,$addons)) {$addCheck="checked";} else {$addCheck="";} print "id> $oneAddon->name ($addonMoney)
"; } } } print "
".$_lang[OrderAddonsPanel].":
"; reset($addonsForTarif); while (list($k,$v) = @each($addonsForTarif)) { if ($v) { $oneAddon = GetAddonById($v); if ($oneAddon->active and $oneAddon->isPanel and !$oneAddon->onlyifrenew) { $addonSpecCost = GetSpecialCost($_SESSION['userId'],"addon",$oneAddon->id); if ($addonSpecCost) { $oneAddon->cost_start = $addonSpecCost["cost1"]; $oneAddon->cost_monthly = $addonSpecCost["cost2"]; } else { $oneAddon->cost_start = $oneAddon->cost_start / GetCurrencyKoeficientByCode($oneAddon->cost_startCurrency); $oneAddon->cost_monthly = $oneAddon->cost_monthly / GetCurrencyKoeficientByCode($oneAddon->cost_monthlyCurrency); } $addonMoney = ""; if ($oneAddon->cost_start) { $addonMoney=round($oneAddon->cost_start*CURK,2)." ".CURS." ".$_lang[OrderRazovo]; if ($oneAddon->cost_monthly) {$addonMoney = $addonMoney." + ";} } if ($oneAddon->cost_monthly) {$addonMoney=$addonMoney.round($oneAddon->cost_monthly*CURK,2)." ".CURS."/".$_lang[OrderSokraschenieMonth];} if (!$addonMoney) { $addonMoney = $_lang[OrderFree]; } if (@in_array($oneAddon->id,$addons)) {$addCheck="checked";} else {$addCheck="";} print "id> $oneAddon->name ($addonMoney)
"; } } } print "
".$_lang[OrderAddons].":
"; $addonsGroupSelect = array(); reset($addonsForTarif); while (list($k,$v) = @each($addonsForTarif)) { if ($v) { $oneAddon = GetAddonById($v); if ($oneAddon->active and !$oneAddon->isOs and !$oneAddon->isPanel and !$oneAddon->onlyifrenew) { $group = GetAddonsGroupById($oneAddon->addonsgroup); if ($group->isSelect) { $addonsGroupSelect[$group->id][] = $oneAddon->id; } else { $addonSpecCost = GetSpecialCost($_SESSION['userId'],"addon",$oneAddon->id); if ($addonSpecCost) { $oneAddon->cost_start = $addonSpecCost["cost1"]; $oneAddon->cost_monthly = $addonSpecCost["cost2"]; } else { $oneAddon->cost_start = $oneAddon->cost_start / GetCurrencyKoeficientByCode($oneAddon->cost_startCurrency); $oneAddon->cost_monthly = $oneAddon->cost_monthly / GetCurrencyKoeficientByCode($oneAddon->cost_monthlyCurrency); } $addonMoney = ""; if ($oneAddon->cost_start) { $addonMoney=round($oneAddon->cost_start*CURK,2)." ".CURS." ".$_lang[OrderRazovo]; if ($oneAddon->cost_monthly) {$addonMoney = $addonMoney." + ";} } if ($oneAddon->cost_monthly) {$addonMoney=$addonMoney.round($oneAddon->cost_monthly*CURK,2)." ".CURS."/".$_lang[OrderSokraschenieMonth];} if (!$addonMoney) { $addonMoney = $_lang[OrderFree]; } if ($oneAddon->textid == "vamshop") { $addVam = "checked onclick=\"return false;exit;\""; } else { $addVam = ""; } if (@in_array($oneAddon->id,$addons)) {$addCheck="checked";} else {$addCheck="";} print "id> $oneAddon->name ($addonMoney)"; if (!$addonsInputCnt[$v]) { $addonsInputCnt[$v] = 1; } if ($oneAddon->cntforoneorder != 1 and $oneAddon->allowSetCnt) { print ", ".$_lang[FakturaSokraschenieShtuka];} else { print ""; } print "
"; } } } } @ksort($addonsGroupSelect); while (list($k,$v) = @each($addonsGroupSelect)) { if ($k) { $f=0; $fCNT = count($v); while (list($kk,$vv) = @each($v)) { $f++; $oneAddon = GetAddonById($vv); $group = GetAddonsGroupById($k); $addonSpecCost = GetSpecialCost($_SESSION['userId'],"addon",$oneAddon->id); if ($addonSpecCost) { $oneAddon->cost_start = $addonSpecCost["cost1"]; $oneAddon->cost_monthly = $addonSpecCost["cost2"]; } else { $oneAddon->cost_start = $oneAddon->cost_start / GetCurrencyKoeficientByCode($oneAddon->cost_startCurrency); $oneAddon->cost_monthly = $oneAddon->cost_monthly / GetCurrencyKoeficientByCode($oneAddon->cost_monthlyCurrency); } if ($f == 1) { print "
".$group->name.":
"; print ""; reset($v); while (list($kk,$vv) = @each($v)) { print ""; } } } } } print "
".$_lang[OrderServerPlace].":
"; if ($server == $server_main->id) {$srvMainCheck='checked';} else {$srvMainCheck='';} print "id $srvMainCheck> $server_main->place
"; while ($subserverone = @mysql_fetch_object($subserver)) { if (!($subserverone->accLimit > 0 and GetServerUserCount($subserverone->id) >= $subserverone->accLimit)) { if ($server == $subserverone->id) {$srvSubCheck='checked';} else {$srvSubCheck='';} print "id $srvSubCheck> $subserverone->place
"; } } } } } if (GetSetting("testPeriodEnable") and $t->testPeriod) { print "
".$_lang[OrderTestPeriod].":
"; if ($testPeriodNeed) { $testPcheck = "checked"; } else { $testPcheck = ""; } print " ".$_lang[OrderTestPeriodOrder]; print "

"; if ($domain_reg == "1" or $domain_reg == "3") { print "$fulldomain (".round($domainCost*CURK,2)." ".CURS."/".$_lang[OrderYear].")"; print ""; if ($domain_reg == "3" and $tzones->transferNeedAuth) { print ""; print ""; print ""; } if ($selectRegistratorFlag) { print ""; print ""; print ""; print ""; print ""; print ""; print ""; } if ($tzones->privacy) { if ($tzones->privacy == "person") { $privacyAddonTitle = " (".$_lang[OrderrOnlyForPerson].")"; } if ($tzones->privacy_cost) { $privacyAddonCost = round($tzones->privacy_cost*CURK,2)." ".CURS."/".$_lang[OrderYear]; } else { $privacyAddonCost = $_lang[OrderFree]; } print ""; print ""; print ""; } if (GetSetting("sertificateEnable")) { print ""; print ""; print ""; } print "
* ".$_lang[OrderDomainTransferAuth].":
"; print ""; print "
* ".$_lang[OrderDomainRegistrator].":
"; print ""; } $localContactUser = GetUserByLogin(GetSetting("localContactUser")); if ($_SESSION["userId"] or ($localContactUser->id and $tzones->localContact)) { print "
* ".$_lang[OrderDomainOwner].":
"; if ($_SESSION["userId"]) { printProfileSelect($_SESSION["userId"],$profileId); print "
"; } if ($localContactUser->id and $tzones->localContact) { if ($tzones->localContact_cost) { $localContactAddonCost = round($tzones->localContact_cost*CURK,2)." ".CURS."/".$_lang[OrderYear]; } else { $localContactAddonCost = $_lang[OrderFree]; } print " ".$_lang[OrderLocalContactOrder]." (".$localContactAddonCost.") $_lang[OrderLocalContactHelp]"; } } if ($tzones->licenseRequired == "yes" or ($tzones->licenseRequired == "idn" and preg_match("/[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ]+/u",$domain))) { print "
* ".$_lang[OrderDomainTM].":
"; print ""; print "
".$_lang[OrderPrivacy].$privacyAddonTitle.":
".$_lang[OrderPrivacyOrder]." (".$privacyAddonCost.")
".$_lang[OrderCert].":
".$_lang[OrderCertOrder]." (".round(GetSetting("sertificateCost")*CURK,2)." ".CURS.")

"; } } if ($step == 2 and $type == "d") { print "$fulldomain (".round($domainCost*CURK,2)." ".CURS."/".$_lang[OrderYear].")"; print ""; if ($domain_reg == "3" and $tzones->transferNeedAuth) { print ""; print ""; print ""; } if ($selectRegistratorFlag) { print ""; print ""; print ""; } else { $registrator = GetRegistratorById($tzones->autoreg); } $localContactUser = GetUserByLogin(GetSetting("localContactUser")); if ($_SESSION["userId"] or ($localContactUser->id and $tzones->localContact)) { print ""; print ""; print ""; } if ($tzones->licenseRequired == "yes" or ($tzones->licenseRequired == "idn" and preg_match("/[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ]+/u",$domain))) { print ""; print ""; print ""; } if ($tzones->privacy) { if ($tzones->privacy == "person") { $privacyAddonTitle = " (".$_lang[OrderrOnlyForPerson].")"; } if ($tzones->privacy_cost) { $privacyAddonCost = round($tzones->privacy_cost*CURK,2)." ".CURS."/".$_lang[OrderYear]; } else { $privacyAddonCost = $_lang[OrderFree]; } print ""; print ""; print ""; } if (GetSetting("sertificateEnable")) { print ""; print ""; print ""; } print ""; if ($tzones->enableDefaultNS and $tzones->defaultNS1 and $tzones->defaultNS2) { if ($useDefaultNS) { $useDefaultNSCheck1 = "checked"; $useDefaultNSCheck2 = ""; $nsDisabled = "disabled"; $ns1=""; $ns2=""; $ns3=""; $ns4=""; $ns1ip=""; $ns2ip=""; $ns3ip=""; $ns4ip=""; } else { $useDefaultNSCheck1 = ""; $useDefaultNSCheck2 = "checked"; $nsDisabled = ""; } print ""; print ""; } print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
* ".$_lang[OrderDomainTransferAuth].":
"; print ""; print "
* ".$_lang[OrderDomainRegistrator].":
"; print ""; print "
* ".$_lang[OrderDomainOwner].":
"; if ($_SESSION["userId"]) { printProfileSelect($_SESSION["userId"],$profileId); print "
"; } if ($localContactUser->id and $tzones->localContact) { if ($tzones->localContact_cost) { $localContactAddonCost = round($tzones->localContact_cost*CURK,2)." ".CURS."/".$_lang[OrderYear]; } else { $localContactAddonCost = $_lang[OrderFree]; } print " ".$_lang[OrderLocalContactOrder]." (".$localContactAddonCost.") $_lang[OrderLocalContactHelp]"; } print "
* ".$_lang[OrderDomainTM].":
"; print ""; print "
".$_lang[OrderPrivacy].$privacyAddonTitle.":
".$_lang[OrderPrivacyOrder]." (".$privacyAddonCost.")
".$_lang[OrderCert].":
".$_lang[OrderCertOrder]." (".round(GetSetting("sertificateCost")*CURK,2)." ".CURS.")
".$_lang[OrderDNS].":
"; print " ".$_lang[OrderUseDefaultNS]."
"; print " ".$_lang[OrderFillOwnNS]; print "
* ".$_lang[OrderNS1].":
"; print ""; if ($registrator->type != "gfx" and $domain_reg != "3") { print " ".$_lang[OrderIP].": "; } print "
* ".$_lang[OrderNS2].":
"; print ""; if ($registrator->type != "gfx" and $domain_reg != "3") { print " ".$_lang[OrderIP].": "; } print "
".$_lang[OrderNS3].":
"; print ""; if ($registrator->type != "gfx" and $domain_reg != "3") { print " ".$_lang[OrderIP].": "; } print "
".$_lang[OrderNS4].":
"; print ""; if ($registrator->type != "gfx" and $domain_reg != "3") { print " ".$_lang[OrderIP].": "; } print "

"; } if ($step == 2 and $type == "dopt") { print "".$_lang[OrderDNS].":"; print ""; if ($dnstype == "one") { print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; } else if ($dnstype == "each") { print ""; print ""; } print "
* ".$_lang[OrderNS1].":
"; print " ".$_lang[OrderNS1Comment]; print "
* ".$_lang[OrderNS2].":
"; print " ".$_lang[OrderNS2Comment]; print "
".$_lang[OrderNS3].":
"; print ""; print "
".$_lang[OrderNS4].":
"; print ""; print "
"; print ""; print ""; $freedomains = @mb_split("\r\n",$freedomains); while (list($k,$v) = each($freedomains)) { $zone=GetZoneByNonExistsDomain($v); $registrator = GetRegistratorById($zone->autoreg); print ""; } print "
  ".$_lang[OrderDomainSmallOneWord]."  ".$_lang[OrderNS1]."  ".$_lang[OrderNS2]."  ".$_lang[OrderNS3]."  ".$_lang[OrderNS4]."
$v"; if ($registrator->type != "gfx") { print "
".$_lang[OrderIP].": "; } print "
"; if ($registrator->type != "gfx") { print "
".$_lang[OrderIP].": "; } print "
"; if ($registrator->type != "gfx") { print "
".$_lang[OrderIP].": "; } print "
"; if ($registrator->type != "gfx") { print "
".$_lang[OrderIP].": "; } print "
"; print "

"; if (!is_array($freedomains)) {$freedomains = @mb_split("\r\n",$freedomains);} reset($freedomains); while (list($k,$v) = each($freedomains)) { $zone=GetZoneByNonExistsDomain($v); $zones=@mysql_query("select * from zones where zone='$zone->zone' and active='1'") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($zones) > 1) { $selectRegistratorFlag = 1; } } if ($selectRegistratorFlag) { print "".$_lang[OrderDomainRegistrator].":"; print ""; print ""; print ""; print "
"; print ""; print ""; reset($freedomains); while (list($k,$v) = each($freedomains)) { $zone=GetZoneByNonExistsDomain($v); $zones=@mysql_query("select * from zones where zone='$zone->zone' and active='1' order by isDefault desc") or die("File: ".__FILE__."
Line: ".__LINE__."
MySQL Error: ".mysql_error()); if (@mysql_num_rows($zones) > 1) { print ""; } } print "
  ".$_lang[OrderDomainSmallOneWord]."  ".$_lang[OrderDomainRegistratorSmallOneWord]."
$v
"; print "

"; } if ($_SESSION["userId"]) { print "".$_lang[OrderDomainOwner].":"; print ""; print ""; print ""; print "
"; print ""; print ""; $sertificateEnable = GetSetting("sertificateEnable"); $sertificateCost = GetSetting("sertificateCost"); reset($freedomains); while (list($k,$v) = each($freedomains)) { $zone=GetZoneByNonExistsDomain($v); print ""; } print "
  ".$_lang[OrderDomainSmallOneWord]."  ".$_lang[OrderDomainOwnerSmallOneWord]."
$v"; if ($zone->warning) { print "".htmlDecode($zone->warning)."

"; } printProfileSelect($_SESSION["userId"],$profile_id[$v],0,"profile_id[$v]"); print "
"; $localContactUser = GetUserByLogin(GetSetting("localContactUser")); if ($localContactUser->id and $zone->localContact) { if ($zone->localContact_cost) { $localContactAddonCost = round($zone->localContact_cost*CURK,2)." ".CURS."/".$_lang[OrderYear]; } else { $localContactAddonCost = $_lang[OrderFree]; } print " ".$_lang[OrderLocalContactOrder]." (".$localContactAddonCost.") $_lang[OrderLocalContactHelp]
"; } if ($zone->privacy) { if ($zone->privacy == "person") { $privacyAddonTitle = ", ".$_lang[OrderrOnlyForPerson]; } if ($zone->privacy_cost) { $privacyAddonCost = round($zone->privacy_cost*CURK,2)." ".CURS."/".$_lang[OrderYear]; } else { $privacyAddonCost = $_lang[OrderFree]; } print " ".$_lang[OrderPrivacyOrder].$privacyAddonTitle." (".$privacyAddonCost.")
"; } if ($sertificateEnable) { print " ".$_lang[OrderCertOrder]." (".round($sertificateCost*CURK,2)." ".CURS.")
"; } if ($zone->licenseRequired == "yes" or ($zone->licenseRequired == "idn" and preg_match("/[а-яёЁїЇіІєЄӘәҒғҚқҢңӨөҮүҰұҺһ]+/u",$v))) { print "
* ".$_lang[OrderDomainTM].": "; } print "
"; print "

"; } } if ($step == 2 and $type == "shop") { if ($t->costtype == "month") { $itemCostTxtAddon = "/".$_lang[OrderSokraschenieMonth];} else if ($t->costtype == "year") { $itemCostTxtAddon = "/".$_lang[OrderSokraschenieGod];} else { $itemCostTxtAddon = " ".$_lang[OrderRazovo]; } print "$t->name (".round($t->cost*CURK,2)." ".CURS.$itemCostTxtAddon.")"; print ""; if ($t->costtype != "one") { print ""; print ""; print ""; } if ($t->type == "ispmanagerlite" or $t->type == "ispmanagerlitefull" or $t->type == "ispmanagerlitetrial" or $t->type == "ispmanagerpro" or $t->type == "ispmanagerprofull" or $t->type == "ispmanagerprotrial" or $t->type == "vdsmanagerlinux" or $t->type == "vdsmanagerlinuxfull" or $t->type == "vdsmanagerfreebsd" or $t->type == "vdsmanagerfreebsdfull" or $t->type == "billmanagerstandart" or $t->type == "billmanageradvanced" or $t->type == "billmanagercorporate" or $t->type == "dsmanager" or $t->type == "dsmanagerfull" or $t->type == "dnsmanagerfull" or $t->type == "ipmanagerfull") { print ""; print ""; print ""; print ""; print ""; } print "
* ".$_lang[OrderSrokZakaza].":
"; $r=@mysql_query("select * from shop_sroki where item='$item_id' and `order`='1' order by months"); if (@mysql_num_rows($r) > 0) { print ""; print ""; while ($rr = @mysql_fetch_object($r)) { if ($t->costtype == "month") {$sokrashenie = $_lang[OrderSokraschenieMonth]; $m = $rr->months;} else if ($t->costtype == "year") {$sokrashenie = $_lang[OrderSokraschenieGod]; $m = $rr->months / 12;} $cost = $t->cost*$m; $itogo=$cost-($cost/100)*$rr->discount; if ($rr->discount) {$discount="$rr->discount%";} else {$discount="$rr->discount%";} if ($months == $rr->months) {$monthCheck='checked';} else {$monthCheck='';} print ""; } print "
  ".$_lang[OrderSrokSmall]."  ".$_lang[OrderCostSmall]."  ".$_lang[OrderDiscountSmall]."  ".$_lang[OrderTotalSmall]."
months $monthCheck>  $m ".$sokrashenie."  ".round($cost*CURK,2)." ".CURS."  $discount  ".round($itogo*CURK,2)." ".CURS."
"; } else { print $_lang[OrderErrorNetSrokovZakaza]; } print "
* ".$_lang[OrderLisenseName].":
* ".$_lang[OrderLisenseIP].":

"; } if ($step == "2") { if (GetCouponActiveCount("promo") > 0) { print ""; print ""; print ""; print ""; print "
".$_lang[OrderPromoCode].":

"; } } if ($step == 3) { print "".$_lang[OrderYourOrder].""; print ""; print ""; print ""; print "
"; print ""; print ""; if ($domain_reg == "3") { $transfer = 1; $transferTxt = " (".$_lang[DomainTransferMin].")"; } else { $transfer = 0; $transferTxt = ""; } if ($type == "h") { if ($tarif_id) { print ""; } if ($domain_reg == "1" or $domain_reg == "3") { print ""; } if ($addons) { print ""; } } if ($type == "d") { print ""; } if ($type == "dopt") { $freedomains = @mb_split("\r\n",$freedomains); while (list($k,$v) = each($freedomains)) { print ""; } } if ($type == "shop") { if ($t->costtype == "month") { $shopTXT = $_lang[OrderPrefixNa]." $months ".$_lang[OrderSokraschenieMonth]; } else if ($t->costtype == "year") { $shopTXT = $_lang[OrderPrefixNa]." ".($months/12)." ".$_lang[OrderSokraschenieGod]; } else { $shopTXT = "";} if ($item_id) { print ""; } } print ""; if ($promocode) { if ($promoTotal > 0) { print ""; } } print "
  ".$_lang[OrderUsluga]."  ".$_lang[OrderSumma]."
  ".$_lang[OrderTarif]." $t->name ".$_lang[OrderPrefixNa]." $months ".$_lang[OrderSokraschenieMonth]."  ".round($host*CURK,2)." ".CURS."
  ".$_lang[OrderDomain]." $fulldomain$transferTxt ".$_lang[OrderPrefixNa]." ".($domainminsrok/12)." ".$_lang[OrderSokraschenieGod].""; if ($certOrder) { print " + ".$_lang[OrderCert]; } if ($privacyOrder) { print " + ".$_lang[OrderPrivacy]; } if ($localContactOrder) { print " + ".$_lang[OrderLocalContact]; } print "  ".round($dom*CURK,2)." ".CURS."
  ".$_lang[OrderAddons]." ($addonsToSaveText)  ".round($addonsCost*CURK,2)." ".CURS."
  ".$_lang[OrderDomain]." $fulldomain$transferTxt ".$_lang[OrderPrefixNa]." ".($domainMinSrok/12)." ".$_lang[OrderSokraschenieGod].""; if ($certOrder) { print " + ".$_lang[OrderCert]; } if ($privacyOrder) { print " + ".$_lang[OrderPrivacy]; } if ($localContactOrder) { print " + ".$_lang[OrderLocalContact]; } print "  ".round($domainCost*CURK,2)." ".CURS."
  ".$_lang[OrderDomain]." $v ".$_lang[OrderPrefixNa]." ".($domainMinSrokArr[$v]/12)." ".$_lang[OrderSokraschenieGod].""; if ($certOrder[$v]) { print " + ".$_lang[OrderCert]; } if ($privacyOrder[$v]) { print " + ".$_lang[OrderPrivacy]; } if ($localContactOrder[$v]) { print " + ".$_lang[OrderLocalContact]; } print "  ".round($domainCostArr[$v]*CURK,2)." ".CURS."
  ".$_lang[OrderItem]." $t->name $shopTXT  ".round($itemcost*CURK,2)." ".CURS."
".$_lang[OrderTotal].":   ".round(($allsumm)*CURK,2)." ".CURS."
  ".$_lang[OrderSkidkaByPromo].":  ".round($promoTotal*CURK,2)." ".CURS."
"; print "

"; print "".$_lang[OrderDopolnitelno].""; print ""; print ""; if (GetSetting("orderShowServerName") and ($vid == "vds" or $vid == "dedicated")) { print ""; print ""; } if (GetSetting("orderShowAdminPassword") and ($vid == "vds" or $vid == "dedicated")) { print ""; print ""; } if (GetSetting("orderShowRootPassword") and ($vid == "vds" or $vid == "dedicated")) { print ""; print ""; } if (GetSetting("orderShowSSHLogin") and ($vid == "ssh")) { print ""; print ""; } if (GetSetting("orderShowSSHPassword") and ($vid == "ssh")) { print ""; print ""; } if (GetSetting("orderShowPurposeOfUse") and ($vid == "vds" or $vid == "dedicated")) { print ""; print ""; } print ""; print ""; if ($needpersonalinfo) { $needpersonalinfourl = GetSetting("needpersonalinfourl"); $personalinfotxt = $_lang[OrderPrefixS]." ".$_lang[OrderPersonalInfo2]." ".$_lang[OrderPretenziyNeImeyu]; print ""; print ""; if ($personalinfo) {$personalCheck1="checked";} print ""; } if (GetSetting("captcha_reg")) { print ""; print ""; print ""; } print "
* ".$_lang[OrderServerName].":
* ".$_lang[OrderAdminPassword].":
".$_lang[OrderRootPassword].":
* ".$_lang[OrderSSHLogin].":
* ".$_lang[OrderSSHPassword].":
* ".$_lang[OrderPurposeOfUse].":
".$_lang[OrderComment].":
* $_lang[OrderPersonalInfo]:
$personalinfotxt
* ".$_lang[Captcha].":
".$_lang[CaptchaNeVidno]." ".$_lang[CaptchaObnovit]."

"; } if (!($type == "partner" and $_SESSION[userId])) { if (!$onclick) {$onclick = "onclick=\"if (this.form.subm.value == '1') {return false;} else {this.form.subm.value=1;}\"";} print ""; print ""; print ""; print "
"; if ($step > 1) { print ""; } print ""; if ($step < $steps) {$nexttitle=$_lang[Next];} else {$nexttitle=$_lang[OrderButtonOrder];} print "

"; print "* - ".$_lang[Required]; } else { print $_lang[OrderErrorAlreadyReged]; } print "
"; foot('utf-8'); mclose();