$number) $arr[] = $number[0]; $q_numbers = myImplode('`src` LIKE \'%','\'',' OR ',$arr).' OR '.myImplode(' `dst` LIKE \'%','\'',' OR ',$arr).' OR '.myImplode(' `dcontext` LIKE \'%','%\'',' OR ',$arr); $query = "SELECT `disposition`, `calldate`, `src`, `dst`, `duration`, `billsec`, `id`, `note`, `dcontext`, `dstchannel` FROM `cdr` WHERE ($q_numbers) AND `deleted`='0'"; $calls_ = array(); $call = new EcmCall(); $result = $GLOBALS['db']->query($query); if($result) { while($row = $GLOBALS['db']->fetchByAssoc($result)) { $calls_[] = $call->processCall($row); } } global $odd_bg, $even_bg, $hilite_bg; $json = getJSONobj(); $calls = array( 'positions' => $calls_, 'colors' => array( 'even_bg' => $even_bg, 'hilite_bg' => $hilite_bg, 'odd_bg' => $odd_bg ), ); echo '['.$json->encode($calls).']'; } } ?>