$moduleFiles = GetFilesInDirectory( "core/modules/payment", "php" ); break; case SMSMAIL_MODULE: $IncludeDir = "core/modules/smsmail"; break; } foreach( $moduleFiles as $fileName ) { $className = GetClassName( $fileName ); if(!$className) continue; if(!class_exists($className))require_once($fileName); eval( '$objectModule = new '.$className.'();' ); if ( $objectModule->get_id() == $_ID && $objectModule->title==$ModuleConfig['module_name']) return $objectModule; else $objectModule = null; } } return $objectModule; } ?>