diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-07-24 14:50:47 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-07-24 14:50:47 +0200 |
commit | 2684e50a0796d39e424969890c16eb97a8838151 (patch) | |
tree | 848f781cec60c964e20b0f2a193b7d81a5433a54 /inc/common.php | |
parent | 55efc227eaeb2d480ff22837b78f89766b07fe5f (diff) | |
download | rpg-2684e50a0796d39e424969890c16eb97a8838151.tar.gz rpg-2684e50a0796d39e424969890c16eb97a8838151.tar.bz2 |
some minor fixes in image detail handling
darcs-hash:20050724125047-7ad00-a03fa69aed22694f6b7635923b1f2ce564165b9f.gz
Diffstat (limited to 'inc/common.php')
-rw-r--r-- | inc/common.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/inc/common.php b/inc/common.php index f40c8f1fd..eadef5767 100644 --- a/inc/common.php +++ b/inc/common.php @@ -77,6 +77,40 @@ function pageinfo(){ } /** + * Build an string of URL parameters + * + * @author Andreas Gohr + */ +function buildURLparams($params){ + $url = ''; + $amp = false; + foreach($params as $key => $val){ + if($amp) $url .= '&'; + + $url .= $key.'='; + $url .= urlencode($val); + $amp = true; + } + return $url; +} + +/** + * Build an string of html tag attributes + * + * @author Andreas Gohr + */ +function buildAttributes($params){ + $url = ''; + foreach($params as $key => $val){ + $url .= $key.'="'; + $url .= htmlspecialchars ($val); + $url .= '" '; + } + return $url; +} + + +/** * print a message * * If HTTP headers were not sent yet the message is added |