Показать сообщение отдельно
  #28 (permalink)  
Старый 08.12.2015, 11:32
Аспирант
Отправить личное сообщение для olegalimov Посмотреть профиль Найти все сообщения от olegalimov
 
Регистрация: 27.09.2015
Сообщений: 94

написал но наверняка не правильно.
<?
if($domain = trim($_GET["domain"]))
$domain==null
 {
 alert ("Нет указан домен!");
 return;
 }
if ($domain=='')
 {
 alert ("Нет указан домен!");
 return;
 }
var domain = document.getElementById('domain').value;
var ext = document.getElementById('ext').value;
var domname = domain + ext;
var url="whois.php?domain="+domname;
url=url+"&sid="+Math.random();
xmlHttps.onreadystatechange = function stateChanged()
{
if (xmlHttps.readyState==4 || xmlHttps.readyState=="complete")
 {
 document.getElementById("txtHint").innerHTML=xmlHttps.responseText;
 }
 else
 {
 document.getElementById("txtHint").innerHTML='<div id="txtHint"><div class="dt-sc-info-box"><p>Загрузка информации ...</p></div></div>';
 
 }
}
xmlHttps.open("GET",url,true);
xmlHttps.send(null); 
  })
 
function GetXmlHttpObject()
{
var xmlHttps=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttps=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttps=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttps=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttps;
}

set_time_limit(0);
require_once("whois.php");
?>
<!DOCTYPE html>
<head>
	<title></title>
	<meta charset="utf-8">
	
	<style>
	.modalDialog {
		position: fixed;
		font-family: Arial, Helvetica, sans-serif;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		background: rgba(0,0,0,0.8);
		z-index: 99999;
		-webkit-transition: opacity 400ms ease-in;
		-moz-transition: opacity 400ms ease-in;
		transition: opacity 400ms ease-in;
		display: none;
		pointer-events: none;
	}

	.modalDialog:target {
		display: block;
		pointer-events: auto;
	}

	.modalDialog > div {
		width: 400px;
		position: relative;
		margin: 10% auto;
		padding: 5px 20px 13px 20px;
		border-radius: 10px;
		background: #fff;
		background: -moz-linear-gradient(#fff, #999);
		background: -webkit-linear-gradient(#fff, #999);
		background: -o-linear-gradient(#fff, #999);
	}

	.close {
		background: #606061;
		color: #FFFFFF;
		line-height: 25px;
		position: absolute;
		right: -12px;
		text-align: center;
		top: -10px;
		width: 24px;
		text-decoration: none;
		font-weight: bold;
		-webkit-border-radius: 12px;
		-moz-border-radius: 12px;
		border-radius: 12px;
		-moz-box-shadow: 1px 1px 3px #000;
		-webkit-box-shadow: 1px 1px 3px #000;
		box-shadow: 1px 1px 3px #000;
	}

	.close:hover { background: #00d9ff; }
	</style>
</head>

<body>
<table>
<tr>

<div class="dom-fon">
<form class="form" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="domain" id="domain">
<table>
<tr>
<td class ="table_name">Введите имя домена:</td>
<td><input class="name-dom" style="height:38px" name="domain" type="text" /></td>

<td><input class="button-test" onclick="location.href='#openModal'" type="submit" value="Проверить"></td>
 
<div id="openModal" class="modalDialog">
	<div>
		<a href="#close" title="Закрыть" class="close">X</a>
<p>
		<?
if(isset($_GET["domain"]) && isset($_GET["TLD"]) && is_array($_GET["TLD"]))
{
$target=$_GET["domain"];
$whois=new whois();
foreach($_GET['TLD'] AS $tldz)
{
echo($target.$tldz." - ");
$whois->zonelookup($target.$tldz);
if($whois->ERROR==0)
{
if(is_array($whois->RAWINFO) && count($whois->RAWINFO)>7 && $whois->FOUND==1)
{
echo("занят,") ;

}else
{
echo("свободен,");
}
}else
{
echo("ошибка запроса");
}
echo('<br style="display:inline">');
}
}
?>
</p>
    </div>
</div>
</tr>
</table>
<table>
<tr>
<td class ="table_butt-1"><input type="button" onClick="sel('checked')" value="Выбрать все" /></td>
<td class ="table_butt-2"><input type="button" onClick="sel()" value="Снять все" /></td>
<td><input type="button" value="Заказать домен" class="button-domain" onClick="window.open('http://panel.webvm.ru/OFFERTA/offerta_add_select_type.khtml','_blank')" /></td>
</tr>
</table>
<table class="prise-domain-teble">
<tr class ="table_string">
<td class ="table_cell-1">
<p class="zone-dom"><input type="checkbox" name="TLD[]" value=".ru" id="ext"><label for="11">.ru</label></p>
<p class="price-yer">Цена 1 год <br /> 90 Р</p>
<p class="price-too">Продление на год 90 Р<br></p></td>
<td class ="table_cell-2">
<p class="zone-dom"><input type="checkbox" name="TLD[]" value=".рф" id="ext"><label for="12">.рф</label></p>
<p class="price-yer">Цена 1 год 100 Р</p>
<p class="price-too">Продление на год 100 Р<br></p></td>
<td class ="table_cell-3">
<p class="zone-dom"><input type="checkbox" name="TLD[]" value=".москва" id="ext"><label for="13">.москва</label></p>
<p class="price-yer">Цена 1 год 385 Р</p>
<p class="price-too">Продление на год 385 Р<br></p></td>
<td class ="table_cell-4">
<p class="zone-dom"><input type="checkbox" name="TLD[]" value=".moscow" id="ext"><label for="14">.moscow</label></p>
<p class="price-yer">Цена 1 год 385 Р</p>
<p class="price-too">Продление на год 385 Р<br></p></td>
<td class ="table_cell-5">
<p class="zone-dom"><input type="checkbox" name="TLD[]" value=".su" id="ext"><label for="15">.su</label></p>
<p class="price-yer">Цена 1 год 390 Р</p>
<p class="price-too">Продление на год 390 Р<br></p></td>
<td class ="table_cell-6">
<p class="zone-dom"><input type="checkbox" name="TLD[]" value=".net" id="ext"><label for="16">.net</label></p>
<p class="price-yer">Цена 1 год 895 Р</p>
<p class="price-too">Продление на год 995 Р<br></p></td>
<td class ="table_cell-7">
<p class="zone-dom"><input type="checkbox" name="TLD[]" value=".name" id="ext"><label for="17">.name</label></p>
<p class="price-yer">Цена 1 год 795 Р</p>
<p class="price-too">Продление на год 895 Р<br></p></td>
<td class ="table_cell-8">
<p class="zone-dom"><input type="checkbox" name="TLD[]" value=".kz" id="ext"><label for="18">.kz</label></p>
<p class="price-yer">Цена 1 год 600 Р</p>
<p class="price-too">Продление на год 600 Р<br></p></td>
</tr>
</table>
</form>
<script>
function sel(opt) {
var checks = document.getElementById('domain').getElementsByTagName('input');
for (var i = 0; i < checks.length; i++) {
var check = checks[i];
check.checked = opt;
}
}
</script>
</div>
</body>
</html>
</body>
</html>

Последний раз редактировалось olegalimov, 08.12.2015 в 13:25.
Ответить с цитированием