. */ include("../include/include-sub.php"); require_once("../../oms/include/classes/ImportLayout.php"); $layout = new ImportLayout(Access::ANONYMOUS, "./"); $layout->init(); $layout->echoln("

Config tester for JC Module

"); if( function_exists("ldap_connect") ) { $layout->info("You have support for LDAP in PHP."); }else { $layout->error("You don't have support for LDAP in PHP."); } $projects = array("core"=>"", "JC"=>"JC"); foreach ($projects as $project=>$path){ if( ($fp = @fopen(ROOTPATH."/".$path."/config.php.tmpl", "r"))!==false ) { $error = false; while( ($line = fgets($fp, 4096)) !== false ) { if( preg_match("/define\(\"([A-Z0-9_]+)\"/", $line, $matches) ) { if( !defined($matches[1]) ) { $layout->error("Missing config option of ".$project." project: ".$matches[1]); $error = true; } } } fclose($fp); $layout->info("Config file of ".$project." project checked successfully, the file did ".($error?"":"not ")."contain errors."); }else { $layout->error("Failed opening template config file of ".$project." project."); } } $layout->page_footer(); ?>