conf = new MConfigLoader();
$MIOLO->conf->LoadConf();
$urlContext = $MIOLO->conf->getConf('home.url') . '/' .
$MIOLO->conf->getConf('options.dispatch') ."?module=$module&action=$action";
$MIOLO->context = new MContext($urlContext, 0, false);
$MIOLO->manager = $MIOLO;
$MIOLO->context->isFile = true;
require_once '../classes/support.inc';
$MIOLO->init();
// $MIOLO->setConf('options.dispatch', 'autocomplete.php');
$MIOLO->context->setStyle( 0 );
//$MIOLO->history = new MHistory($MIOLO);
//$MIOLO->handler();
$MIOLO->setConf('options.dispatch', 'autocomplete.php');
//include_once('history.class');
$session = $MIOLO->session;
$session->start( );
//$MIOLO->history = new MHistory($MIOLO);
$modulePath = $MIOLO->conf->getConf('home.modules'). "/$module";
$ok = require_once( $modulePath . '/db/lookup.class' );
//$ok = $MIOLO->Uses('/db/lookup.class',$module);
$MIOLO->Assert($ok,_M('File modules/@1/db/lookup.class not found.
'.
'This file must implement the Business@1Lookup class '.
'containing the Lookup@2 method.',
'miolo',$module, $item));
eval("\$object = new Business{$module}Lookup();");
//$context = new MContext();
//echo "autoComplete$item";
$autoCompleteObj = new MAutoComplete($module,$item, $value,$related);
//var_dump($autoCompleteObj);
eval("\$rs = \$object->autoComplete$item(\$autoCompleteObj);");
$info = $autoCompleteObj->getResult();
$info_ = '';
if ( ($info) && ( $info != '' ) )
{
foreach( $info as $i )
{
$info_ .= "$i|";
}
}
// if no $info found, should we show an alert?
elseif ( MUtil::getBooleanValue( $MIOLO->conf->getConf('options.autocomplete_alert') ) == true )
{
$info_ = 'nothing_found_';
}
$info_ = substr($info_, 0, -1);
//if( MUtil::getBooleanValue($MIOLO->getConf('options.debug')) && $MIOLO->getConf('logs.handler') == 'screen' )
//{
// $msg = _M("[autocomplete]: Field @1 not found!
", $this->baseModule);
//}
echo $info_;
//var_dump( $autoCompleteObj->getResult() );
?>