<?php
include($_SERVER['DOCUMENT_ROOT'] .'/script/HeaderInc.php');
if('XMLHttpRequest' == $_SERVER['HTTP_X_REQUESTED_WITH'] && 
  true === isset($_SESSION['SessionAuth']['IpsAdmin']['reg']) && 1 == $_SESSION['SessionAuth']['IpsAdmin']['reg']){
  if(true === isset($_GET['country_id']) && true === is_numeric($_GET['country_id'])){
    require_once($_SERVER['DOCUMENT_ROOT'] .'/script/Country.mod.php');
    $ObjCountryMod = new CountryMod($MS_SP);
    $ArrCountry = $ObjCountryMod->GetFromDb('SqlAll', 'GetRow', "a.country_id = '". $_GET['country_id'] ."'");
    $smarty->assign('ArrCountry', $ArrCountry);
  }
  $VarReturn = $smarty->fetch('Country/Form.tpl');
}
else{
  $VarReturn = $MS_SP->Sp_LangMessage['error']['ErrFuncAccessDenied'];
}
echo $VarReturn;
include($_SERVER['DOCUMENT_ROOT'] .'/script/FooterInc.php');
?>