<?php
include($_SERVER['DOCUMENT_ROOT'] .'/script/HeaderInc.php');
if('XMLHttpRequest' == $_SERVER['HTTP_X_REQUESTED_WITH'] && true === isset($_SESSION['SessionAuth']['id']) && 0 < $_SESSION['SessionAuth']['id']) {
  if(true === isset($_GET['po_id']) && '' != $_GET['po_id']){
    $ObjPoMod = new PoMod($MS_SP);
    $ArrPo = $ObjPoMod->GetFromDb('SqlAll', 'GetRow', "a.po_id = '". $_GET['po_id'] ."'");
    $smarty->assign('ArrPo', $ArrPo);
    
    $ObjPoLicenceMod = new PoLicenceMod($MS_SP);
    $ArrPoLicence = $ObjPoLicenceMod->GetFromDb('SqlAll', 'GetAll', "a.po_id = '". $_GET['po_id'] ."'", "a.policence_datee DESC");
    $smarty->assign('ArrPoLicence', $ArrPoLicence);
  }
  $VarReturn = $smarty->fetch('Po/PoInformationDetail.tpl');
}
else{
  $VarReturn = $MS_SP->Sp_LangMessage['error']['ErrFuncAccessDenied'];
}
echo $VarReturn;
include($_SERVER['DOCUMENT_ROOT'] .'/script/FooterInc.php');
?>