Beispiel #1
0
 /**
  * Function to get the instance of the class
  *
  * @return object instance of this class
  */
 public static function getInstance()
 {
     if (self::$instance === NULL) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Beispiel #2
0
<?php

/**
 * @package CLE-Modules
 * @subpackage simpleStatic
 * @author Rene Kliment <*****@*****.**>
 * @version 1.1
 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License - Version 3, 19 November 2007
 *
 * This software is dual-licensed - it is also available under a commercial license,
 * so there's possibility to use this software or its parts in software which is not license-compatible.
 * For more information about licensing, contact the author.
 */
if (isset($_stringId) and $_stringId) {
    $dir = 'data/simpleStatic/';
    $urlArray = CL_SEO::getInstance()->URLArray;
    $h = dir($dir);
    while (false !== ($file = $h->read())) {
        if ($_stringId . '.html' == $file) {
            $navString = CL::getConf('simpleStatic/' . $_stringId) ? CL::getConf('simpleStatic/' . $_stringId) : $_stringId;
            $_CL->setNavigation($navString);
            $_CL_Templates->set(array('' => file_get_contents($dir . $_stringId . '.html'), 'simpleStatic-title' => $navString));
        }
    }
}
Beispiel #3
0
                (if you do not wish to automatically start DB connection, you can as well deactivate it).
            <br /><br />
            If you do not wish CLE to terminate script execution on DB connection error,<br />
                you can set that in configuration file as well.
            <br /><br />
        ');
    }
}
/* Autoload of classes */
function __autoload($class)
{
    global $_autoloadArray;
    if (in_array($class, array_keys($_autoloadArray))) {
        require_once $_autoloadArray[$class];
    }
}
/* Let's find out, what we will include and get some $_id stuff, if available */
$_fileToInclude = CL_SEO::getInstance()->getFileToInclude() . '.php';
/* Let's fire up modules */
$_CLE_Modules = CLE_Modules::getInstance();
/* Let's load some page! */
require_once $_fileToInclude;
/*
 * If "normal page" is requested
 * (not just some file-sending page)
 * It sets some variables and echoes the whole HTML code
 * (viz that file)
 */
if (@(!defined(CLE_DONT_LOAD_LAYOUT))) {
    require_once './sys/page.php';
}