예제 #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;
 }
예제 #2
0
 /**
  * Return HTML <a> code for an e-mail address
  *
  * @param string $email e-mail address
  * @param string $name name of the link (showed text)
  * @return string HTML code
  */
 function getEmailHTML($email, $name = '')
 {
     $_CL_Xety = CL_Xety::getInstance();
     if (!$name) {
         $name = $email;
     }
     $layout = new CL_Templates('##base.tpl', 'EMAIL');
     $layout->set(array('email' => $_CL_Xety->plain($email), 'email-name' => $_CL_Xety->plain($name)));
     return $layout->getContent();
 }
예제 #3
0
파일: init.php 프로젝트: renekliment/CLE
<?php

/**
 * @package CLE
 * @subpackage SysFiles
 * @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.
 */
$_CL_Xety = $GLOBALS['_CL_Xety'] = CL_Xety::getInstance();
$_CL = $GLOBALS['_CL'];
/* And set default language (if not set other) */
if (!isset($_SESSION['language']) or empty($_SESSION['language'])) {
    $_SESSION['language'] = (string) CL::getConf('main/default_language');
}
if (isset($_SESSION['_sessionSetMessageBuffer']) and $_SESSION['_sessionSetMessageBuffer']) {
    $_CL->setMessage($_SESSION['_sessionSetMessageBuffer']);
    unset($_SESSION['_sessionSetMessageBuffer']);
}
if (isset($GLOBALS['_setMessageBuffer']) and $GLOBALS['_setMessageBuffer']) {
    $_CL->setMessage(constant($GLOBALS['_setMessageBuffer']));
}
/* Let's load default layout */
CL_Templates::setDirectory(CL::getConf('CL_Templates/dir_default'));
if (@(!defined(CLE_DONT_LOAD_LAYOUT))) {
    $_CL_Templates = $GLOBALS['_CL_Templates'] = CL_Templates::getInstance();
}