Subversion-Projekte lars-tiefland.php_share

Revision

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

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
    require_once ( "smarty/libs/Smarty.class.php" );
3
    class Weban_Smarty extends Smarty
4
    {
5
        public function __construct()
6
        {
7
            if ( !isset( $_SESSION["smarty_debug"] ) )
8
            {
9
                $_SESSION["smarty_debug"] = false;
10
            }
11
            parent::__construct();
12
            $this->plugins_dir = array( SMARTY_PLUGINS_DIR,
3 lars 13
                "/usr/share/php/smarty_plugins/weban" );
1 lars 14
            if ( ( $_SERVER["REMOTE_ADDR"] == "89.245.130.99" || $_SERVER["PHP_AUTH_USER"] ==
15
                "admin" || preg_match( "/192\.168\.0/", $_SERVER["REMOTE_ADDR"] ) ) &&
16
                $_SESSION["smarty_debug"] === true )
17
            {
18
                $this->caching = false;
19
            }
20
        }
21
    }
22
?>