<?php
include_once(_DIR_EXT.'/HTML/c_page_TXT.php') ;
class c_services_faceid_photos extends c_page_txt
{
  function body()
  {
  	$recs=execSQL('select t1.pkey as id,t1.parent,t2.propusk,t2.obj_name 
				   from obj_site_personals_image t1
				   left join obj_site_personals t2 on t2.pkey=t1.parent
				   where t1.indx=1 and t1.faceimg=1
				   order by t1.parent') ;
 	$arr=array() ;
 	if (_sizeof($recs)) foreach($recs as $rec_img) $arr['data'][]=array(
		    'id'=>$rec_img['propusk'],
 			'url'=>_PATH_TO_SITE.'/services/faceid/photo/'.$rec_img['id'].'/',
 			'name'=>$rec_img['obj_name'],
		    );
 	echo json_encode($arr, JSON_UNESCAPED_UNICODE) ;
  }



}



?>
