Пример #1
0
function opportunity_by_search($name, $where = '', $msi_id = '0')
{
    $seed = new Opportunity();
    if (!$seed->ACLAccess('ListView')) {
        return array();
    }
    if ($where == '') {
        $where = $seed->build_generic_where_clause($name);
    }
    $response = $seed->get_list("name", $where, 0);
    $list = $response['list'];
    $output_list = array();
    // create a return array of names and email addresses.
    foreach ($list as $value) {
        $output_list[] = get_opportunity_array($value, $msi_id);
    }
    return $output_list;
}