Subversion-Projekte lars-tiefland.php_share

Revision

Revision 1 | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php
    require_once ( "smarty/libs/Smarty.class.php" );
    class Weban_Smarty extends Smarty
    {
        public function __construct()
        {
            if ( !isset( $_SESSION["smarty_debug"] ) )
            {
                $_SESSION["smarty_debug"] = false;
            }
            parent::__construct();
            $this->plugins_dir = array( SMARTY_PLUGINS_DIR,
                "/usr/share/php/smarty_plugins/weban" );
            if ( ( $_SERVER["REMOTE_ADDR"] == "89.245.130.99" || $_SERVER["PHP_AUTH_USER"] ==
                "admin" || preg_match( "/192\.168\.0/", $_SERVER["REMOTE_ADDR"] ) ) &&
                $_SESSION["smarty_debug"] === true )
            {
                $this->caching = false;
            }
        }
    }
?>