core/api/modules/crm_comments/class.php

24 lines
713 B
PHP
Raw Normal View History

2022-12-11 13:55:49 +05:00
<?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;
}
}
?>