<?php
include($_SERVER['DOCUMENT_ROOT'] .'/script/HeaderInc.php');
//SiteLibs::GetVarDump($_SESSION);

//if ((true === isset($_SESSION['SessionAuth']['SvtAdmin']['reg']) && 1 == $_SESSION['SessionAuth']['SvtAdmin']['reg']) ||
//    (true === isset($_SESSION['SessionAuth']['SvtOperatorAdv']['reg']) && 1 == $_SESSION['SessionAuth']['SvtOperatorAdv']['reg']) ||
//    (true === isset($_SESSION['SessionAuth']['SvtOperator']['reg']) && 1 == $_SESSION['SessionAuth']['SvtOperator']['reg'])
//   ){

require_once ('Net/DNS.php');

$resolver = new Net_DNS_Resolver();
$resolver->nameservers = array(              // Set the IP addresses
                           '8.8.8.8',     // of the nameservers
                           '8.8.4.4'  // to query.
                           );
$response = $resolver->rawQuery('tut.by');
if ($response) {
  if (count($response->answer)) {
    SiteLibs::GetVarDump($response->answer);
//    foreach ($response->answer as $rr) {
//      $rr->display();
//    }
  }
}

  
//  require_once "Net/Ping.php";
//  $ping = Net_Ping::factory();
//  if(PEAR::isError($ping)) {
//    echo $ping->getMessage();
//  } else {
//    $ping->setArgs(array('count' => 5));
//    $Arr = $ping->ping('pear.php.net');
//    foreach ($Arr->_raw_data AS $k => $v){
//      $VarPagesTxt .= iconv('cp866', 'utf-8', $v) ."<br />";
//    }
//  }
//  $VarPagesTxt .=  "<hr />";
//  require_once "Net/Traceroute.php";
//  $traceroute = Net_Traceroute::factory();
//  if(PEAR::isError($traceroute)) {
//    echo $traceroute->getMessage();
//  } else {
//    $traceroute->setArgs(array('numeric' => NULL));
//    $Arr = $traceroute->traceroute('pear.php.net');
//    foreach ($Arr->_raw_data AS $k => $v){
//      $VarPagesTxt .= iconv('cp866', 'utf-8', $v) ."<br />";
//    }
//    //SiteLibs::GetVarDump();
//  }
  
  
  
//}
//else{
//  $smarty->assign('VarError', $MS_SP->Sp_LangMessage['error']['ErrAuthAccessDenied']);
//  $VarPagesTxt .= $smarty->fetch('AccessDenied.tpl');
//}

$smarty->assign('VarPagesTxt', @$VarPagesTxt);
if (true === isset($MS_SP->SP_CurrPage['template_file']) && '' != $MS_SP->SP_CurrPage['template_file']){
	$smarty->display($MS_SP->SP_CurrPage['template_file']);
}
else {
	$smarty->display('Page.tpl');
}
include($_SERVER['DOCUMENT_ROOT'] .'/script/FooterInc.php');
?>