From 2684e50a0796d39e424969890c16eb97a8838151 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jul 2005 14:50:47 +0200 Subject: some minor fixes in image detail handling darcs-hash:20050724125047-7ad00-a03fa69aed22694f6b7635923b1f2ce564165b9f.gz --- inc/common.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'inc/common.php') diff --git a/inc/common.php b/inc/common.php index f40c8f1fd..eadef5767 100644 --- a/inc/common.php +++ b/inc/common.php @@ -76,6 +76,40 @@ function pageinfo(){ return $info; } +/** + * 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 * -- cgit v1.2.3