<?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['pass_id']) && '' != $_GET['pass_id']){
    $ObjPassMod = new PassMod($MS_SP);
    $ArrPass = $ObjPassMod->GetFromDb('SqlAll', 'GetRow', "p.pass_id = '". $_GET['pass_id'] ."'");
    $ObjCryptMod = new CryptMod($MS_SP->Sp_DbConf['site']['SecretPassphrase']);
    $ArrPass['pass_pass'] = $ObjCryptMod->decrypt($ArrPass['pass_pass']);
    $smarty->assign('ArrPass', $ArrPass);
  }
  $VarReturn = $smarty->fetch('Pass/Form.tpl');
}
else{
  $VarReturn = $MS_SP->Sp_LangMessage['error']['ErrFuncAccessDenied'];
}
echo $VarReturn;
include($_SERVER['DOCUMENT_ROOT'] .'/script/FooterInc.php');
?>