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

    function select_obj_info()
     {  parent::select_obj_info() ;
        if ($this->filter['doc_id'])
        { $this->rec_doc=DOCS()->get_doc_by_id($this->filter['doc_id']) ;
          $this->rec_doc['__href']="/cab/mo/".$this->rec_mo['pkey']."/doc/[doc_id=".$this->rec_doc['pkey']."]/" ;
          $this->rec_doc['__href_cab']="/cab/mo/".$this->rec_mo['pkey']."/doc/[doc_id=".$this->rec_doc['pkey']."]/" ;
          $this->rec_doc['__href_window']="/window/mo/".$this->rec_mo['pkey']."/doc/[doc_id=".$this->rec_doc['pkey']."]/" ;
        }
     }

 function second_menu_config()
  { parent::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()
  {
    $this->page_title();
    \cab\ext\cryptopro\i_cryptopro_sign::panel_sign(MEMBER()->id,$this->sign_uid,['rec_doc'=>$this->rec_doc]);
  }

}



?>
