//--Classes Setup // $classDir = cmsROOT . 'core/classes/'; $libDir = cmsROOT . 'core/lib/'; $classes = array(); //load in outside classes $classFiles = array($classDir . 'base.core.php', $classDir . 'base.sql.php', $classDir . 'class.pagination.php', $libDir . 'phpass/class.phpass.php', $libDir . 'geshi/class.geshi.php', $libDir . 'nbbc/class.nbbc.php'); foreach ($classFiles as $file) { $file = $file; if (!is_file($file) || !is_readable($file)) { msgDie('FAIL', sprintf($errorTPL, 'Fatal Error - 404', 'We have been unable to locate/read the ' . $file . ' file.')); } else { require_once $file; } } $objCore = new coreClass(); //cache setup $cachePath = cmsROOT . 'cache/'; if (is_dir($cachePath) && !is_writable($cachePath)) { @chmod($cachePath, 0775); } if (!is_writable($cachePath)) { msgDie('FAIL', sprintf($errorTPL, 'Fatal Error', 'Could not set CHMOD permissions on "<i>cache/</i>" set to 775 to continue.')); } $cacheWritable = is_writable($cachePath) ? true : false; //try and load in the sql driver $file = $classDir . 'driver.' . $config['db']['driver'] . '.php'; if (is_file($file) && is_readable($file)) { $classes['objSQL'] = array($file, $config['db']); } //
//--Classes Setup // $classDir = cmsROOT . 'core/classes/'; $libDir = cmsROOT . 'core/lib/'; $classes = array(); //load in outside classes $classFiles = array($classDir . 'base.core.php', $classDir . 'base.sql.php', $classDir . 'driver.mysql.php', $libDir . 'phpass/class.phpass.php', $libDir . 'geshi/class.geshi.php', $libDir . 'nbbc/class.nbbc.php'); foreach ($classFiles as $file) { $file = $file; if (!is_file($file) || !is_readable($file)) { msgDie('FAIL', sprintf($errorTPL, 'Fatal Error - 404', 'We have been unable to locate/read the ' . $file . ' file.')); } else { require_once $file; } } $objCore = new coreClass(); //cache setup $cachePath = cmsROOT . 'cache/'; if (is_dir($cachePath) && !is_writable($cachePath)) { @chmod($cachePath, 0775); } if (!is_writable($cachePath)) { msgDie('FAIL', sprintf($errorTPL, 'Fatal Error', 'Could not set CHMOD permissions on "<i>cache/</i>" set to 775 to continue.')); } $cacheWritable = is_writable($cachePath) ? true : false; // //--Define new instances of the included classes // $classes['objCache'] = array($classDir . 'class.cache.php', array('useCache' => $cacheWritable, 'cacheDir' => $cachePath)); $classes['objLogin'] = array($classDir . 'class.login.php'); $classes['objUser'] = array($classDir . 'class.user.php');