* * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ /* * Não é necessário */ function mobileExecMethod($method, $functionparams = '_UNDEF_', $loglevel = 3, $classparams = '_UNDEF_'){ } function CreateObject($class, $p1='_UNDEF_',$p2='_UNDEF_',$p3='_UNDEF_',$p4='_UNDEF_', $p5='_UNDEF_',$p6='_UNDEF_',$p7='_UNDEF_',$p8='_UNDEF_', $p9='_UNDEF_',$p10='_UNDEF_',$p11='_UNDEF_',$p12='_UNDEF_', $p13='_UNDEF_',$p14='_UNDEF_',$p15='_UNDEF_',$p16='_UNDEF_') { global $phpgw_info, $phpgw; /* if(is_object(@$GLOBALS['phpgw']->log) && $class != 'phpgwapi.error' && $class != 'phpgwapi.errorlog') { $GLOBALS['phpgw']->log->write(array('text'=>'D-Debug, dbg: %1','p1'=>'This class was run: '.$class,'file'=>__FILE__,'line'=>__LINE__)); } */ /* error_reporting(0); */ list($appname,$classname) = explode('.', $class); $filename = PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php'; $included_files = get_included_files(); if(!isset($included_files[$filename])) { if(@file_exists($filename)) { include_once($filename); $is_included = True; } else { $is_included = False; } } else { $is_included = True; } if($is_included) { if($p1 == '_UNDEF_' && $p1 != 1) { $obj = new $classname; } else { $input = array($p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15,$p16); $i = 1; $code = '$obj = new ' . $classname . '('; foreach($input as $test) { if(($test == '_UNDEF_' && $test != 1 ) || $i == 17) { break; } else { $code .= '$p' . $i . ','; } $i++; } $code = substr($code,0,-1) . ');'; eval($code); } /* error_reporting(E_ERROR | E_WARNING | E_PARSE); */ return $obj; } } ?>