Exemplo n.º 1
0
function is_debug()
{
    if (defined('IS_DEBUG') && IS_DEBUG === true || tellme('debug_mode') === true || tellme('debug_addr') !== false && in_array(REMOTE_ADDR, tellme('debug_addr'))) {
        return true;
    }
    return false;
    // end function
}
Exemplo n.º 2
0
 * DevCE - Developer Content Editor
 * PHP Template Engine
 *
 * @author Gino Dola <*****@*****.**>
 * @copyright 2014 Gino Dola
 *
 * This source file is protected by copyright favour of
 * Gino Dola. You have no right to copy, edit or publish
 * this file without a certain permission of the author.
 *
 * @version 1.0.0
 */
// -------------------------------------------------
// set timezone
// -------------------------------------------------
$timezone = tellme('timezone') !== false ? tellme('timezone') : 'Europe/Berlin';
date_default_timezone_set($timezone);
// --------------------------------------------------
// php configuration
// --------------------------------------------------
ini_set('register_globals', '0');
ini_set('magic_quotes_gpc', '0');
ini_set('magic_quotes_runtime', '0');
$set = is_debug() === true ? '1' : '0';
ini_set('display_errors', $set);
ini_set('display_startup_errors', $set);
ini_set('html_errors', $set);
ini_set('log_errors', '1');
ini_set('error_log', LOG_PATH . '/php-error.log');
ini_set('ignore_repeated_errors', '0');
// --------------------------------------------------
Exemplo n.º 3
0
 private function initCache()
 {
     // initialized cache, set lifetime
     $lifetime = tellme('cache_lifetime') !== false ? tellme('cache_lifetime') : 10800;
     $this->__Cache->init(RESOURCE_PATH . '/cache', $lifetime);
     // end function
 }
Exemplo n.º 4
0
 public function transform()
 {
     $lang = array();
     $clang = $this->__Cookie->get('langcode');
     $langcode = is_string($clang) && !empty($clang) ? $clang : tellme('langcode', 'DE');
     $langfile = RESOURCE_PATH . '/data/lang/lang-' . $langcode . '.ini';
     if (file_exists($langfile)) {
         $lang = parse_ini_file($langfile);
     }
     $tokens = array_merge($this->vars, $lang);
     foreach ($tokens as $var => $val) {
         $this->__Template = str_replace('{' . $var . '}', $val, $this->__Template);
     }
     return trim($this->__Template);
     // end function
 }