core/api/modules/crm_comments/class.php

24 lines
713 B
PHP

<?php
class main extends MySQL{
/* ----------------------------------------------------------------------
13.06.2022
Получаем список коментов
---------------------------------------------------------------------- */
function get_comments($id){
$a['crm_id'] = $id;
$comments = $this -> get_massiv( 'crm_comments', $a );
$num = count( $comments );
for ( $i=0; $i < $num; $i++ ){
unset( $a );
$a['id']=$comments[$i]['user_id'];
$json=$this->get_val('users', $a, 'json');
unset( $a );
$a = $this -> from_j( $json );
$comments[$i]['fio'] = $a['kontaktnoe_lico'];
}
return $comments;
}
}
?>