<?

function stamp_by_mo($mo_id)
{
	include(_DIR_EXT.'/image_print/i_image_print.php') ;
	  $rec_mo=ESMO()->get_mo_by_id($mo_id) ;
	  $IM = new image_print_MO_sertificate_stamp($rec_mo) ;
	  $img_cont=$IM->get_image_content() ;

	  ?><img alt="" src="data:image/jpeg;base64,<?echo base64_encode($img_cont)?>"  alt=""><?
	  $fname='/temp/'.rand(1,10000).'.jpg' ;
	  file_put_contents(_DIR_TO_ROOT.$fname,$img_cont) ;
	  ?><br><br><a href="<?echo $fname?>" target="_blank"><? echo $fname ?></a><br><br><br><?
}
?>