static function getAll()
    {
        if (empty(self::$templ)) {
            $mas = db::q('SELECT *, t_id id FROM <<template>>
	        			  WHERE t_lang_id = "' . languages::curId() . '" and
	        					t_domain_id = "' . domains::curId() . '";', records);
            self::$templ = array();
            while (list($key, $templ) = each($mas)) {
                self::$templ[$templ['t_id']] = $templ;
                self::$templ_rel[$templ['t_file']] = $templ['t_id'];
            }
        }
        return self::$templ;
    }