<?php
include_once('c_docs_pdf.php') ;
class c_page_cab_docs_pdf_sign	 extends c_page_cab_docs_pdf
{
 public $h1='Подпись документа' ;
 public $rec_doc=array();
 public $use_cryptopro=1;
 public $show_panel_cryptopro_status=1;

 function check_access()  { return(1) ;}

 function _second_menu_config()
  { //if ($this->rec_doc['pkey']) $this->second_menu['/cab/mo/'.$this->rec_mo['pkey'].'/sign_doc/[doc_id='.$this->filter['doc_id'].']/']=$this->rec_doc['obj_name'].' - ПОДПИСЬ' ;
  }

  function block_main()
  { if ($GLOBALS['LS_evulate_ECP'] or MEMBER()->info['evulate_ECP'])
    { ?><div class="green center"><strong>Включен режим эмуляции использования ЭЦП</strong></div>
        <br>
        <div class=center>
        <button class="v2" cmd="ecp/emulate_sign_doc" doc_id="<?echo $this->rec_doc['pkey']?>" sert_id="<? echo MEMBER()->info['sert_id']?>" after_sign_doc_go_url="/cab/docs/pdf/<?echo $this->rec_doc['pkey']?>/">Подписать документ</button></div>
      <?
    }
    else
  {
      $this->page_title();
      \cab\ext\cryptopro\i_cryptopro_sign::panel_sign(MEMBER()->id,$this->sign_uid,['doc_id'=>$this->rec_doc['pkey']]);
  }
}
}



?>
