<?php
session_start();
$currentBaseDir = dirname($_SERVER['PHP_SELF']);
include($_SESSION['basedir']."core.php");

$svaTool = new svaTool();

if (isset($_GET['term'])){
    $return_arr = array();

    $res = $dba->getAutocompleteCompany( $_GET['term']);

		for ($i = 0; $i < count($res); $i++) {
			
		  $return_arr[] =  $res[$i]['company_name_v']."[".$res[$i]['company_id_n']."]";
			
		}

    /* Toss back results as json encoded array. */
    echo json_encode($return_arr);
}


?>