X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=blobdiff_plain;f=dwt.php;h=44e0a630c6c6985568a6904e2849575765bebaed;hp=d3477534fa964fe605732647be5b48b148c1ce4d;hb=9a3136a5bee66e1055ffb566373952b6054dd7bf;hpb=883f464e943d1588c0c4227d7f6e69dedb7b6a21 diff --git a/dwt.php b/dwt.php index d347753..44e0a63 100644 --- a/dwt.php +++ b/dwt.php @@ -2,23 +2,20 @@ # Copyright (C) 2007 Jason Woofenden # -# This file is part of wfpl. -# -# wfpl is free software; you can redistribute it and/or modify it under the -# terms of the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 2.1 of the License, or (at your option) -# any later version. -# -# wfpl is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -# more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with wfpl; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -require_once('code/wfpl/file.php'); +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +require_once(__DIR__.'/'.'file.php'); function dwt_reset() { $GLOBALS['_dwt_keys'] = array(''); @@ -97,6 +94,19 @@ function dwt_prepend($name, $value) { dwt_prepend_raw("", $value); } +function dwt_get_raw($name) { + $index = dwt_find_raw($name); + if($index !== null) { + return $GLOBALS['_dwt_values'][$index]; + } else { + return false; + } +} + +function dwt_get($name) { + return dwt_get_raw(""); +} + function dwt_output($filename = null) { if($filename !== null) { dwt_load($filename);