<?
// путевой лист
function napravlenie($options=array())
{   global $aspmo_system,$member ;
    include_once(_DIR_TO_ENGINE.'/admin/i_img_working.php') ;
    list($source,$type) = open_image(_DIR_EXT.'/aspmo_reports/napravlenie.jpg') ;

    $personal_rec=PERSONAL()->get_personal_by_id($_GET['id']) ;
    $mo_rec=ESMO()->get_mo_by_id($_GET['mo_id']) ;

    imagefttext($source,13,0,306,632,hexdec(0),_DIR_TO_ROOT.'/docs/DejaVuSerif.ttf',$personal_rec['obj_name']) ;
    imagefttext($source,13,0,227,649,hexdec(0),_DIR_TO_ROOT.'/docs/DejaVuSerif.ttf',$personal_rec['dr']) ;
    imagefttext($source,13,0,406,667,hexdec(0),_DIR_TO_ROOT.'/docs/DejaVuSerif.ttf',$personal_rec['adres']) ;
    imagefttext($source,13,0,317,682,hexdec(0),_DIR_TO_ROOT.'/docs/DejaVuSerif.ttf',$personal_rec['_org_name'].', '.$personal_rec['_otdel_name'].', '.$personal_rec['_work_name']) ;
    imagefttext($source,13,0,560,832,hexdec(0),_DIR_TO_ROOT.'/docs/DejaVuSerif.ttf',$member->working) ;
    imagefttext($source,13,0,120,851,hexdec(0),_DIR_TO_ROOT.'/docs/DejaVuSerif.ttf',$member->name) ;
    imagefttext($source,13,0,315,745,hexdec(0),_DIR_TO_ROOT.'/docs/DejaVuSerif.ttf',strip_tags($mo_rec['_comment'])) ;

    if (!$_GET['check']) put_image($source,$type,array()) ;

    ImageDestroy($source);

    return(array())  ;
}

?>