function __autoload($class_name) {
if(preg_match('/^(\w+)ServerModule$/', $class_name, $servs)){
if($servs[1] == ''){
$libm = iHOMEDIR.'lib/api/class.'.$class_name.'.php';
} else {
$libm = SYSTEM_PATH.'/servermodules/'.$servs[1].'.php';
}
} elseif(preg_match('/^(\w+)notifymodule/', $class_name, $servs)){
$libm = SYSTEM_PATH.'/notifymodules/'.$servs[1].'.php';
} elseif(preg_match('/^(\w+)curprovider/', $class_name, $servs)) {
$libm = SYSTEM_PATH.'/curmodules/'.$servs[1].'.php';
} elseif(preg_match('/^(\w+)PaymentGateway/', $class_name, $servs)){
$libm = SYSTEM_PATH.'/paymodules/'.$servs[1].'.php';
} else {
$libm = SYSTEM_PATH.'/classes/class.'.$class_name.'.php';
}
if(!file_exists($libm)){
trigger_error("can't find $libm", E_USER_ERROR); <--113 строка
}
require($libm);
}